Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

Question:
I make a applet running in background, and push AVK_CLR or AVK_END to quit the BREW environment, I need the applet to download video file using URL through CDMA 1x in background.
But when I quit the BREW environment, the applet stop downloading video file.
How to make the background application still download file(using IWeb through HTTP) when I make the phone quit the BREW environment?

thanks

Take a look at the documentation for EVT_APP_STOP. I believe you can change the dwparam to FALSE and return to indicate to BREW that you wish to remain running in the background rather than closing down.
If this does not work the more unnofficial route would be to have the applet addref itself to avoid it being destroyed. This is a bit of a hack though so I would only suggest it as a last resort.

Take a look at the documentation for EVT_APP_STOP. I believe you can change the dwparam to FALSE and return to indicate to BREW that you wish to remain running in the background rather than closing down.
If this does not work the more unnofficial route would be to have the applet addref itself to avoid it being destroyed. This is a bit of a hack though so I would only suggest it as a last resort.

jegwright wrote:Take a look at the documentation for EVT_APP_STOP. I believe you can change the dwparam to FALSE and return to indicate to BREW that you wish to remain running in the background rather than closing down.
If this does not work the more unnofficial route would be to have the applet addref itself to avoid it being destroyed. This is a bit of a hack though so I would only suggest it as a last resort.
Oh,yes,I changed the dwparam to FALSE in case EVT_APP_STOP using
case EVT_APP_STOP:
// Add your code here...
if (pMe->m_bGoBg) {
*((boolean*)dwParam) = FALSE;
}
return(TRUE);
and you know, my applet can run in background, and I set a timer to wake up the applet after several minutes, so it worked.
But the question is:when I make the applet run in background, I quit the BREW environment using AVK_CLR or AVK_END, I hope that the applet could still downloading file through CDMA 1x, unfortunately it stop downloading.
You know, if I couldn't quit the BREW environment, the applet can hold on downloading file.
I need the applet hold on downloading file when I quit the BREW environment.
How could I make it?
thanks

jegwright wrote:Take a look at the documentation for EVT_APP_STOP. I believe you can change the dwparam to FALSE and return to indicate to BREW that you wish to remain running in the background rather than closing down.
If this does not work the more unnofficial route would be to have the applet addref itself to avoid it being destroyed. This is a bit of a hack though so I would only suggest it as a last resort.
Oh,yes,I changed the dwparam to FALSE in case EVT_APP_STOP using
case EVT_APP_STOP:
// Add your code here...
if (pMe->m_bGoBg) {
*((boolean*)dwParam) = FALSE;
}
return(TRUE);
and you know, my applet can run in background, and I set a timer to wake up the applet after several minutes, so it worked.
But the question is:when I make the applet run in background, I quit the BREW environment using AVK_CLR or AVK_END, I hope that the applet could still downloading file through CDMA 1x, unfortunately it stop downloading.
You know, if I couldn't quit the BREW environment, the applet can hold on downloading file.
I need the applet hold on downloading file when I quit the BREW environment.
How could I make it?
thanks

anybody could do me a favor?

anybody could do me a favor?

maybe it can't be done
since the applet running background, when I quit the BREW environment, that is said quit the CDMA 1X network,so it can't connect the wireless network,and then the applet had to stop download file.

maybe it can't be done
since the applet running background, when I quit the BREW environment, that is said quit the CDMA 1X network,so it can't connect the wireless network,and then the applet had to stop download file.

yes you can continue data download in the background.

yes you can continue data download in the background.

ruben wrote:yes you can continue data download in the background.
it's a good news for me.
But how to make it,can you tell me any detail?
thank you very much

ruben wrote:yes you can continue data download in the background.
it's a good news for me.
But how to make it,can you tell me any detail?
thank you very much

When the application is in the background, it wouldn't receive CLR or END key, so background application can't be shut down using CLR/END key. Background applications are not part of BREW application stack.

When the application is in the background, it wouldn't receive CLR or END key, so background application can't be shut down using CLR/END key. Background applications are not part of BREW application stack.

ruben wrote:When the application is in the background, it wouldn't receive CLR or END key, so background application can't be shut down using CLR/END key. Background applications are not part of BREW application stack.
I know the background application couldn't receive CLR or END key.
but the focus is when I quit the BREW environment, the background application stop downloading, and the return value of ISOURCE_Read is ISOURCE_END, the server stop sending data.
Why?

ruben wrote:When the application is in the background, it wouldn't receive CLR or END key, so background application can't be shut down using CLR/END key. Background applications are not part of BREW application stack.
I know the background application couldn't receive CLR or END key.
but the focus is when I quit the BREW environment, the background application stop downloading, and the return value of ISOURCE_Read is ISOURCE_END, the server stop sending data.
Why?