I will try to be as brief as possible... I have published a very simple android application it's name is "Vib-e-rator PRO". It's purpose is obvious, it can be used as a masssage vibrator or as an erotic stimulator...
My Problem is don't have an Android Phone to test my app in real time.
I have been recieving mixed comments from people. A few users say its working fine. But majority of them complained that the Phone would n quit vibrating even after the closing application.
Later i speculated that when ever the user switched off the vibrator and quit the app it would work as expected. If any user (most of em) directly closed the application ( either through the close option provided in the app itself or by pressing the END button in the phone ) without switching off the vibrator then it would not stop vibrating.
So i added myvib.Cancel() (myvib is the context for Phone Vibrator) in the exit block the close option provided in my app. For the other scenario, when it is closed by pressing the END button in phone, i have no idea how to solve it... So friends please advice me what is necessary to do... The comments i have been receiving from many users of my app is really embarassing....
Check out the Activity Lifecycle. I think your best solution is to call myvib.cancel()
from inside onPause()
or onStop()
. Then call myvib.vibrate()
from onResume()
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With