[android-developers] DevicePolicyMgr resetPassword requires android.permission.WRITE_SECURE_SETTINGS on 3.0?

2011-04-14 Thread kl4232
When calling the DevicePolicyManager.resetPassword(newPassword, 0), on the 3.0 emulator I get a security exception thrown... 04-14 14:02:46.580 E/AndroidRuntime( 6223): java.lang.SecurityException: Permission Denial: writing com.android.providers.settings.SettingsProvider uri

[android-developers] Disable open button after programmatic install?

2011-04-08 Thread kl4232
I'm installing a bunch of apps programmatically, using: Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(Uri.fromFile(fileToCopy), application/ vnd.android.package-archive); startActivityForResult(intent, requestCode); I dont want the user to launch these apps until I''m

[android-developers] caching TelephonyManager and other managers

2011-02-04 Thread kl4232
I user a bunch of managers in my app, like TelephonyManager, ConnectivityManager, LocationManager and a few more. I initialise these in my onCreate() of my service and use them later on. I'm wondering if this is the correct approach. Should I be initializing each manager as I need it, or is it ok

[android-developers] DevicePolicyManager and wipeData()

2011-01-19 Thread kl4232
Hi I have 2 apps. One is a regular app with a UI. I've made it a device administrator which has been granted the wipeData permission. The other is a service, with no UI. I want to call wipeData() from my service. If I simply call DevicePolicyManager dpm =

[android-developers] Re: DevicePolicyManager and wipeData()

2011-01-19 Thread kl4232
I'd like to apply a correction: When I sign both the regular and the service apps with the same signature, only the regular app shows up as a device administrator. As it should be. On Jan 19, 1:57 pm, kl4232 klavin4...@yahoo.com wrote: Hi I have 2 apps. One is a regular app with a UI. I've made

[android-developers] Setting multiple RTC_WAKEUP alarms from a single app

2011-01-15 Thread kl4232
I have an app which I want to have 3 wake-up alarms to schedule 3 features of the app. They are all set the same way. m_intentName = com.mypackage.+ FeatureName; m_alarmIntent = new Intent(m_intentName); m_alarmPendingIntent = PendingIntent.getBroadcast(this, 0, m_alarmIntent, 0); When I

[android-developers] Setting multiple RTC_WAKEUP alarms from a single app

2011-01-15 Thread kl4232
I have an app which I want to have 3 wake-up alarms to schedule 3 features of the app. They are all set the same way. m_intentName = com.mypackage.+ FeatureName; m_alarmIntent = new Intent(m_intentName); m_alarmPendingIntent = PendingIntent.getBroadcast(this, 0, m_alarmIntent, 0); When I

[android-developers] Re: Setting multiple RTC_WAKEUP alarms from a single app

2011-01-15 Thread kl4232
unique for each alarm you want to set - three alarms, three request codes, three unique PendingIntents. -- Kostya 2011/1/15 kl4232 klavin4...@yahoo.com I have an app which I want to have 3 wake-up alarms to schedule 3 features of the app. They are all set the same way

[android-developers] Re: Setting multiple RTC_WAKEUP alarms from a single app

2011-01-15 Thread kl4232
Although the docs for pendingIntent.getBroadcast state that... requestCode Private request code for the sender (currently not used). On Jan 15, 10:07 am, kl4232 klavin4...@yahoo.com wrote: Thank you for this. I accidently posted my question before I was finished composing it. So having

[android-developers] Query result of application install

2010-12-15 Thread kl4232
I'm installing an app as follows... Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(Uri.fromFile(myFile), application/ vnd.android.package-archive); startActivityForResult(intent, INSTALL_COMPLETED); And I'd like to know whether the user pressed install or cancel when

[android-developers] Code to perfoem a factory reset in 2.1 and below

2010-11-17 Thread kl4232
Do you know if there is a way to perform a factory reset of a handset from code, in 2.1 and below. I see 2.2 has a wipeData() api. Is there intent etc I can use in 2.1 to cause a factory reset? -- You received this message because you are subscribed to the Google Groups Android Developers group.

[android-developers] Force all tabs in a TabActivity to initialise

2010-11-15 Thread kl4232
I have a TabActivity class that has 3 tabs on it. Typically you pick 1 to be currently active and it initializes. Only when you select another tab is that one initialized. Is there any way to force all 3 tabs to initialize onstartup. Calling setCurrentTab(0); setCurrentTab(1); setCurrentTab(2);

[android-developers] Calling wipeData from a service

2010-11-11 Thread kl4232
I have an app which just has a service in it. So it doesnt have an activity. I want to call the wipeData() api from it. I have followed an example which sets up the DevicePolicyManager from inside the onCreate of an Activity class. That works fine. Q1: My example only works if the

[android-developers] Starting a service in another applicaion

2010-11-10 Thread kl4232
I have 2 applications. The first is a standard activity with a start service button. The second is a service only application. It has no activity. It does have a receiver which listens for the BOOT_COMPLETED intent. After I've installed both applications on my handset I run the first app. When I

[android-developers] How to detect that Force Stop was called

2010-11-10 Thread kl4232
Is there any way for a process to detect that its being stopped as a result of the user going to Settings-Applications-Manage Applications-My App-Force Stop? I see onDestroy() isnt being called under those circumstances. Thanks -- You received this message because you are subscribed to the