Differences between Android and iOS regarding intents and background operations

for my current project I am trying to figure out the differences between Android and iOS. I only have knowledge in Android and absolutely no knowledge about iOS. I want to know:

I am very grateful for the answers as well as further literature regarding these quesitons!

+3


source to share


2 answers


You can use the Reachability implementation to receive Wi-Fi connection notifications, but keep in mind that they will not wake up your app.

You can use Core Bluetooth to search for connection events. Again, this will not wake up your application. I believe you can set up a delegate on the CBCentralManager to find out about this. Check out the docs here .

However, you are correct in that you still need to fix the background execution issue to keep your application from waking up. To do this, you need features that actually make background execution useful to the user, or Apple will not approve of your application. Here are some of your options.

If your application has actual bluetooth functions, you can use one of these modes (bluetooth center and bluetooth peripheral).



If you have a function that guarantees background sound, you can use this

If you have a function that guarantees the location of the background, you can use the CLLocationManager startUpdatingLocation (but this can lead to serious battery life)

You may also be able to set up a system that has remote notifications disabled and then use the background mode of remote notification. This is for loading content

Also keep in mind that the user can turn off all these things on you at any time.

Good luck!

+1


source


I'm not sure if this is the answer to your question directly, but it might be helpful. I know in Android that you might intend to switch actions. Well, in iOS, to go to another UIViewController

(iOS activity equivalent), you would do a segue. In the method, prepareForSegue

you can handle what you want to do in the next UIViewController, like passing variables, etc.

You can use Background Fetch

in iOS7, you can execute services while the app is sleeping / in the background. This wakes up the app at regular intervals in the background to perform a task like when data is refreshed, etc. Here you can write down the accelerometer values. http://www.appcoda.com/ios7-background-fetch-programming/ has a good guide on this matter.



I hope this is somewhat helpful.

0


source







All Articles