How to setup Access Point parameters programmatically

by luc276 » Thu, 30 Apr 2009 02:05:56 GMT


Sponsored Links
 Hi all
First I'm using the Android SDK 1.5 with ADT 0.9 and I'm investigating
with the emulator.
I'm wondering how to setup the Andoid Access Point parameters (like
APN, username, password..) programmatically.
I saw a WRITE_APN_SETTINGS permission in the SDK help but didn't find
any way to use it.
I guess the settings are stored into /data/data/
com.android.providers.telephony/databases/telephony.db and  into /data/
data/com.android.providers.telephony/shared_prefs/preferred-apn.xml
but I cannot access them programmaticaly.
Indeed, when I call
SQLiteDatabase myDB = SQLiteDatabase.openDatabase("/data/data/
com.android.providers.telephony/databases/telephony.db", null,
SQLiteDatabase.OPEN_READONLY);
an SQLiteException is thrown (830058649800) "unable to open database
file".
I tried to define in the manifest several permissions like
CHANGE_CONFIGURATION, WRITE_SETTINGS but without more success. Just
noticed that I can access the two files with with "adb shell sqlite3"
or DDMS and pull them from the emulator to the PC.
I'm working on the topic since a week and I'm really in hurry right
now so your helps will be greatly appreciated.
Thanks in advance
Regards
luc

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Cannot create a new project

When I try to create a new Android project, I receive the following
error:
Plug-in com.android.ide.eclipse.adt was unable to load class
com.android.ide.eclipse.adt.project.internal.NewProjectWizard.


Please help.

--~--~---------~--~----~------------~-------~--~----~

2. ADP problem

When I try to run ADP.EXE I get an error saying "This application
has failed to start because AdpWinApi.dll was not found. Re-installing
the application may fix this problem."


  AdpWinApi.dll is right below in the same folder (tools)



   Anyone know?

--~--~---------~--~----~------------~-------~--~----~

3. Problems running telnetd on adp1

4. Extracting Apk Files

5. Changing the system Wallpaper --Intent Broadcast ?--

6. HTC G2's home effection is very well,I saw it on www,Is it real or just a flash?

7. Gadget Show UK (Apple fanboys??)