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

Login on app resume on android

$
0
0

hi,

I am trying to build an app that needs to login online to view personal data.

Everything is working, but on android when i press the home button and then return to the app by pressing the application icon. I won't get an activity resume event.

On resume i want to trigger the login dialog, so other people that accidental get there hands on the phone and the app is still running in the background, can't get to the personal data.

i recieve the focus event on the window.

i have tried the following code:

var activity = Titanium.Android.currentActivity;
 
var resumeapp=activity.addEventListener('resume', function(){
    Ti.API.info('resumed from app');
    restartapp();
});
also i have tried:
var resumeapp=WinOrderDetail.addEventListener('resume', function(){
        Ti.API.info('resume window');
    });
both wont get triggered on android

Viewing all articles
Browse latest Browse all 7655

Trending Articles



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