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
Regular Contributor
musmankhan90
Posts: 92
Registered: ‎03-09-2013
My Carrier: blackberry

Re: How to get Email address used by the phone

Sir kindly share me the link,i cant find it.

Thanks

Please use plain text.
Regular Contributor
musmankhan90
Posts: 92
Registered: ‎03-09-2013
My Carrier: blackberry

Re: How to get Email address used by the phone

Is this the right way to do:

ServiceBook sb = ServiceBook.getSB();


                    ServiceRecord[] srs = sb.findRecordsByCid("CMIME");
                      for(int i = 0; i < srs.length; i++) {

                             ServiceConfiguration sc = new ServiceConfiguration(srs[i]);

                                String email = sc.getEmailAddress();

                                if(srs.length==0) {
                                    Dialog.alert("Mail Address is Not registered");
                                }
                                else {
                                    Dialog.alert("Mail Address is Registered");
                                    MethodbyEmail();
                                     }
                                }

Please use plain text.
Developer
simon_hain
Posts: 15,558
Registered: ‎07-29-2008
My Carrier: O2 Germany

Re: How to get Email address used by the phone

musmankhan90 your code is bogus.

the KB articles are
http://supportforums.blackberry.com/t5/Java-Development/Retrieve-the-default-email-address-for-the-d...
http://supportforums.blackberry.com/t5/Java-Development/Send-a-message-from-a-non-default-email-addr...

both are not exactly what you want, but should give you enough pointers to continue.
----------------------------------------------------------
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
Please use plain text.
Regular Contributor
musmankhan90
Posts: 92
Registered: ‎03-09-2013
My Carrier: blackberry

Re: How to get Email address used by the phone

hehehhe...Thank You for pointing out my Mistake :-D

Really appreciate for your quick response.It helped me :-) Thank You

Please use plain text.