Thnaks to your reply :D. 2009/11/23 Dianne Hackborn <[email protected]>
> Sorry, applications can not modify secure settings. > > > On Thu, Nov 19, 2009 at 9:13 PM, krekar <[email protected]> wrote: > >> Hi. >> >> I wanna set the ADB_ENABLED and USB_MASS_STORAGE_ENABLED option >> automatically in my App. >> >> so i add below statement in my App(Activity). >> >> ---------------------- >> Settings.Secure.putInt(getContentResolver(), >> Settings.Secure.ADB_ENABLED, 0); >> >> or >> >> Settings.Secure.putInt(getContentResolver(), >> Settings.Secure.ADB_ENABLED, 1); >> ---------------------- >> >> and add below statement in my App(manifest). >> >> ---------------------- >> .... >> </application> >> <uses-permission android:name="android.permission.WRITE_SETTINGS" >> /> >> <uses-permission >> android:name="android.permission.WRITE_SECURE_SETTINGS" /> >> .... >> ---------------------- >> >> but some exception are occured in runtime like below. >> >> ---------------------- >> Uncaught hander: thread main exiting due to uncaught exception. >> java.lang.SecurityException: Permission denial: writing to secure >> settings requires android.permission.WRITE_SECURE_SETTINGS >> ... >> ---------------------- >> >> How i can use ADB_ENABLED and USB_MASS_STORAGE_ENABLED in my App? >> >> -- >> 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]<android-developers%[email protected]> >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en >> > > > > -- > Dianne Hackborn > Android framework engineer > [email protected] > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. All such > questions should be posted on public forums, where I and others can see and > answer them. > > -- > 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]<android-developers%[email protected]> > 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 [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

