Hi
I am a Noob and slowly getting to grips with writing my 1st app for the Amazon Kindle Fire. I have hit a brick wall with a problem and have browsed the forums for a understanding of the Pause and resume functions and have just about figured it out apart from the problem outlined below.
I have a mediaplayer and timer both of which are declared in the
Sub Process_Globals as described in various posts.
My activity_pause routine pauses the mediaplayer and stops the timer and the activity_resume starts the mediaplayer and the timer.
This all works hunky dory when I press the home button or change the soft volume button as described in the logs below -
"Normal Operation - Home Button Pressed"
** Activity (jukescreen) Pause, UserClosed = false **
"App Run Again"
** Activity (jukescreen) Resume **
"Normal Operation soft volume pressed"
** Activity (jukescreen) Pause, UserClosed = false **
"App got focus again"
** Activity (jukescreen) Resume **
However when I press the physical power button all hell breaks lose as shown below -
"Power Pressed off" -
** Activity (jukescreen) Pause, UserClosed = false **
** Activity (jukescreen) Create, isFirst = false **
WakeLock already held.
** Activity (jukescreen) Resume **
"Power Pressed again to switch on"
** Activity (jukescreen) Resume **
** Activity (jukescreen) Resume **
** Activity (jukescreen) Pause, UserClosed = false **
** Activity (jukescreen) Create, isFirst = false **
WakeLock already held.
** Activity (jukescreen) Resume **
What I would expect is when you press the power off button the app should pause just like when the home button is pressed and resume just like before but because resume is kicking in all by itself the music starts to play again.
Please help me as I dont have much hair left to pull out and it is driving me round the twist !!
Many thanks
Mike
I am a Noob and slowly getting to grips with writing my 1st app for the Amazon Kindle Fire. I have hit a brick wall with a problem and have browsed the forums for a understanding of the Pause and resume functions and have just about figured it out apart from the problem outlined below.
I have a mediaplayer and timer both of which are declared in the
Sub Process_Globals as described in various posts.
My activity_pause routine pauses the mediaplayer and stops the timer and the activity_resume starts the mediaplayer and the timer.
This all works hunky dory when I press the home button or change the soft volume button as described in the logs below -
"Normal Operation - Home Button Pressed"
** Activity (jukescreen) Pause, UserClosed = false **
"App Run Again"
** Activity (jukescreen) Resume **
"Normal Operation soft volume pressed"
** Activity (jukescreen) Pause, UserClosed = false **
"App got focus again"
** Activity (jukescreen) Resume **
However when I press the physical power button all hell breaks lose as shown below -
"Power Pressed off" -
** Activity (jukescreen) Pause, UserClosed = false **
** Activity (jukescreen) Create, isFirst = false **
WakeLock already held.
** Activity (jukescreen) Resume **
"Power Pressed again to switch on"
** Activity (jukescreen) Resume **
** Activity (jukescreen) Resume **
** Activity (jukescreen) Pause, UserClosed = false **
** Activity (jukescreen) Create, isFirst = false **
WakeLock already held.
** Activity (jukescreen) Resume **
What I would expect is when you press the power off button the app should pause just like when the home button is pressed and resume just like before but because resume is kicking in all by itself the music starts to play again.
Please help me as I dont have much hair left to pull out and it is driving me round the twist !!
Many thanks
Mike