implement notification channels, use system notification settings on android Oreo
This commit is contained in:
parent
7d7aeadd41
commit
30312e0e55
7 changed files with 192 additions and 68 deletions
|
@ -21,6 +21,7 @@ import android.content.Intent;
|
|||
import android.content.SharedPreferences;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.text.Spanned;
|
||||
import android.util.Log;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
|
@ -58,6 +59,9 @@ public class PullNotificationService extends IntentService {
|
|||
|
||||
@Override
|
||||
protected void onHandleIntent(Intent intent) {
|
||||
|
||||
Log.d("PullNotifications", "pulling for notification");
|
||||
|
||||
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(
|
||||
getApplicationContext());
|
||||
boolean enabled = preferences.getBoolean("notificationsEnabled", true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue