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

Developer

Forums

Forums:

Greetings, everyone.

I'm new to BREW (longtime J2ME developer), and I'm trying to find my footing on the platform. I'd like to know if some things are possible, and where to look for more information.

First, am I right to assume that Verizon devices are all running 3.x now?

Second, I'm interested in exploring the device features of BREW that J2ME doesn't have. Specifically, I want to make a kind of monitoring application. Something that would start when the phone powers up and run quietly in the background, monitoring incoming calls and sms messages. It would be even better if it could ignore/redirect calls or hold text messages temporarily until a certain condition is met. is this sort of thing possible with BREW?

Third, I've heard that J2ME to BREW porting applications have come pretty far in recent years. Are they reliable, or is it still more worthwhile to port by hand?

Thanks very much for the help, guys. I'm looking forward to your responses.

Regards,
Joseph

Starting app on power-up: register for AEECLSID_SHELL with mask NMASK_SHELL_INIT,app will receive EVT_NOTIFY,start app from there using IShell_StartApplet.
Background apps:
https://brewx.qualcomm.com/brew/sdk/download.jsp?page=dx/en/brew31/ad/kb...
Handling Voice call/SMS:
https://brewx.qualcomm.com/brew/sdk/download.jsp?page=dx/en/brew31/ad/kb...
DX Knowledge base:
https://brewx.qualcomm.com/brew/sdk/download.jsp?page=dx/en/brew31
Go through Brew API reference for API details.

Starting app on power-up: register for AEECLSID_SHELL with mask NMASK_SHELL_INIT,app will receive EVT_NOTIFY,start app from there using IShell_StartApplet.
Background apps:
https://brewx.qualcomm.com/brew/sdk/download.jsp?page=dx/en/brew31/ad/kb...
Handling Voice call/SMS:
https://brewx.qualcomm.com/brew/sdk/download.jsp?page=dx/en/brew31/ad/kb...
DX Knowledge base:
https://brewx.qualcomm.com/brew/sdk/download.jsp?page=dx/en/brew31
Go through Brew API reference for API details.

Some of the developer articles require some kind of unspecified login that is different than my forum login. How can I access these? Also, while I appreciate the links, I know how to navigate the api documentation portion of the site. Can you please give direct answers in the future? I only ask questions when something seem unclear in the documentation.
Edit:
Specifically, what I'm trying to figure out at this point are the following:
- If it's possible to make it so that the app can't be shut down or disabled once running (except with internal verification, like a password)
- A way to intercept all incoming text messages and delay delivery/save them for later viewing. This must be any text message from another mobile device. Also, a way to prevent the user from writing new text messages.
- A way to intercept incoming calls and respond with a pre-recorded message (or forward to voice mail). It should also be possible to prevent the user from making outgoing calls.
Thanks.
Joseph

Some of the developer articles require some kind of unspecified login that is different than my forum login. How can I access these? Also, while I appreciate the links, I know how to navigate the api documentation portion of the site. Can you please give direct answers in the future? I only ask questions when something seem unclear in the documentation.
Edit:
Specifically, what I'm trying to figure out at this point are the following:
- If it's possible to make it so that the app can't be shut down or disabled once running (except with internal verification, like a password)
- A way to intercept all incoming text messages and delay delivery/save them for later viewing. This must be any text message from another mobile device. Also, a way to prevent the user from writing new text messages.
- A way to intercept incoming calls and respond with a pre-recorded message (or forward to voice mail). It should also be possible to prevent the user from making outgoing calls.
Thanks.
Joseph

