-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
feat(geofence): Adds geofence plugin #442
Conversation
Why is there an edit in the camera preview plugin? is that there by accident? |
Also, we can do something like this for the two methods you mentioned // add this to the top of the document
declare var window: any;
static onTransitionReceived(): Observable<any> {
return new Observable<any>((observer) => {
window.geofence.onTransitionReceived = observer.next.bind(observer);
return () => window.geofence.onTransactionReceived = undefined
// undefined can be replaced with ()=>{} .. whichever works better
});
} |
Oops must have cut the branch wrong. New commit reverts Camera Preview plugin for this branch to what's in master. |
@ihadeed I tried your suggestion for onTransitionReceived, but it returns a |
Are you using a Cordova decorator? You shouldn't use one On Aug 17, 2016 5:59 PM, "Alex Muramoto" [email protected] wrote:
|
Removed the Cordova decorator. Function now returns the Observable, but the observer is never called. |
Can you provide a code sample of how you're calling the plugin? On Aug 19, 2016 12:38 AM, "Alex Muramoto" [email protected] wrote:
|
Here's the plugin code:
And here's the code calling it, which should update a data binding in the view, but does not appear to:
|
Just fixed them. When we provide custom code for a wrapper we can't use |
Closes #314
Supports all Cordova plugin functions except:
-onTransitionReceived()
-onNotificationClicked()
These functions require the base window.geofence object to be modified directly. See https://github.com/cowbell/cordova-plugin-geofence#listening-for-geofence-transitions