question

odrobert avatar image
odrobert asked

Sending Notification while in FreeTime causes SecurityException?

Hi, Our app uses notifications in a few spots and we're seeing an unexpected error on a Kindle Fire HDX while in FreeTime mode. When NotificationManager.notify(id, notification) is called, a SecurityException occurs: java.lang.SecurityException: get application info: Neither user 1110000 nor current process has android.permission.INTERACT_ACROSS_USERS. This does NOT occur with either normal or restricted user accounts on Android 4.4.2 tablets. Is this a bug/quirk in Fire OS 3.0 or just the way user accounts worked in Android 4.2.x? The error is occurring on an 8.9 HDX running 14.33.1.0_user_310079820.
fire tablet
10 |5000

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

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Odrobert, Thank you for writing to us. I have sent you one sample app for notification test. Can you check that on your device? If the sample works, please share the relevant code (how you are sending the notification) with us.
10 |5000

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

odrobert avatar image
odrobert answered
Thanks for the sample. Your code also throws the SecurityException when I run it in FreeTime mode. Wrap the code that sends the notification in a Try Catch block with a general catch for Exception, debug the app while in FreeTime, and put a breakpoint on this line: mNotificationManager.notify(SIMPLE_NOTFICATION_ID, notifyDetails); When the notify is called, you should see the SecurityException that occurs: java.lang.SecurityException: get application info: Neither user 1110005 nor current process has android.permission.INTERACT_ACROSS_USERS. Message was edited by: odrobert
10 |5000

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

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Odrobert, Thank you for writing back. Yes I can see the same issue in Free Time mode. I am following up with the concerned team here before giving you the reply. Please wait.
10 |5000

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

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Odrobert, This issue is already reported to the team here and they have fixed it. The fix would be pushed to all devices very soon. Officially I am not supposed to post any date or ETA for the release. But it would happen in couple of days I hope. Thanks for the taking time to report the issue to us.
10 |5000

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