To access some features/articles/tools on BREW developer extranet you needs to be an authenticated developer. Here is the process to get authenticated:
http://brew.qualcomm.com/brew/en/developer/getting_started/get_authentic...
For apps which interfers with device primary functionality, you needs to work with opeator/OEM.
- No direct way to do this for Foreground apps (except closing by END key - for which you can use "Phone" flag in the MIF; Your app will get the END key event and not stop; needs system privileges). One way is to put app in background on stop event and then bring to foregorund if verification fails.
Background apps can do this - see article on backgorund apps about how to close them.
- NMASK_TAPI_SMS_TEXT allows applications to register for all Text Messages (messages with TeleServce ID: SMS_TELESERVICE_CMT_95).
- Register for tapi status change using NMASK_TAPI_STATUS (notifier class: AEECLSID_TAPI) using MIF or ISHELL_RegisterNotify.
Handle EVT_NOTIFY for PS_INCOMING/PS_ORIG:
case EVT_NOTIFY:
{
AEENotify* pNotify = (AEENotify*) dwParam;
if ((pNotify!=NULL) && (pNotify->cls == AEECLSID_TAPI))
{
if ( pNotify->dwMask == NMASK_TAPI_STATUS )
{
TAPIStatus* ptpst = (TAPIStatus*) pNotify->pData;
if (ptpst->state == PS_INCOMING)
{
//WriteLogerinfo(pMe, "Incoming call is received.\n");

return TRUE;
Answer using ICall_Answer, Transfer using ICALL_Transfer. End the call using ICALL_End. See ICall API reference.
IVocoder may be used for recording incoming call or play pre-recorded message. Refer IVocoder sample at: https://brewx.qualcomm.com/brew/sdk/download.jsp?page=dx/samplecode
Please try to search the forums before posting...

To access some features/articles/tools on BREW developer extranet you needs to be an authenticated developer. Here is the process to get authenticated:
http://brew.qualcomm.com/brew/en/developer/getting_started/get_authentic...
For apps which interfers with device primary functionality, you needs to work with opeator/OEM.
- No direct way to do this for Foreground apps (except closing by END key - for which you can use "Phone" flag in the MIF; Your app will get the END key event and not stop; needs system privileges). One way is to put app in background on stop event and then bring to foregorund if verification fails.
Background apps can do this - see article on backgorund apps about how to close them.
- NMASK_TAPI_SMS_TEXT allows applications to register for all Text Messages (messages with TeleServce ID: SMS_TELESERVICE_CMT_95).
- Register for tapi status change using NMASK_TAPI_STATUS (notifier class: AEECLSID_TAPI) using MIF or ISHELL_RegisterNotify.
Handle EVT_NOTIFY for PS_INCOMING/PS_ORIG:
case EVT_NOTIFY:
{
AEENotify* pNotify = (AEENotify*) dwParam;
if ((pNotify!=NULL) && (pNotify->cls == AEECLSID_TAPI))
{
if ( pNotify->dwMask == NMASK_TAPI_STATUS )
{
TAPIStatus* ptpst = (TAPIStatus*) pNotify->pData;
if (ptpst->state == PS_INCOMING)
{
//WriteLogerinfo(pMe, "Incoming call is received.\n");

return TRUE;
Answer using ICall_Answer, Transfer using ICALL_Transfer. End the call using ICALL_End. See ICall API reference.
IVocoder may be used for recording incoming call or play pre-recorded message. Refer IVocoder sample at: https://brewx.qualcomm.com/brew/sdk/download.jsp?page=dx/samplecode
Please try to search the forums before posting...

Very interesting. Thank you, Atul. Your advice is very helpful. I'll return to this thread as I refine my questions further. I need some time to speak with Verizon regarding the possibility of controlling outgoing calls/texts as you suggested.

Very interesting. Thank you, Atul. Your advice is very helpful. I'll return to this thread as I refine my questions further. I need some time to speak with Verizon regarding the possibility of controlling outgoing calls/texts as you suggested.

Okay, two more specific questions:
1) Can you detect and block outgoing calls with a background application?
2) Can you detect and block outgoing SMS with a background application?
I found some negative information regarding this elsewhere in the forums, but those threads are over two years old. Has anything enabled this in recent years?
Thanks,
Joseph

Okay, two more specific questions:
1) Can you detect and block outgoing calls with a background application?
2) Can you detect and block outgoing SMS with a background application?
I found some negative information regarding this elsewhere in the forums, but those threads are over two years old. Has anything enabled this in recent years?
Thanks,
Joseph

1)Register for tapi status change using NMASK_TAPI_STATUS (notifier class: AEECLSID_TAPI) using MIF or ISHELL_RegisterNotify.
case EVT_NOTIFY:
{
AEENotify* pNotify = (AEENotify*) dwParam;
if ((pNotify!=NULL) && (pNotify->cls == AEECLSID_TAPI))
{
if ( pNotify->dwMask == NMASK_TAPI_STATUS )
{
TAPIStatus* ptpst = (TAPIStatus*) pNotify->pData;
if (ptpst->state == PS_ORIG
{
//ICALL_End to block the call.

return TRUE;
2) No you can't. You can get tapi status change notification as above but there is no way to decide about outgoing SMS.

1)Register for tapi status change using NMASK_TAPI_STATUS (notifier class: AEECLSID_TAPI) using MIF or ISHELL_RegisterNotify.
case EVT_NOTIFY:
{
AEENotify* pNotify = (AEENotify*) dwParam;
if ((pNotify!=NULL) && (pNotify->cls == AEECLSID_TAPI))
{
if ( pNotify->dwMask == NMASK_TAPI_STATUS )
{
TAPIStatus* ptpst = (TAPIStatus*) pNotify->pData;
if (ptpst->state == PS_ORIG
{
//ICALL_End to block the call.

return TRUE;
2) No you can't. You can get tapi status change notification as above but there is no way to decide about outgoing SMS.

Greetings, Adhause.
Thanks again for the helpful response. Unfortunately, not being able to intercept and block outgoing SMS is a real dealbreaker for the application I have in mind. Still, this has been very educational. Out of curiosity, is there any interface for the phone's web browser?
Regards,
Joseph

Greetings, Adhause.
Thanks again for the helpful response. Unfortunately, not being able to intercept and block outgoing SMS is a real dealbreaker for the application I have in mind. Still, this has been very educational. Out of curiosity, is there any interface for the phone's web browser?
Regards,
Joseph

Are you talking about launching native browser from Brew application? If yes, unfortunately you can't do that.

Are you talking about launching native browser from Brew application? If yes, unfortunately you can't do that.

Although it isn't possible to block outgoing SMS, can you still catch and copy the information out of it for use in the application? Also, is it possible to monitor the page history of the browser, or even block certain websites? Thanks again!

Although it isn't possible to block outgoing SMS, can you still catch and copy the information out of it for use in the application? Also, is it possible to monitor the page history of the browser, or even block certain websites? Thanks again!

Hi,
Sorry for barging in into this thread.
This thread has been very helpful for the application i have in mind. Thank you.
I am a windows mobile developer trying to port my application to BREW.
I have a specific question: Is it possible for me to replace the default incoming window with my own created one? My understanding is this, as mentioned in the earlier reply, i will listen to an incoming call event, then create my window. My worry is that it is not possible for me to kill/hide/move the default incoming call window. Or worst case scenario is it even possible to have another window on top of the default incoming call window or is it a high priority window that cannot be covered over.
In Windows mobile, what we do is search the registry for the default window app and hide it away by moving it to an off screen location.
Thank you very much.
regards,
Iqnatius

Hi,
Sorry for barging in into this thread.
This thread has been very helpful for the application i have in mind. Thank you.
I am a windows mobile developer trying to port my application to BREW.
I have a specific question: Is it possible for me to replace the default incoming window with my own created one? My understanding is this, as mentioned in the earlier reply, i will listen to an incoming call event, then create my window. My worry is that it is not possible for me to kill/hide/move the default incoming call window. Or worst case scenario is it even possible to have another window on top of the default incoming call window or is it a high priority window that cannot be covered over.
In Windows mobile, what we do is search the registry for the default window app and hide it away by moving it to an off screen location.
Thank you very much.
regards,
Iqnatius

Technically, you can override default call window however on some handsets you may find some glitches before your customized window gets displayed.
Legally, you cannot override OEM screens. You need to work with OEM.

Technically, you can override default call window however on some handsets you may find some glitches before your customized window gets displayed.
Legally, you cannot override OEM screens. You need to work with OEM.

What about monitoring outgoing SMS and web use?

What about monitoring outgoing SMS and web use?

can't monitor outgoing SMS. what you do mean by web use?

can't monitor outgoing SMS. what you do mean by web use?

Ugh, you can't monitor outgoing SMS either? Why does BREW lack basic access to telephony functions?
Regarding web use, I was wondering if it's possible to keep track of what web pages the user visits, like the "history" page in your browser. As a bonus, could you block certain pages?
Just to make sure I have everything straight so far:
+ BREW can monitor/intercept incoming and outgoing calls
+ BREW can monitor/intercept incoming SMS
- BREW cannot monitor/intercept outgoing SMS

Ugh, you can't monitor outgoing SMS either? Why does BREW lack basic access to telephony functions?
Regarding web use, I was wondering if it's possible to keep track of what web pages the user visits, like the "history" page in your browser. As a bonus, could you block certain pages?
Just to make sure I have everything straight so far:
+ BREW can monitor/intercept incoming and outgoing calls
+ BREW can monitor/intercept incoming SMS
- BREW cannot monitor/intercept outgoing SMS

Handle EVT_NOTIFY for PS_INCOMING/PS_ORIG:
case EVT_NOTIFY:
{
AEENotify* pNotify = (AEENotify*) dwParam;
if ((pNotify!=NULL) && (pNotify->cls == AEECLSID_TAPI))
{
if ( pNotify->dwMask == NMASK_TAPI_STATUS )
{
TAPIStatus* ptpst = (TAPIStatus*) pNotify->pData;
if (ptpst->state == PS_INCOMING)
{
//WriteLogerinfo(pMe, "Incoming call is received.\n");

return TRUE;
Thank you very much for the reply.
Above is an excerpt from earlier post, let me just iterate my understanding, at the line where
//WriteLogerinfo(pMe, "Incoming call is received.\n");
is shown, I will replace with the function that will call my window to visible.
Question is will my window be covered by the default window? if yes, how do i get the instance of the default incoming window to move it to an off screen location or make it invisible.
regards,
Adrian

Handle EVT_NOTIFY for PS_INCOMING/PS_ORIG:
case EVT_NOTIFY:
{
AEENotify* pNotify = (AEENotify*) dwParam;
if ((pNotify!=NULL) && (pNotify->cls == AEECLSID_TAPI))
{
if ( pNotify->dwMask == NMASK_TAPI_STATUS )
{
TAPIStatus* ptpst = (TAPIStatus*) pNotify->pData;
if (ptpst->state == PS_INCOMING)
{
//WriteLogerinfo(pMe, "Incoming call is received.\n");

return TRUE;
Thank you very much for the reply.
Above is an excerpt from earlier post, let me just iterate my understanding, at the line where
//WriteLogerinfo(pMe, "Incoming call is received.\n");
is shown, I will replace with the function that will call my window to visible.
Question is will my window be covered by the default window? if yes, how do i get the instance of the default incoming window to move it to an off screen location or make it invisible.
regards,
Adrian

You don't have control over default window. You need to cover that window with your app window.

You don't have control over default window. You need to cover that window with your app window.

Any chance I could un-hijack my thread and get an answer? Thanks.

Any chance I could un-hijack my thread and get an answer? Thanks.

Sorry, I couldn't get you?

Sorry, I couldn't get you?

Sleek Media wrote:Ugh, you can't monitor outgoing SMS either? Why does BREW lack basic access to telephony functions?
Regarding web use, I was wondering if it's possible to keep track of what web pages the user visits, like the "history" page in your browser. As a bonus, could you block certain pages?
Just to make sure I have everything straight so far:
+ BREW can monitor/intercept incoming and outgoing calls
+ BREW can monitor/intercept incoming SMS
- BREW cannot monitor/intercept outgoing SMS
Basically, I'm trying to figure out the limits of BREW telephony. I'd like to make some kind of security software (there is parental software and spy programs on smartphones, but not featurephones). If it's not technically possible, is there any possibility that carriers like Verizon could grant access to telephony not normally accessible through BREW?
Thanks again.

Sleek Media wrote:Ugh, you can't monitor outgoing SMS either? Why does BREW lack basic access to telephony functions?
Regarding web use, I was wondering if it's possible to keep track of what web pages the user visits, like the "history" page in your browser. As a bonus, could you block certain pages?
Just to make sure I have everything straight so far:
+ BREW can monitor/intercept incoming and outgoing calls
+ BREW can monitor/intercept incoming SMS
- BREW cannot monitor/intercept outgoing SMS
Basically, I'm trying to figure out the limits of BREW telephony. I'd like to make some kind of security software (there is parental software and spy programs on smartphones, but not featurephones). If it's not technically possible, is there any possibility that carriers like Verizon could grant access to telephony not normally accessible through BREW?
Thanks again.

Yes, Better work with OEM and carrier. They should be able to help you out.

Yes, Better work with OEM and carrier. They should be able to help you out.