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. Confused about where I should be posting with the most active users.

What is there a group here at Google with a homepage that directs us
to another group at StackOverflow. Isn't there a Google supported
group just like Microsoft having the MSDN groups?

Thanks.

-- 

2. Google Implement

Hello,I am working about android security. I want to get a implement which
must to be implemented by all applications. The implement is exist or not ?
Thanks

-- 

3. weird shadow along top border of Button atop SurfaceView

4. Question about creating calendar event from text/calendar response

5. How to stop launch configuration dialog

6. Android LBS General Info on APIs

7. Killing Activity / onPause() / isFinishing()