android - Closing scanner application/activity after a timeout -



android - Closing scanner application/activity after a timeout -

i using intentintegrator initiate scanner (qr/barcode - zxing) application. have requirement close scanner application after 30 seconds of start.

scanner application invoked through startactivityforresult. wondering if there way reference of activity started "startactivityforresult", that, can utilize timer , close activity.

android experts, please help me here.

i think alternative here modify zxing code.

when start scanning activity, app's activity go onpause() @ point need cancel timer(s), not start new ones.

another thought might start service, starts thread kills scanning activity after 30 seconds...but alas, can't kill activity service.

zxing open source, can pull down, modify , rebuild it. there class called inactivitytimer.java can modified finish activity after x seconds. alternative might add together broadcast receiver scanning manifest finish scanning activity when intent received.

basically, bundle can finish() activities defined in manifest. can't kill activities in other packages...it's user, or app, decide when finish.

android zxing

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -