Use info from `ApplicationStartInfo` API on Android 15
Problem Statement
Would like to have info provided in ApplicationStartInfo API on Android 15 available thru Sentry.
see https://developer.android.com/about/versions/15/features#app-start-info
Solution Brainstorm
You can use this with if( SDK >= 35 ) and still get useful data about application start up metrics for device running Android 15+.
Thanks @yogurtearl for the feature request - we discussed this (and other features based on new Android 15 APIs) and will likely implement this at some point.
How do you use ApplicationStartInfo ? I can't see any docs for how to get an instance of it
@AndroidDeveloperLB The ApplicationStartInfo can be received by registering a ActivityManager.addApplicationStartInfoCompletionListener hook, see the docs for more details.
@markushi Thank you! I can see detection of the reason of starting the app, but I can't find which app started it (when it's relevant). Is it possible?
@AndroidDeveloperLB I think what you're looking for is Activity.getReferrer(link). In which situations would this be useful for you?
@markushi Seems you are correct, but do I need to add visibility to the apps? I wonder if a simple launchable filter will be fine:
<intent>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent>
I think for most cases it should suffice. Anyway, thank you!
fwiw you can also retrieve it via getHistoricalProcessStartReasons, which would only return the app start infos for your app.
We'll investigate this more closely wrt which APIs make sense to use and what additional data they can provide. We'll follow up here
From @markushi
Let's add the ApplicationStartInfo as part of the App context. We also need to make the new attributes indexable, so we can filter and search for them.
Seems the [DEPRECATED] Mobile SDKs is deprecated, are still things on the backlog? @romtsn
@Angelodaniel yep, the project just moved, but things are still on the backlog