As a mobile developer working with the API integration is a kind of daily task, We mostly use Retrofit for it with GSON. And for that kind of implementation we usually creating the POJO for our API response. But some time after all the implementation the type of element could change according some conditions.
// Data as a JSON array
As we can see data is coming as a JSON array in regular case but when there is no data available in array server was sending the object instead of array. …
In this article, we will learn about functions and operator that allows to combine a few observable sequences in a different ways. I assume that you are familiars withRxJava and kotlin Flow. In this articleWe will review Zip combineLatest and withLatestFrom operator for RxJava and how to achieve same using Flow.
Zip combine the emissions of multiple Observables together via a specified function and emit single items for each combination based on the results of this function
As can be seen in the diagram, So we’ve had two observable sequences to zip function and want to receive array of values…
In my previous article I have explained a bit about android activity Lifecycle coordination. In this one I am going to share about fragment’s Lifecycle coordination with add and replace. If you haven’t read it till now, you can go and click below
Suppose we have one activity and in this activity we have one fragment with the name FirstFragment so when it’s first load into the activity below Lifecycle event will be called for this fragment
onAttach > onCreate > onCreateView >onViewCreated >onActivityCreated > onStart > onResume of FirstFragment will be called
Now if we have one button in…
In today’s topic we are going to discuss about activity lifecycle coordination, I have seen so many beginners are making mistakes while they have been asked about the lifecycle event of activity when it switch to another, or back from other activity, so here i am writing an article about it to help android beginners to understand the flow
We all have seen the activity lifecycle diagram from official android documentation website, have the basic idea about it. …
Hello friends, Hope you all doing good. This is the my first attempt to write an article on medium so if i do any mistake please forgive me for that. So let’s Start
We know we can use pointers for base objects, We can also use it to the object of derived classes. Pointer to object of base class are type-compatible with pointer to object of derived class. Therefore, a single pointer variable can be made to point to object belongings to different classes.
For Example: B is a base class and D is a derived class from B