This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-05-03
Channels
- # aws-lambda (6)
- # beginners (38)
- # boot (39)
- # cider (44)
- # cljs-dev (9)
- # cljsrn (96)
- # clojure (142)
- # clojure-dev (6)
- # clojure-dusseldorf (8)
- # clojure-greece (45)
- # clojure-ireland (3)
- # clojure-italy (7)
- # clojure-norway (6)
- # clojure-russia (26)
- # clojure-sg (16)
- # clojure-spec (31)
- # clojure-uk (39)
- # clojurescript (125)
- # cursive (38)
- # datascript (4)
- # datomic (18)
- # emacs (34)
- # figwheel (2)
- # hoplon (3)
- # immutant (23)
- # jobs (1)
- # lambdaisland (2)
- # lumo (13)
- # off-topic (77)
- # om (8)
- # onyx (9)
- # pedestal (2)
- # play-clj (1)
- # re-frame (52)
- # reagent (3)
- # rum (4)
- # spacemacs (2)
- # specter (4)
- # unrepl (37)
- # untangled (8)
- # vim (79)
- # yada (1)
hi all , does anyone here know how to implement the android part of this react-native-plugin (https://github.com/zo0r/react-native-push-notification ) in re-frame i have seen a bunch of examples that all only seem to implement the iOS part i cant see how to implement the class override specifically i know it mentions only if i did not use the link command manually , just not sure if that applies to re-frame or not, referring to this statement [Manually register module in MainApplication.java (if you did not use react-native link)]
@rc1140 We're using it and just using normal interop works well for us. Maybe you could share your code?
@vikeri hi , will try and get it uploaded now , but i didnt do much aside from create a new re-natal project and follow the instructions on the repo page
i think it may be related to the version of the google play gcm lib , but im not sure what version i should be using
i setup the require using this code , https://github.com/tiensonqin/lymchat/blob/master/src/lymchat/shared/ui.cljs
the https://github.com/zo0r/react-native-push-notification#android-manual-installation section seems to pretty clearly document how to add Android support. Are you getting an error of some sort or a specific question about how to make the changes to the Android project?
so i manually checked the MainApplication.java file and the required imports etc are there
and calling (.localNotification push-notification {params here}) to test it fails as well with , can not read property call null of undefined
I’m not seeing it in https://github.com/tiensonqin/lymchat/blob/master/android/app/build.gradle
yeah your latest code would be best, looks like AndroidManifest.xml
is missing some stuff too but not sure if you have it locally?
ok here you go , https://gitlab.com/rc1140/canary-echo
i also expect a println from the onRegister here , https://gitlab.com/rc1140/canary-echo/blob/master/src/canary_echo_mobile/android/core.cljs#L26
setting up notifications
figwheel-bridge.js:172 #js {:handler #object[NotificationsComponent [object Object]], :onRegister #object[Function "function (token){
return cljs.core.println.call(null,token);
(def push-notification (.-default (js/require "react-native-push-notification")))
or (def push-notification (.-PushNotification (js/require "react-native-push-notification")))
yeah, you had it right first, i didn’t catch that it was actually calling your onRegister
that’s this one https://github.com/zo0r/react-native-push-notification/blob/master/index.js#L189
the ideal solution would be to include your configure in a re-frame effect i would think
gonna wait on @vikeri at this point , im pretty KO and not getting this working is just frustrating
one last suspicious piece is that you’re importing a mutable js object and i’m just not sure how that ends up translating
also every example has been demonstrated using ios , really wonder if it even works with android