-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat/Update dependencies and add HMS support
- Loading branch information
1 parent
b591022
commit d9d888e
Showing
78 changed files
with
932 additions
and
575 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
include: package:flutter_lints/flutter.yaml | ||
|
||
linter: | ||
rules: | ||
avoid_void_async: true | ||
parameter_assignments: true | ||
prefer_final_in_for_each: true | ||
# override defaults from flutter_lints : | ||
avoid_renaming_method_parameters: false | ||
unnecessary_this: false | ||
|
||
analyzer: | ||
errors: | ||
parameter_assignments: error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Version update | ||
This guide will help you upgrade your Exponea SDK to the new version. | ||
|
||
## Updating from version 0.x.x to 1.x.x | ||
Changes you will need to do when updating Exponea SDK to version 1 and higher are related to firebase push notifications. | ||
|
||
### Changes regarding FirebaseMessagingService | ||
We decided not to include the implementation of FirebaseMessagingService in our SDK since we want to keep it as small as possible and avoid including the libraries that are not essential for its functionality. SDK no longer has a dependency on the firebase library. Changes you will need to do are as follows: | ||
|
||
1. You will need to implement `FirebaseMessagingService` on your android application side. | ||
2. Call `ExponeaPlugin.handleRemoteMessage` when a message is received | ||
3. Call `ExponeaPlugin.handleNewGmsToken` when a token is obtained | ||
4. Register this service in your `AndroidManifest.xml` | ||
|
||
```kotlin | ||
import android.app.NotificationManager | ||
import android.content.Context | ||
import com.exponea.ExponeaPlugin | ||
import com.google.firebase.messaging.FirebaseMessagingService | ||
import com.google.firebase.messaging.RemoteMessage | ||
|
||
class MessageService : FirebaseMessagingService() { | ||
private val notificationManager by lazy { | ||
getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager | ||
} | ||
|
||
override fun onMessageReceived(message: RemoteMessage) { | ||
super.onMessageReceived(message) | ||
ExponeaPlugin.handleRemoteMessage(applicationContext, message.data, notificationManager) | ||
} | ||
|
||
override fun onNewToken(token: String) { | ||
super.onNewToken(token) | ||
ExponeaPlugin.handleNewGmsToken(applicationContext, token) | ||
} | ||
} | ||
``` | ||
|
||
```xml | ||
... | ||
<application> | ||
<service android:name=".MessageService" android:exported="false" > | ||
<intent-filter> | ||
<action android:name="com.google.firebase.MESSAGING_EVENT" /> | ||
</intent-filter> | ||
</service> | ||
</application> | ||
... | ||
``` |
Oops, something went wrong.