-
Notifications
You must be signed in to change notification settings - Fork 509
Enable app events to be sent from the pixel for iOS and Android (#678) #732
Conversation
@msencer thx for the PR and for pinging me. First of all, it might take a while till merge because I don't have that much time, so sorry in advance for that, will try my best That being said, I add a look quick look to the PR, could you plz do the following first modifications:
Furthermore could you plz:
Finally:
Thx in advance |
Context appContext = cordova.getActivity().getApplicationContext(); | ||
Resources res = appContext.getResources(); | ||
int enableHybridAppEventsId = res.getIdentifier("fb_hybrid_app_events", "bool", appContext.getPackageName()); | ||
boolean enableHybridAppEvents = enableHybridAppEventsId != 0 && res.getBoolean(enableHybridAppEventsId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add some null check to the code in case the parameter would not be defined at all (shit happens you know)
enableHybridAppEventsId != 0
part does that for android
@peterpeterparker thanks a lot for the quick review, sorry that it took so long for me to address the points. I did most of the modifications you've asked and have some comments/questions on the others:
For Android; it is done by checking
I have the demo app working with my local fork, also added to the README.
It works only for cordova-ios >= 4.0.0 because of the WKWebView dependency. When I was testing for cordova-android v6 for instance, I came across with a similar problem to #705. I am pretty sure it is not related with the changes. Do you have any suggestions? thanks for looking into this, very much appreciated! |
Thx for the PR, improvements, answers and demo app, really cool 👍 I've merged this PR and released it in version v4.1.0 I've tested my app (Android and iOS) without AppEvents (backwards compatibility ok) and your demo repo (AppEvents enabled) and all seems fine. I hope I could count on you @msencer in case it would need support later on 😉 |
adding @peterpeterparker for the review :)