Skip to content

Commit 11359ec

Browse files
committed
updated readme dependency and fixed android imports and build version typos
1 parent 1f3f0b5 commit 11359ec

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Or manual: add the latest version as dependeny to your package.json.
2929
},
3030
"dependencies": {
3131
...
32-
"react-native-local-notifications": "0.1.0",
32+
"react-native-local-notifications": "2.0.0",
3333
...
3434
}
3535
```

android/src/main/java/com/github/wumke/RNLocalNotifications/AlarmReceiver.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import android.app.Activity;
44
import android.app.ActivityManager;
5+
import android.app.Notification;
56
import android.app.NotificationChannel;
67
import android.app.NotificationManager;
78
import android.app.PendingIntent;

android/src/main/java/com/github/wumke/RNLocalNotifications/RNLocalNotificationsModule.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@ public void createAlarm(Integer id, String text, String datetime, String sound,
9292
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { //API LVL 23, Android 6
9393
alarmManager.setExactAndAllowWhileIdle (AlarmManager.RTC_WAKEUP, timeInMillis, mAlarmSender);
9494
}
95-
else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.L) { //API LVL 21, Android 5
95+
else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { //API LVL 21, Android 5
9696
AlarmManager.AlarmClockInfo info = new AlarmManager.AlarmClockInfo(timeInMillis, mAlarmSender);
9797
alarmManager.setAlarmClock (info, mAlarmSender);
9898

9999
}
100-
else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.K) { //API LVL 19, Android 4.4
100+
else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { //API LVL 19, Android 4.4
101101
alarmManager.setExact(AlarmManager.RTC_WAKEUP, timeInMillis, mAlarmSender);
102102
}
103103
else { //<19

0 commit comments

Comments
 (0)