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. Does anyone use the Browser on their G

I find that it can be a bit slow.   I feel that the "zoom" icons and the box
thingy are a waste of screen real estate - that and they tend to get in the
way at the worst time.  I use it mainly to read up on the news, it kind of
OK for that (wait for page to load then read, wait for next page ...).
Attempting to shop for anything with it tends to be tedious so I avoid it.
I really like the fact that I can click on a phone number and it will
instantly call it.  I use this feature a lot.

i++









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

2. Strange Disappearances

MASHUPS

Androidology - Part 1 of 3 - Architecture Overview
http://www.youtube.com/watch?v=Mm6Ju0xhUW8

In one of these 3 Videos I remember Mike Cleron saying that he thinks
what will be Popular for Android is the combo of Location, Maps, RPC,
etc. to create Mashups. Now I don't see where he says that, as if it's
been edited out.

---

ADC II

On the Developer Roadmap it says there will be an announcement
regarding ADC II. But I don't remember hearing anything. Neither did
anyone ask why there wasn't any mention of it.

Q4 2008 - Key Announcement on Android Developer Challenge II
http://code.google.com/android/roadmap.html

---

DEVICE-TO-DEVICE (RPC) MECHANISM

In August this was on the Android Developers Blog. I haven't heard
any
more on it.

"One of our top priorities after the first devices ship is to develop
a device-to-device (and possibly device-to-server) RPC mechanism that
is fast, reliable, and protective of developers and users alike."
http://android-developers.blogspot.com/search?q=rpc

---


- Juan T.
--~--~---------~--~----~------------~-------~--~----~

3. Does anyone use the Browser on their G

4. Editing XML files using DOM in Android

5. Android design question

6. startActivityForResult problems

7. SSL client authentication