Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 214
Registered: ‎03-18-2012
My Device: 8520
My Carrier: Company

blackberry sendListener works for only one email account

Hi,

         I have configured two email accounts on my device. and blackberry send Listener intercept the outgoing emails.

         problem is that it intercept the emails from only one email account ( i think default email account)...

 

         so please suggest how i can intercept  the emails from all the emails accounts configure on the device...

 

   

Developer
Posts: 17,025
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: blackberry sendListener works for only one email account

you add the sendlistener to a store, and the store is related to one account.
if you have multiple accounts you accordingly have multiple stores and thus have to register multiple listeners.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 214
Registered: ‎03-18-2012
My Device: 8520
My Carrier: Company

Re: blackberry sendListener works for only one email account

thanx ,

             is there any event  so i get notified when new store created... so that i can register the sendListener with it.....

Developer
Posts: 17,025
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: blackberry sendListener works for only one email account

probably http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/itpolicy/ITPolicyChangedListen...
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 214
Registered: ‎03-18-2012
My Device: 8520
My Carrier: Company

Re: blackberry sendListener works for only one email account

Sir,

          please suggest how to register  ITPolicyChangedListener....

Developer
Posts: 17,025
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: blackberry sendListener works for only one email account

http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/itpolicy/ITPolicy.html#addList...
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 214
Registered: ‎03-18-2012
My Device: 8520
My Carrier: Company

Re: blackberry sendListener works for only one email account

Hi,

        i use the below code but  listener is not fire when i create new Emails accounts.... please suggest.....

public class ItPoliciyChangedLsitener implements ITPolicyChangedListener
{
    ItPoliciyChangedLsitener()
    {
       ITPolicy.addListener(UiApplication.getApplication(),this);    
    }
    public void policyChanged(String uid, boolean locked)
    {

        logFile.log("file:///store/home/user/ITLIstener.txt","");

    }

}