About Register Notify accross Apps | developer.brewmp.com About Register Notify accross Apps | developer.brewmp.com

Developer

About Register Notify accross Apps

Forums:

In App A, I Register Notify for App B, that is Call below code:

nErr = ISHELL_RegisterNotify(shell,AEECLSID_APPB,AEECLSID_Notifier,MASK);

But, the nErr is 21,EPRIVLEVEL.

What is the matter??

The App only can register notify for itself?? BREW did not allow to register notify accross Apps?? Then Why ISHELL_RegisterNotify need the second Paramter??

Furthermore, Does BREW allow to register MIME type accross Apps??

Thx a lot

I think you cannot register your applet for notifications of the events occuring in other applets (but classes instead; like INETMGR etc).
You can do a workaround to this problem if you do need certain feature.
If you want Applet_A to recieve some event notification occuring at Applet_B-
then in event handler of Applet_B; call below API at the desired event:
ISHELL_PostEvent( pIShell, AEECLSID_APPLET_A,evt, wp, dwp) ;
("evt" should be some user defined event which both AppletA and AppletB understands).
This will send a notification to Applet_A for the specific event.
~~~~~~~
SoftEast
~~~~~~~

I think you cannot register your applet for notifications of the events occuring in other applets (but classes instead; like INETMGR etc).
You can do a workaround to this problem if you do need certain feature.
If you want Applet_A to recieve some event notification occuring at Applet_B-
then in event handler of Applet_B; call below API at the desired event:
ISHELL_PostEvent( pIShell, AEECLSID_APPLET_A,evt, wp, dwp) ;
("evt" should be some user defined event which both AppletA and AppletB understands).
This will send a notification to Applet_A for the specific event.
~~~~~~~
SoftEast
~~~~~~~

Yes, the app can only register itself for notifications.

Yes, the app can only register itself for notifications.

Thx Max.
But If I Do need register notify for other Apps, Then How to Do?? See below detail Requirement.
App A, App B, App C all need register Notify for Notifier Class T with the same mask G. And the registering should happended in BREW init so as to make sure they can receive the notification even when they are not running. As we know, Normally we can add the notification in their MIF to reach this purpose.
BUT, If I also want to control their registering order(and then control the notification delivery orders), Then How to Do?? Now we could not add notification in their MIF, coz the register order in MIF is not decided. Then, I think I could do them in one App, named Z, which will be auto-started by BREW, can as below:
App Z's HandleEvent:
Case EVT_App_Start:
......................
ISHELL_RegisterNotify(shell,AEECLSID_APPA, Notifier T, MaskG);
ISHELL_RegisterNotify(shell,AEECLSID_APPB, Notifier T, MaskG);
ISHELL_RegisterNotify(shell,AEECLSID_APPC, Notifier T, MaskG);
BUT. now, You told me this is not working. Then How to do??
waiting for your help....

Thx Max.
But If I Do need register notify for other Apps, Then How to Do?? See below detail Requirement.
App A, App B, App C all need register Notify for Notifier Class T with the same mask G. And the registering should happended in BREW init so as to make sure they can receive the notification even when they are not running. As we know, Normally we can add the notification in their MIF to reach this purpose.
BUT, If I also want to control their registering order(and then control the notification delivery orders), Then How to Do?? Now we could not add notification in their MIF, coz the register order in MIF is not decided. Then, I think I could do them in one App, named Z, which will be auto-started by BREW, can as below:
App Z's HandleEvent:
Case EVT_App_Start:
......................
ISHELL_RegisterNotify(shell,AEECLSID_APPA, Notifier T, MaskG);
ISHELL_RegisterNotify(shell,AEECLSID_APPB, Notifier T, MaskG);
ISHELL_RegisterNotify(shell,AEECLSID_APPC, Notifier T, MaskG);
BUT. now, You told me this is not working. Then How to do??
waiting for your help....

The call to ISHELL_RegisterNotify() has to be made from within the context of the module containing the class ID that's being registered. You could probably get around this by doing an ISHELL_SendEvent() call between the apps, which would trigger the other app to call ISHELL_RegisterNotify() for itself.

The call to ISHELL_RegisterNotify() has to be made from within the context of the module containing the class ID that's being registered. You could probably get around this by doing an ISHELL_SendEvent() call between the apps, which would trigger the other app to call ISHELL_RegisterNotify() for itself.

Thx a Lot, Max:-)
I have no problem now:-)

Thx a Lot, Max:-)
I have no problem now:-)