Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
* Change min version to 26 so you can install on Android 8.0
  • Loading branch information
FabioCZ committed Jan 21, 2019
1 parent fa62e3e commit 23651c1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 19 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ android {
compileSdkVersion 28
defaultConfig {
applicationId "com.gottlicher.notifrepeater"
minSdkVersion 27
minSdkVersion 26
targetSdkVersion 28
versionCode 1
versionName "1.0"
versionName "1.1.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,8 @@
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.lang.reflect.Type;
import java.util.AbstractMap;
import java.util.ArrayList;
import java.util.Iterator;

public class AppHistoryHelper {
private final static String APPS_PREF_NAME = "APPS_PREF_NAME";
Expand Down Expand Up @@ -68,7 +62,7 @@ public static void addNotificationOccurence (Context context, String appName)
editor.apply();
}

public static ArrayList<AppInfo> getOccurences (Context context)
public static ArrayList<AppInfo> getOccurrences(Context context)
{
SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
String appsJson = sharedPrefs.getString(APPS_PREF_NAME, "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
import android.net.Uri;
import android.provider.Settings;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.content.LocalBroadcastManager;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
Expand All @@ -28,12 +26,7 @@
import android.widget.TextView;
import android.widget.Toast;

import org.w3c.dom.Text;

import java.util.AbstractMap;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;

// Dialog code from: https://github.com/Chagall/notification-listener-service-example
public class MainActivity extends AppCompatActivity {
Expand Down Expand Up @@ -100,7 +93,7 @@ private void populatePastAppsList(){
list.setHasFixedSize(true);
RecyclerView.LayoutManager lm = new LinearLayoutManager(this);
list.setLayoutManager(lm);
RecyclerView.Adapter ad = new PastAppsAdapter(AppHistoryHelper.getOccurences (this));
RecyclerView.Adapter ad = new PastAppsAdapter(AppHistoryHelper.getOccurrences(this));
list.setAdapter(ad);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package com.gottlicher.notifrepeater;

import android.app.Notification;
import android.app.PendingIntent;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.os.IBinder;
import android.service.notification.NotificationListenerService;
import android.service.notification.StatusBarNotification;
Expand Down

0 comments on commit 23651c1

Please sign in to comment.