Skip to content

Commit

Permalink
fix: fix packetsReceiptNotificationsValue for Android
Browse files Browse the repository at this point in the history
  • Loading branch information
robsonos committed Jan 14, 2024
1 parent fdf116d commit e58d828
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"files.eol": "\n",
"files.insertFinalNewline": true,
"terminal.integrated.scrollback": 10000,
"terminal.integrated.defaultProfile.osx": "zsh",

// Todo tree settings
"todo-tree.general.tags": ["BUG", "HACK", "FIXME", "TODO", "INFO"],
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This guide provides instructions for contributing to this Capacitor plugin.

#### Android studio

Download and install [Android studio](https://developer.android.com/studio). The code has been developed using `Android Studio Giraffe | 2022.3.1 Patch 3`
Download and install [Android studio](https://developer.android.com/studio). The code has been developed using `Android Studio Hedgehog | 2023.1.1 Patch 1`

#### Xcode

Expand Down
12 changes: 7 additions & 5 deletions android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.plugin.nordicdfu">

<uses-permission android:name="android.permission.FOREGROUND_SERVICE_CONNECTED_DEVICE" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />

<application>
<service
android:name=".DfuService"
android:foregroundServiceType="connectedDevice" />
<activity android:name=".NotificationActivity"/>
android:foregroundServiceType="connectedDevice" />
<activity android:name=".NotificationActivity" />
</application>

<uses-permission android:name="android.permission.FOREGROUND_SERVICE_CONNECTED_DEVICE" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
</manifest>
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package com.example.plugin.nordicdfu;

import android.app.NotificationManager;

import android.content.Context;
import android.os.Build;
import android.os.Handler;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.getcapacitor.JSObject;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public void startDFU(PluginCall call) {
}

if (dfuOptions.has("packetsReceiptNotificationsValue")) {
starter.setPacketsReceiptNotificationsValue(dfuOptions.optInt("packetReceiptNotificationsEnabled"));
starter.setPacketsReceiptNotificationsValue(dfuOptions.optInt("packetsReceiptNotificationsValue"));
}

if (dfuOptions.has("forceDfu")) {
Expand Down

0 comments on commit e58d828

Please sign in to comment.