Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I need to know if there is any class or Alarm in android or IOS that tells if the mobile is Down or UP, or just started or restarted. (and for how long!)
i'm creating a logging system, and i need to log the different state of the mobile all along the day.
Thanks in advance,
You need to add send notification from you app (native in iOS and Android) to your remote logging server.
Android as well as iOS have Application life cycle. Which provides you with callback if app is in running state , background , foreground etc.
There is a similar one for Android
The idea is that both of them have singleton for application and they have callbacks for app transition stage
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
Do you know how to set an Android or iPhone device's datetime
using a feaure within your mobile app
that you built using Delphi XE5?
This should of course happen at runtime.
Delphi offers no cross-platform way of setting the system time.
On iOS, you don't have access to the API for changing the time; that functionality is reserved for the OS.
On Android, you need elevated privileges, and then you can use AlarmManager.setTime. At that point, your problem is simply one of adapting the native Java techniques to Delphi. I assume that's pretty much the same for any API, so it's beyond the scope of this question.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
I want to upload some data using web services, I have created a service, but when phone is switch off services are getting kill and data are not uploaded, please guide me on how to create a service which run even after switch of and on android, and will they persist data which is passed in intent to start service.
You can use Broadcast Receiver on reboot. Then re-start your background server.
see this question Broadcast receivers on reboot?
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
i want to detect that some application has started in android, such as when you have started YouTube application
Did you think of using a service that would be running all the time in background and would send a broadcast for the current running application.
Hope this thread solves your problem somehow.
Determining the current foreground application from a background task or service
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have application which have timers and if the timers are stopped the application will wont work I need to keep the application on all time even when the app is turn off (I know doesn't makes sense) and also to save the files if the phone is switched down.
I need to keep the application on all time even when the app is turn off
You can you Service. Its for the same purpose.
Save the files if the phone is switched down
You can receive an intent ACTION_SHUTDOWN in the broadcast receiver, when phone is about to switch off. Then you can do whatever you want to do there. See Is there any way to receive a notification when the user powers off the device? for details.
Hope this helps.
I suggest that you investigate Services.
A service can run in the background continuously.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions must demonstrate a minimal understanding of the problem being solved. Tell us what you've tried to do, why it didn't work, and how it should work. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I am new at android and I am trying to make an android app which takes from you the time and sends a message to user at that time. Can someone tell me the steps to follow so I can make this app.
This is actually pretty simple. One way to do this (may not be the simplist but would give you good experience with a bunch of the android framework:
Register a BroadcastReceiver
Gather the information (message, destination, time) from the user using UI elements.
Send an intent to the BroadcastReciever with the time specified.
Send the sms from the BroadcastReceiver, using SmsManager.
This would also give you a lot of opportunity to add to this app, you can learn to use Content Providers to keep track of the current 'Pending Messages' and give the user an option to view and edit them.