From: Steve Healy [shealy@wms-co.com]
Sent: Wednesday, November 27, 2002 8:26 AM
To: Branden Dodge; Brian Hamlin; Carlos Cabeza; Corey O'Brien; David Woodsmall; John Mercurio; Kevin Loftus
Subject: FW: network activity while suspended in BREW
FYI,
 
Regards,
Steve
-----Original Message-----
From: Curtis Witt [mailto:cwitt@qualcomm.com]
Sent: Tuesday, November 26, 2002 8:03 PM
To: Steve Healy (E-mail); 'Branden Dodge'
Subject: network activity while suspended in BREW

Guys,
 
I have unearthed some additional information about network activity within a suspended BREW application.  In a nutshell, it is not recommended-- yet.  Until the handsets are using packet-switched networks, all network activity should take place within active applications only.  When packet-switched networks are available, background network activity as well as TCP listening will be supported.
 
I tracked down one of the networking engineers here, and cornered him about it.  He said that indeed, you shouldn't be doing any socket stuff while suspended -- he said suspended apps should keep resource consumption to an absolute minimum, because it's possible/likely that the phone needs to do something else that's important and resource-intensive.
 
His recommendation for your situation is to wake the app up via SMS, and deliver the content while the app is in the foreground.  Since your network activity will be blocking any incoming voice calls (the primary responsibility of the handset) you might as well occupy the UI as well.  If another incoming SMS or low battery threatens your app with an EVT_APP_SUSPEND, you should then stop your download, to be resumed later.
 
He also said that BREW 2.0 will provide a little-documented feature of being a true background app.  Background apps are first-rate, non-suspended apps that just don't occupy the UI.  To do this, you'll follow these steps:
  1. Call ISHELL_CloseApplet( ).  This will result in an EVT_APP_STOP event being fired.
  2. In your EVT_APP_STOP event handler, change the bool pointed to by the dwParam from its default of TRUE to FALSE.  This makes your app a "background" app.
  3. When you really want to shut down, simply repeat steps 1 and 2, but leave the default TRUE value of the bool flag.
I realize that this isn't quite in line with your ultimate product goals, but hopefully it allows you to demonstrate the content delivery effectively, and improve the app as networks and newer BREW releases allow.
 
Regards,
 
Curtis

OTHER INFORMATION