×
Namespaces

Variants
Actions
Revision as of 10:51, 25 July 2013 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

How to get the last-used Access Point in Java ME

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Tested with
Devices(s): Java Runtime 1.4
CompatibilityArticle
Keywords: IAPInfo, APN, DN, Access point, Destination Network
Created: ektasrv (30 Aug 2010)
Last edited: hamishwillee (25 Jul 2013)

Contents

Problem

How to get the last used Access Point in Java ME?

Solution

Use IAPInfo API 1.0, available on devices with Java Runtime 1.4 to access Internet Access point information from the native database.

Sample Code

Imports

import com.nokia.mid.iapinfo.*;

Get Last used APN

public AccessPoint getLastUsedAPN() throws IAPInfoException
{
//Obtain IAPInfo object by factory
IAPInfo iapinfo = IAPInfo.getIAPInfo();
//Get the last used access points by the MIDlet suite.
AccessPoint ap = iapinfo.getLastUsedAccessPoint();
return ap;
}

Note

Check your target device spec's (http://www.developer.nokia.com/Devices/Device_specifications/?filter1=all) for support of IAPInfo API on it before using it.

This page was last modified on 25 July 2013, at 10:51.
39 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×