Android Question Not sure how to phrase this...

Cableguy

Expert
Licensed User
Longtime User
Hi guys...

So, on my Activity_create, i do a series of tests to ensure all lights are green for the app to run, and if not, take the appropriate action to have it so... but after that I need to either restart my app, or the activity_create sub in order to re-run the tests...
what would be the best approach?
 

RandomCoder

Well-Known Member
Licensed User
Longtime User
Could you maybe set a service to run in 2 seconds time and then close your app. When the service runs just restart your activity again?

Regards,
RandomCoder
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
I am considering using callsubdelayed... would it do the trick?
need to fiddle with it a bit...
 
Upvote 0

RandomCoder

Well-Known Member
Licensed User
Longtime User
I'd give it a try pal ;)
Failing that you'll need to restart the app?
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
Not sure... need to figure out the flowchart of my app...
I do a few "If" blocks and correct what's needed and Then redo the "if" block again.. this in activity create...

basicaly I check if a file exists, if not, I create a blank template of it. need restart.
if file does exist, check if not the blank template, if it is the blank template, then show the user a form to complete it. need restart after that...
see my problem?

P.S. I can always call Activity_Create, but I just want to be sure that it is safe and "good codding"
 
Upvote 0

RandomCoder

Well-Known Member
Licensed User
Longtime User
Not sure that I fully understand why you need to restart?
1. Check file exists and if not create it there and then.
2. Check if file contains data (differs from template)
3. If step 2 data is valid continue, else ask user to fill in data and then continue.

Why the need to restart?
 
Upvote 0
Top