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: 745
Registered: ‎01-04-2009
My Device: 8300, 8800, 8700f, 9000

how to set acces point programatically

hi,

i need to do such a thing: my application, before running must set an access point. maybe it can be like at the beginning access point's settings occurs and user can configure it? actually i have no idea how to start. Can anyone suggest me anything?

 

kind regards

Developer
Posts: 745
Registered: ‎01-04-2009
My Device: 8300, 8800, 8700f, 9000

Re: how to set acces point programatically

i've found on google that

 

ServiceBook _serviceBook = ServiceBook.getSB();

ServiceRecord[] records = _serviceBook.findRecordsByCid("name");

 

can get me list of APNS. But i have a problem-> do not know how to find Cid. i saw in examples on google that i can put there 'WIFI'(to get wifi), 'WAP', 'WPTCP', but none of them finds anything. i use orange internet and under my tcp options in blackberry in APN i'ge got 'internet'. but when i try:

ServiceRecord[] records = _serviceBook.findRecordsByCid("internet");

it also does not find anything...

 

Can anyone suggest me anything?

ps. my bb is 8300

 

 regards

Highlighted
BlackBerry Development Advisor
Posts: 15,784
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: how to set acces point programatically

You can specify the APN to use in the call to Connector.open.  This overrides whatever the user has configured under Options, (Advanced Options), TCP.

 

How To - Specify APN information for a direct TCP connection 
Article Number: DB-00532

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800563/How_To_...

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker