Skip to content

Commit

Permalink
add drawable, init in onCreate
Browse files Browse the repository at this point in the history
  • Loading branch information
HeyAlex committed Mar 6, 2020
1 parent 2da2974 commit 164db75
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package heyalex.widgethelper

import android.R
import android.annotation.TargetApi
import android.app.Notification
import android.app.NotificationChannel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
import java.lang.annotation.AnnotationFormatError;
import java.util.Arrays;

import androidx.annotation.Nullable;

/**
* Update Service that helps update widget by ComponentName and Ids
*/
Expand All @@ -38,10 +40,15 @@ public class WidgetUpdateService extends IntentService {

public WidgetUpdateService() {
super("WidgetUpdateService");
setIntentRedelivery(true);
}

@Override
public void onCreate() {
super.onCreate();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
startForeground(NOTIFICATION_ID, NotificationDelegate.getNotification(this));
}
setIntentRedelivery(true);
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="#FFFFFF">
<group android:scaleX="0.84249085"
android:scaleY="0.84249085"
android:translateX="1.8901099"
android:translateY="1.8901099">
<path
android:fillColor="@android:color/white"
android:pathData="M12,4L12,1L8,5l4,4L12,6c3.31,0 6,2.69 6,6 0,1.01 -0.25,1.97 -0.7,2.8l1.46,1.46C19.54,15.03 20,13.57 20,12c0,-4.42 -3.58,-8 -8,-8zM12,18c-3.31,0 -6,-2.69 -6,-6 0,-1.01 0.25,-1.97 0.7,-2.8L5.24,7.74C4.46,8.97 4,10.43 4,12c0,4.42 3.58,8 8,8v3l4,-4 -4,-4v3z"/>
</group>
</vector>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 164db75

Please sign in to comment.