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. GeoPoint in Maps API - use of micro degrees

I'm curious,  why does GeoPoint uses micro degrees ( Ex: lat/lng *
1000000 ) versus just a double lat/lng ?

Thanks,
Dave

-- 

2. Smartphone Noobs

With new Android sales I seem to be getting some customers that don't 
know the phone very well. On one of my programs a customer who at least 
emailed my support email wanted some features the program already had.  
I told him it was under "Menu" and "Settings" in the program.  He then 
wrote back and said there was no "Menu" button in the program which then 
I realized he didn't understand I was talking about where it says Menu  
below the screen.  Once I pointed that out to him he was happy.


Also others complained there is no Help in the program and again there is. In fact there are two Help items: one that comes with the program and an Online Help where I can update and address issues as they pop up. Some people don't think there is a menu or setting because the program launches with a splash menu page and settings have more to do with what the program generates so it available on that display. I'm either going to add a Help on the splash menu screen that just tells them where help and settings are or put a note about it on that splash screen which I would prefer to be lean and to the point. These things did not pop up until recently so there are most likely people who have never had a smartphone before. I noticed looking at apps and design recommendations apps were more supposed to be "exploratory" and it was a waste of time to do much in the way of a "Help". I still provide a Help section but try to keep short and to the point. Coming from the shrink wrap software industry we often found that Help was never read anyway given the support calls we would get and even making sure our writers did good manuals. Brian Conrad JyotishTools.com --

3. can a Service call startService() on itself?

4. How to Access voice call stream in real time

5. ADB, HTC Hero and 2.1 Update

6. onActivityResult never called on ActivityGroup

7. options menu problem