Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (android)
Viewing all articles
Browse latest Browse all 7655

Android Problem With Backgrounde

$
0
0

il faudra que ServiceIntent(c'est la fonction qui lance un programme en tâche de fond ) se lance quand l'application est en background et s'arrête que l'application est en foreground

will require ServiceIntent (this is the function that launches a program in the background) starts when the application is in the background and stops the application is in foreground

var intent = Titanium.Android.createServiceIntent({ url: 'bgservice.js' }); intent.putExtra('interval', 60 * 1000);

function OnAppResume() { Titanium.Android.stopService(intent); }

function OnAppPause() { Titanium.Android.startService(intent); }

Ti.Android.currentActivity.addEventListener('resume', OnAppResume); Ti.Android.currentActivity.addEventListener('pause', OnAppPause);

please help me it's doesn't work


Viewing all articles
Browse latest Browse all 7655

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>