Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xmlns:tools in AndroidManifest.xml #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,35 +25,40 @@ dependencies:
flutter_foreground_plugin: ^0.4.0
```

2. Add `xmlns:tools` under `<manifest xmlns:android="http://schemas.android.com/apk/res/android"`
```xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
```

2. Add permission for ForegroundService to AndroidManifest.xml
3. Add permission for ForegroundService to AndroidManifest.xml

```xml
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
```


3. Add service for ForegroundService to AndroidManifest.xml below `</activity>`
4. Add service for ForegroundService to AndroidManifest.xml below `</activity>`

```xml
<service android:name="changjoopark.com.flutter_foreground_plugin.FlutterForegroundService"/>
```

4. Add use-sdk under `application`
5. Add use-sdk under `application`

```
<uses-sdk
android:minSdkVersion="23"
tools:overrideLibrary="changjoopark.com.flutter_foreground_plugin" />
```

5. Add icon image for notification.
6. Add icon image for notification.

[Notification Icon Generator](https://romannurik.github.io/AndroidAssetStudio/icons-notification.html#source.type=clipart&source.clipart=ac_unit&source.space.trim=1&source.space.pad=0&name=ic_stat_ac_unit) will be helpful.

path: `android/app/src/main/res/drawable-*`

5. Write code for foreground service
7. Write code for foreground service

```dart
void main() {
Expand Down