Comments (7)
Either, as long as the app has to start the lifecycle again (Android Application#onCreate, iOS didFinishLaunching). The underlying Airship SDK only supports being initialized once per app lifecycle at the moment. And once takeOff is called, we need to reinitialize the SDK during the beginning of the apps lifecycle in order to properly handle notifications.
If you are just avoiding hardcoding credentials in your app, I don't see any problems with this approach. If you are trying to change what Airship app you point to at runtime, thats where things don't work out as nicely.
In terms of an ETA, I can't really provide that right now. I might have some time to try to get it to work this week but it's not trivial what needs to be done. Ill keep you updated.
from airship-flutter.
Working on wrapping up the release. Hopefully we will have something this week.
from airship-flutter.
Its not possible right now in the plugin, but I will look into what it would take to make it possible. In our cordova plugin we make it possible to call takeOff from the cordova context, we then persist those config values. If takeOff is called again, the config wont take effect until next run. I assume that would work for you?
from airship-flutter.
@rlepinski first thanks for quick response. When you say next run, do you mean on cold start("kill" app and run it again) or you mean on warm start(restart and re-initialise). For my app is not acceptable to keep keys locally, so if you could expose takeOff() method it would be perfect. Do you have any ETA when you can apply this change?
from airship-flutter.
I made some progress but having issues deploying to devices for whatever reason so I have not been able to verify anything. I am pretty sure I can finish this up early next week and once its been code reviewed we will merge into main where at that point it will be just waiting to be released. We wont do an actual release for a few more weeks because we are trying to add support for a bunch of new things that we released recently, but you could point to main/sha with the change to start using it early.
https://github.com/urbanairship/airship-flutter/tree/GH-115
I am only exposing app key/secret in flutter for takeOff. The SDK will combine the config from the airship config properties with the key/secret in flutter and try to use that if it is valid. That way we can avoid trying to expose all options for both platforms in flutter.
Credentials in the airship config file take precedence. For example, If you hardcode developmentAppKey/Secret
but try to set a different set of credentials at runtime, they will be ignored for debug builds. Seemed useful to be able to override it like that but if you have other opinions I would love to hear them.
from airship-flutter.
@rlepinski this works for me. You can close this issue when new version with the changes is released. Any idea when it could happen?
from airship-flutter.
Fixed in 5.3.0
from airship-flutter.
Related Issues (20)
- Airship setUserNotificationsEnabled malfunction on Android HOT 1
- iOS push messages in foreground not working HOT 6
- iOS app icon badge behaves inconsistently HOT 1
- Android device debug issue HOT 5
- Android notifications are not displayed as Heads-up notifications HOT 2
- Airship.push.iOS.resetBadge is not calling the correct method name HOT 2
- Calling Airship.push.iOS.resetBadge crashes the app HOT 1
- Airship.messageCenter.onDisplay not parsing DisplayMessageCenterEvent properly HOT 2
- Crash on launch when using FlutterEngineGroup HOT 3
- Not able to get a push notification on my iOS device from a TEST Airship project HOT 5
- Push Icon Not Appearing in Android Release Build HOT 4
- Android: App is started by push message from terminated state HOT 2
- How to send a push notification prompt to a user and access the value in code on Android? HOT 5
- onPushReceived does run in background or terminated state in Iphone HOT 14
- iOS AirshipServiceExtension Example
- Push registration failed - Android HOT 5
- Airship initialization code stopping methodChannel of Flutter module HOT 2
- How to prevent a notification from showing HOT 3
- notificationId in PushPayload is null for iOS HOT 5
- setPaused and setDisplayInterval methods disappeared in version 7.8.0 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from airship-flutter.