-
Notifications
You must be signed in to change notification settings - Fork 762
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
Question: Compatibility with ExpoKit (Android) #152
Comments
also looking for a push lib after ejecting Expo. Had troubles with OneSignal so I wanted to try this one but it looks complicated as well. @Daadler6 if you have any idea on a working push solution with Expo SDK23 ejected I'm interested |
@slorber I was able to get this working with Expo! With that said it was anything but easy. I am going to attempt to explain the steps here so anyone in the future can look. But let me know if you have questions and i'll try and answer them. IOS:
Android:
This solves the issue mentioned above and will allow the app to work... but you will not be able to access the device_id in the Javascript code due to a bug with the library. I have detailed how I fixed this issue here: #109. Please let me know if this works for... specifically the fix for issue #109 if so I'll open a PR for Wix so we can get that issue closed. I haven't been able to validate the fix outside my codebase so I am looking for someone else to tell me that it worked for them. Thanks! |
thanks @Daadler6 I finally suceeded to make it work with OneSignal so I'm going to stick with it but this will certainly be helpful for others ejecting from Expo ;) |
Nice job @Daadler6! What Expo version are you using? I also have a detached Expo (ExpoKit) app with a custom solution for iOS using RN's PushNotificationIOS and now trying to find something similar for Android, would you recommend using Wix's solution or look for something else? |
@nirpeled - We are currently using Expo SDK 25. Haven't migrated over to 26 yet because of the React 16.3 upgrade and we want to leave ourselves enough time to remove all the deprecated lifecycles from our code. While, I was able to get this working using the code above for a POC I actually decided not to use in when it came time to build for production. Based on my findings it was just too much effort to get it working. We actually went with https://github.com/zo0r/react-native-push-notification and it works great with Expo (IOS and Android). Plus since you already have PushNotificationIOS setup you've done half the work! (it uses that lib (PushNotificationIOS) for the IOS part). |
@Daadler6 - Thanks for the quick response dude! Wow I'm so glad to actually find someone that is also using Expo 25 (ExpoKit) that managed to work with https://github.com/zo0r/react-native-push-notification - that was actually my first option on the list but was afraid it won't play nice with ExpoKit. How did you manage to skip the react-native link part? Did you do everything manually and it just worked? |
@nirpeled - I linked everything manually. I've found that using Expo |
@ChildishDanbino Hello, I have |
Adding ```
|
Our team has recently detached from Expo to Expokit to give us more control over the native modules we would like to use including push notifications. I am personally a big fan of this library and would love to use it if possible. iOS setup / installation was smooth but I am running into some issues on Android. Because the ExpoKit MainApplication.java looks as follows
if you notice the MainApplication doesn't implement the ReactApplication thus when we apply
new RNNotificationsPackage(MainApplication.this)
we get the errorjava.lang.IllegalStateException: Application instance isn't a react-application
.In short is this library compatible with ExpoKit and what would be the steps to get it up and running. I'd be willing to open a PR to update the docs once fixed. Thanks!
The text was updated successfully, but these errors were encountered: