liato / android-bankdroid

A swedish banking application for your Android device.
http://www.swedroid.se/forum/showthread.php?t=11108
Other
243 stars 173 forks source link

Doze issues? #577

Closed shellstrom closed 7 years ago

shellstrom commented 8 years ago

Ever since I got Marshmallow on my N6 I very frequently have to re sign in to allow for widgets to update (all the widgets get exclamation marks on them). Pre-Marshmallow this seemed to work more or less flawlessly. I suspect the problems I'm seeing is a result of the newly introduced Doze feature which Bankdroid hasn't been adapted to accommodate for yet.

fredrike commented 8 years ago

In API 23 the notifications needs to be re-written..

Something like this:

@@ -122,7 +123,13 @@ public class AutoRefreshService extends Service {
         final PendingIntent contentIntent = PendingIntent.getActivity(context, 0,
                 new Intent(context, MainActivity.class), 0);

-        notification.setLatestEventInfo(context, bank.getDisplayName(), text, contentIntent);
+        NotificationCompat.Builder nB = new NotificationCompat.Builder(context);
+        nB.setContentText(text);
+        nB.setContentTitle(bank.getDisplayName());
+        nB.setContentIntent(contentIntent);
+
goober commented 7 years ago

@fredrike Do you know the status on this one? Did you do the necessary updates?

fredrike commented 7 years ago

Closed by cc2647dfddc6e57d294186f3a05b30a21cb1b992