Do not use uri's that are strings. You cannot be sure that your code will
work on all devices. Use the documented uris for all the system content
providers.

Kumar Bibek
http://techdroid.kbeanie.com
http://www.kbeanie.com



On Wed, Nov 24, 2010 at 11:11 PM, Dan <dan.schm...@gmail.com> wrote:

> I have code to get the current apn that looks like:
>
> private String m_apnString;
>
> private void updateApn(Context ctx) {
>   Cursor mCursor =
> ctx.getContentResolver().query(Uri.parse("content://telephony/
> carriers"), new String[] {"apn"}, "current=1", null, null);
>   if (mCursor!=null) {
>     try {
>           if (mCursor.moveToFirst()) {
>                m_apnString  = mCursor.getString(0);
>           }
>     } finally {
>          mCursor.close();
>    }
>  }
> }
>
> It seems to work on my test phone (htc hero) but I'm always getting
> a null string back from the new htc incredible.
>
> I've found:
>
>
> http://androidforums.com/incredible-support-troubleshooting/73550-incredible-apn-quick-settings-bug-mobile-data-switch-issue.html
>
> and my test user that reported the issue says all her text messages
> were erased.
>
> Has anybody else seen/resolved something like this?
>
> Thanks for your time!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to