View Single Post
Old 09-23-2008, 12:05 AM   #4
ambar
New Member
 
Join Date: Jul 2008
Model: 7100T
PIN: N/A
Carrier: sad
Posts: 14
Arrow

thnkx for ur responses.I was doing a lot of research into this and found many things.
@arunk
I think one can get the list programatically.Heres How:
<code>
ServiceBook serviceBook = ServiceBook.getSB();
ServiceRecord[] records = serviceBook.findRecordsByCid( "WAP" );
for( int i = 0; i < records.length; i++ )
{
if( records[i].getName().equalsIgnoreCase( "WAPTransport" ) )
{

}
}
</code>
@simon.hain @arunk
Suppose I obtained a desired APN from servicebook as described above.Can I set this apn into the system some how and force any further connections to use this apn?Its like overidding the current apn for connections.???

One crude way is that one can use a particular apn for httpconnection by providing the apn info in the url provided to Connector.open()
like this
<code>
Connector.open("socket://testserver:600;deviceside=true;apn=<apn name>;tunnelauthusername=<apn username>;tunnelauthpassword=<apn password>");
</code>
Offline   Reply With Quote