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. How to install Android?

Hello guys,

I am totally new to the world of Mobile Operating Systems. I would
like to install Android on my mobile phone, a Motorola Motozine. Is
this possible?
I made a search on Internet and I didn't even found the possibility of
installing the SysOp as a topic. This leads me to think that one
cannot install Android and that it can only be installed by the
manufacturer.

Please, correct me if I am wrong, I hope to be wrong

Claves

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

2. Gestures and ListView (as seen in a keynote of Google I/O)

Hi there!

I have seen a small scene from http://www.youtube.com/watch?v=S5aJAaGZIvk
at timecode 1:23:30 - letters are recognized by being drawn on the
screen. Does anybody know how this works, or where I can find an easy
example?


Great thanks in advance & regards

Marc Reichelt   ||   http://www.marcreichelt.de/
--~--~---------~--~----~------------~-------~--~----~

3. CheckBox with Background attribute renders incorrectly?

4. Use wifi for some request and UMTS for other requests

5. How to control the LED lighter

6. CheckBox with Background attribute renders incorrectly?

7. Display performances in the Gallery Widget, working with thumbnails.