I want to launch the phone application on the phone as an intent
I am using this code
startActivity(getPackageManager().getLaunchIntentForPackage("com.android.phone"));
but the function throws an nullpointer excaption so there is no launchable itent but how can i launch it to make the user watch the telephonylogs
I managed to answer my question thanks for your answers the didn't exactly met the thing I wanted but on base of tham I figured it out
I just had to call
Intent intent = new Intent(Intent.ACTION_DIAL);
startActivity(intent);
to open only the phone application
You need permissions for certain ones ...better off doing
Intent intent = new Intent(Intent.ACTION_MAIN, null);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
List<ResolveInfo> packs = mContext.getPackageManager().queryIntentActivities(intent, PackageManager.PERMISSION_GRANTED);
and then you got the list of things you have permission for and then sort through this to launch.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With