To switch between two of your own Android apps using implicit intent, follow these steps:
<intent-filter>
<action android:name="com.example.myapp.ACTION_SWITCH" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
val intent = Intent("com.example.myapp.ACTION_SWITCH")
intent.setPackage("com.example.otherapp")
startActivity(intent)
Ensure that the receiving app is installed on the device, and that the package name in the Intent object matches the receiving app's package name.
Run both apps and invoke the Intent from the sending app to launch the receiving activity.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2023-05-21 07:21:22 +0000
Seen: 17 times
Last updated: May 21 '23
How can a ListView be utilized in a ScrollView without a Scrollbar?
How can I detect when someone clicks outside of an Android Compose ModalBottomSheetLayout?
What is the process to activate the screen time off feature in Android using AOSP customization?
What is the proper way to rotate the View Component in React Native for Android?
What is the process of using the Volley library to upload a file on Android?
Is it not possible to set another activity as the main activity in Android Studio?
How can I utilize xml to implement a color filter on an ImageView?