On Jan 9, 11:24 am, kris <[email protected]> wrote: > You can set APN proxy using something similar to this. > > public int InsertAPN(String name, String apn_addr) > { > int id = -1; > ContentResolver resolver = this.getContentResolver(); > ContentValues values = new ContentValues(); > values.put("name", name); > values.put("apn", apn_addr); > final Uri APN_TABLE_URI = > Uri.parse("content://telephony/carriers"); > /* > * The following three field values are for testing in Android > emulator only > * The APN setting page UI will ONLY display APNs whose > 'numeric' filed is > * TelephonyProperties.PROPERTY_SIM_OPERATOR_NUMERIC. > * On Android emulator, this value is 310260, where 310 is > mcc, and 260 mnc. > * With these field values, the newly added apn will appear in > system UI.*/ > > values.put("mcc", "310"); > values.put("mnc", "260"); > values.put("numeric", "310260"); > values.put("proxy","10.102.24.60"); > Uri newRow = resolver.insert(APN_TABLE_URI, values); > Cursor c = null; > try > { > > if(newRow != null) > { > c = resolver.query(newRow, null, null, null, null); > Log.d("Krishna", "Newly added APN:"); > // printAllData(c); //Print the entire result set > > // Obtain the apn id > int idindex = c.getColumnIndex("_id"); > c.moveToFirst(); > id = c.getShort(idindex); > Log.d("Krishna", "New ID: " + id + ": Inserting new > APN succeeded!"); > } > } > catch(SQLException e) > { > Log.d("Krishna", e.getMessage()); > } > > if(c !=null ) > c.close(); > return id; > } > What are the parameters of function "InsertAPN" ,"name","apn_addr" ?I also didn't get the use of the uri "content://telephony/carriers".In this example you have set the proxy ip "10.102.24.60".Is it only http proxy or any kind of request from the device will pass through this server ?
Thanks & Regards, Arka -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

