Start alarm service as non-foreground - 2.8 🚀

Closes #209
This commit is contained in:
Brandon Presley 2023-11-28 10:58:30 +13:00
parent 3ed87114d2
commit 8e9a6be85d
4 changed files with 6 additions and 6 deletions

View File

@ -85,8 +85,8 @@ android {
applicationId "com.massive" applicationId "com.massive"
minSdkVersion rootProject.ext.minSdkVersion minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 36222 versionCode 36223
versionName "2.7" versionName "2.8"
} }
signingConfigs { signingConfigs {
release { release {

View File

@ -141,7 +141,7 @@ class AlarmModule constructor(context: ReactApplicationContext?) :
@RequiresApi(Build.VERSION_CODES.O) @RequiresApi(Build.VERSION_CODES.O)
override fun onFinish() { override fun onFinish() {
val context = reactApplicationContext val context = reactApplicationContext
context.startForegroundService(Intent(context, AlarmService::class.java)) context.startService(Intent(context, AlarmService::class.java))
context context
.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter::class.java) .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter::class.java)
.emit("tick", Arguments.createMap().apply { .emit("tick", Arguments.createMap().apply {

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "massive", "name": "massive",
"version": "2.6", "version": "2.7",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "massive", "name": "massive",
"version": "2.6", "version": "2.7",
"license": "GPL-3.0-only", "license": "GPL-3.0-only",
"dependencies": { "dependencies": {
"@babel/plugin-proposal-class-properties": "^7.18.6", "@babel/plugin-proposal-class-properties": "^7.18.6",

View File

@ -1,6 +1,6 @@
{ {
"name": "massive", "name": "massive",
"version": "2.7", "version": "2.8",
"private": true, "private": true,
"license": "GPL-3.0-only", "license": "GPL-3.0-only",
"scripts": { "scripts": {