« first day
next day →
last day (20 days later) »
Kelvin JigSawing
01:21
@a
@Android_K.Doe
Android_K.Doe
02:00
Yo
Whats up @KelvinJigSawing
Kelvin JigSawing
yo
Ok so my application apparently whenever launched on the android, when you press the home button after login it will log out
Anyway to make the users stay login for a period of time
or unless they close the app then he have to log in again
Kelvin JigSawing
02:43
@Android_K.Doe
Android_K.Doe
03:18
fkin brownout haha
Hmmm
I guess you just have to use Sqlite for that then just clear the table on the onDestroy()
Kelvin JigSawing
thing is I am not allowed to use that. I searched couple of forums was thinking how about sharedpref
Android_K.Doe
Well sharedPref would work too i guess.. Then just update it in onDestroy()
Kelvin JigSawing
hmm ok will go look it out
So I want have 2 threads running socket I want it to work in this order:
Start thread a -> Make thread b wait -> After button is clicked -> Notify thread b -> Wait for thread b to end -> Make thread b wait again -> Repeat from button clicked
any idea how i can go about it
@Android_K.Doe
Android_K.Doe
03:39
what do you mean?
Kelvin JigSawing
This is the code so far
Android_K.Doe
make it a function and just call it if necessary
thread.sleep
to stop execution
Kelvin JigSawing
so something like this
public void run()
{
while(true){
doStuff(); //the code that i want repeatedly called
Thread.sleep(500);
}
}
is that right?
Android_K.Doe
yeah but sleep for about half a second
gonna go lunch. laters
Kelvin JigSawing
Alrights :)
1 hour later…
Android_K.Doe
05:04
you got it?
Kelvin JigSawing
05:54
yeah :)
thanks alot
« first day
next day →
last day (20 days later) »
all rooms
Transcript for
May
3
May '18
4
May
7
Discussion on answer by Android_K.Doe
…
Imported from a comment discussion on
stackoverflow.com/questi...
android
listview
notifydatasetchanged
sparse-matrix
join this room
about this room
00:00
06:00
12:00
18:00
all times are UTC
site design / logo © 2024 Stack Exchange Inc;
legal
mobile