You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refrain from catching an exception while trying to open an activity and falling back to a different one then. The "cleaner" alternative would be to check which one of the activities is actually present beforehand, without having to trigger an exception. But this really shouldn't affect the UX, so it doesn't really matter that much. Though the current fallback will very soon become the primary activity, as Huawei devices get updated.
Intent intent = new Intent();
intent.setComponent(new ComponentName(packageName, componentName));
if (intent.resolveActivity(context.getPackageManager()) != null) {
// the intent is exist
}
The text was updated successfully, but these errors were encountered:
It checks the existence of the activities before attempting to open them. Now if the activity can really not be opened, getAutoStartPermission will return false. Related issues:
judemanutd#29judemanutd#30
isAutoStartPermissionAvailable is checking the existence of the activity in order to avoid 'false positives' when the library is not able to open a specific settings screen.
Inverted the Huawei intents to process the newer ones first (I didn't invert the rest of the manufacturers as I can't test all of them). This fix known issue with Huawei P 10 Lite
judemanutd#38 (tested)
Use Build.BRAND.toLowerCase(Locale.ROOT) to avoid issues with certain languages as Turkish as mentioned here:
judemanutd#66 (tested)
Includes FLAG_ACTIVITY_NEW_TASK so that it can be called outside an Activity.
Fixed this:
judemanutd#62
Add a new activity to be opened in Samsung devices as:
This one open the exact Sleeping Apps setting
com.samsung.android.lool/com.samsung.android.sm.battery.ui.usage.CheckableAppListActivity
While this one opens the main battery settings
com.samsung.android.lool/com.samsung.android.sm.battery.ui.BatteryActivity
That should fixes theses (Tested with Note 8, Note 9 & Note 20):
judemanutd#37judemanutd#33
Original Issue : #27
Helper Issue : #29
Code snippet that should help
The text was updated successfully, but these errors were encountered: