Friday, 29 March 2019

Android Studio - How to set apps as default or let the user select the app?

Currently I try to create a bunch of simple android apps to replace the default apps with them.

I already saw in this post, how to set the SMS app as default:

<intent-filter>
  <action android:name="android.intent.action.MAIN" />
  <category android:name="android.intent.category.DEFAULT" />
  <data android:mimeType="vnd.android-dir/mms-sms" />
</intent-filter>

But I was wondering how to achieve the same for these apps:

  • Camera application (To take pictures)
  • Gallery/Photo application (To select and view images)
  • Contact application (To view, edit, delete and call contacts)
  • Telephone application (To call contacts/telephone numbers and receive incoming calls)
  • Internet browser application (To browse the internet)
  • Keyboard application (To write text - like in the default keyboard)
  • Launcher application (To display all installed apps on the home screen)

I already noticed, that it's nearly impossible to set the app as default app programmatically without the users interaction. This would be the main goal, but it would be also ok, if the user can choose, which application he want to use as default application. But I want to be sure, that the apps which I listed above are selectable. So my question is, what mime types I have to add to the intent filters in the android manifest file.



from Android Studio - How to set apps as default or let the user select the app?

No comments:

Post a Comment