« first day (48 days earlier)      last day (36 days later) » 

04:37
Good Morning All
 
5 hours later…
09:40
yes
this way am doing now
and in my landing page
Intent intent = new Intent(this, SyncService.class);
startService(intent);
like this way
so we dont want to start this service in any other class ya
have u seen that link
manifest i have added
09:41
there clearly explained
y again confusion
there itself its confusing
see my doubt is is that i need to start service in each activity?
i mean this line?
Intent intent = new Intent(this, SyncService.class);
startService(intent);
y that is needed in every place ?
ok u can also do taht
u call APIs and load the data
on startservice onHandleIntent you store servicestarted flag in SP
and once ur IntentService result came, i mean ur API data came simply make servicestarted false
in all ur activities , check in SP if service started , dont call the service
else call the service
10:00
see in my landing page what am doing before
daily once i need to take update
so am saving the date in prefernce
so if the date has been changed automatically it will take update
ok
then y u need that in every activity now ?.
Its heavy API call u already told
see my app is default launcher
the user cant do anything else
it consume more data and user wont use it
no i have changed it now its saving db in to fast
what is default launcher and user cant do anything
10:02
so now if the user is in different activity
it wont update ya
so for that am using service
always our app will b open
then what is the problem now
tell me that
dont make me confuse
10:04
see if the user is in different activity it wont update..he has to come in to landing page then only it will update
but i don't want like that way
see for example now i have landing page and stockactivity
so now am in landing page and the date has been changed it will take update
but if am in stock activity and the date is changed..but it wont update..the user has to come back to landing page
because i have done all the functionality in landing page
thats why
then keep it in base activity
and do there
all ur activities u extend with baseactrivity
base activity means?
ur update code should be there in base activity
10:07
landing activity?
no
you no about inheritence ?
read this u get
what common for all your activities those u need to write in base activity
like showToast() , showProgress() , setToolBar()
and so on
and each ur activity should extend BaseActivity instead of APPCompactActivity
ur baseActivity vll extends AppCompactActivity
read in quora link
u may get some idea
10:21
ya
done
got it
working
so no need service
@KingofMasses
Thank you...
so we can use like this way ya..then why service is using
if u told the issue / requirement clearly at starting it wont leads this much time
is it better way?
service is for different usage
10:23
ya true..normally this thing i thought it will use service
when app close background run
ya
service is for background task
ok bye
i have some work
okay thank you once again
bye
@KingofMasses
playstore apk update if we give it in base activity
its okay ya

« first day (48 days earlier)      last day (36 days later) »