question

gedu07 avatar image
gedu07 asked

Lollipop - UsageStatsManager

Hi, I'm using this action intent (Settings.ACTION_USAGE_ACCESS_SETTINGS) to send the user to enable the Data Usage of my app. But in the kindle fire 5.0.1 that section doesn't exist, so i'm sending the user just to setting and he can't enable the data usage, so my app won't work. Is a workaround for this? Thanks
fire tablet
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

justin avatar image
justin answered
Hi gedu07, There is no direct action to access the Usage Access Settings in Lollipop. Instead, please try accessing the intent instead: [code]Intent intent = new Intent(); intent.setComponent(new ComponentName( "com.android.settings", "com.android.settings.Settings$DataUsageSummaryActivity"));[/code]
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

gedu07 avatar image
gedu07 answered
Thanks for the tip, I just tried and send me to a black screen with un-clickable buttons. Thanks anyway
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.