I cant find any refrence to call the Intent screen "Choose screen lock".
Cant find anything?
Any idea?
You can call action DevicePolicyManager.SET_NEW_PASSWORD to send user to lock screen settings fragment (firstly he will have to type current password/pattern for secure lock types):
Intent intent = new Intent(DevicePolicyManager.ACTION_SET_NEW_PASSWORD);
startActivity(intent);
There is none. You can view all possible Intents in android's source code: https://github.com/android/platform_packages_apps_settings/blob/master/AndroidManifest.xml
EDIT:
It turns out that this had been added in Version 2.2 of Android.
Please ee pleczko's answer below.
Before Android 2.2 there is no intent to do this.
Related
i am amateur in android
i want to take a screenshot from dial activity of user`s phone,
i use this for going to dial page
Intent call = new Intent(Intent.ACTION_DIAL);
startActivity(call);
what is the best way for get screenshot without root? and we should write the code inside onPause() method? because our app is paused when we go to an intent
You can use this library for getting screen shot
Link
hope it help
How to open the Apps | Widget screen?
I mean this screen
Got the issue, basically all you have to do is make an intent that chooses this.
Intent homeScreenIntent = new Intent(Intent.ACTION_MAIN);
homeScreenIntent.addCategory(Intent.CATEGORY_LAUNCHER);
homeScreenIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(homeScreenIntent);
Hope it helps.
Won't recommend but seems one of this will work but be careful:
moveTaskToBack(true) // Pushes the activity in stack to back.
and
finish() // Kills the app
Reference: Dev blog
Is there any intent or method to get the values which show in the usage statistics? We can get that manually by dialing secret code ##4636##
Intent in = new Intent(Intent.ACTION_MAIN);
in.setClassName("com.android.settings", "com.android.settings.UsageStats");
startActivity(in);
This will shows the UsageStatitics Activity. But i need to show in my application not in the default..
Thanks
There is a way, but it requires being a system app. Also, since it's very hack-y, it might not work on some devices. Anyway, here it is:
http://jhshi.me/2014/04/02/get-package-usage-statistics-in-android/
or:
http://www.phonesdevelopers.com/1816323/
I am using the intent with ACTION_CALL to make call in my app:
str="tel:0123456789";
Intent intent = new Intent(Intent.ACTION_CALL);
intent.setData(Uri.parse(str));
startActivity(intent);
But it pops up the system dialing screen. I understand this is built into ROM and can not be customized. But Can I hide this screen and keep the user staying on my activity?
Did some googling and research here. But no clear answer so far.
It looks like you can't customize the dialing screen, but you can use a PhoneStateListener to get certain information about the phone call. See this link.
i tried since many hours to launch navigation from my app.
I want navigation without destination.
i tried with
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse("google.navigation:q="));
startActivity(i);
That launches navigation but with destination not found
I tried too to launch processName, packageName with startIntent with com.google.android.apps.maps,
com.google.android.apps.maps:driveabout and
**com.google.android.maps.driveabout.app.DestinationActivity
with no succes too :/
an idea ?
Google Navigation does not have any documented and supported Intent filters. It is not designed to be integrated from third party apps.
The following code should work...
String url = "google.navigation:q="+startPos.getLatitude()+","+startPos.getLongitude();
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
startActivity(i);
Take a closer look a the intent filter for Google Navigation. It could be that it is not designed to be started via Intent without a specified destination. Unfortunately, i don't know where to find information about Google Navigation's intent filter, but if you were to show me where you are looking i could help you figure it out.
Try using
google.navigation:fd=true
i don't want to integrate it, i just want to launch it like a click on the list of apps whith a home launcher.
I've tried the google home sample, and navigation can be launched.
but i don't understand why that doesn't work with my own app :/