Plotprojects / plot-phonegap-plugin

PhoneGap/Cordova/Ionic for Plot
Other
13 stars 10 forks source link

Can't receive notifications #1

Closed hsmith825 closed 9 years ago

hsmith825 commented 10 years ago

My setup is as follows:

  1. Installed the cordopha plugin using CLI on my iPad using my application which is a released iPone app. I know ithe plugin is working because it ask to use my location and I get Plot| Acquired location: 37.138992,-121.610020. 2.Use my iPhone as an iBeacon using PilotBeaconBrodcastExample. Broadcast indicates the configuration is Enabled.
  2. I defined one of my iBeacons with the configuration in the broadcast example.
  3. In my code I have a plot.filterCallback and a plot.notificationHandler. Neither are invoked.

I do not receive a notification.

Any ideas of what the problem is?

Thanks! howard

markvandertol commented 10 years ago

Are you sure you have added a notification to your iBeacon? We separate the definition of the beacons and the notifications, to make it easier to add new notifications to these beacons in the future.

You can add a notification to an iBeacon in the "Manage notifications" section by clicking "Create notification" and choosing for "Select existing iBeacon". Note that it may take some time before changes in our dashboard are propagated to the phones.

hsmith825 commented 10 years ago

Hi Mark,

I had not set the message up correctly. It is now setup as you suggested. However, I still am not getting the notifications. Listed below are details of my testing devices:

iPhone (IOS7) as the broadcaster. iPhone display “Enabled” and the configuration which I included in the iBeacon on my pilot project dash. I think the broadcaster works find on the iPhone.

I am listening from an iPAD2 (IOS7) and a Samsung Galaxy S5( Android 4.4.2). I keep the iPad connected to the MAC Xcode so I can see what is going on. The Cordova plugin is initiated and periodically displays the location of the iPad which it prints on the console. There are no alert messages displayed on the iPad. On the Android phone. The plugin appears to initiate but there is no location display on the console. Does Cordova plugin fully support Android.

Any help is appreciated!

Thanks!

Howard

From: Mark van der Tol [mailto:notifications@github.com] Sent: Tuesday, July 01, 2014 1:12 AM To: Plotprojects/plot-phonegap-plugin Cc: hsmith825 Subject: Re: [plot-phonegap-plugin] Can't receive notifications (#1)

Are you sure you have added a notification to your iBeacon? We separate the definition of the beacons and the notifications, to make it easier to add new notifications to these beacons in the future.

You can add a notification to an iBeacon in the "Manage notifications" section by clicking "Create notification" and choosing for "Select existing iBeacon". Note that it may take some time before changes in our dashboard are propagated to the phones.

— Reply to this email directly or view it on GitHub https://github.com/Plotprojects/plot-phonegap-plugin/issues/1#issuecomment-47628601 . https://github.com/notifications/beacon/1394060__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcxOTgyMTUxNiwiZGF0YSI6eyJpZCI6MzU5Mjc3NDZ9fQ==--638d4bcb3a1ede245db079603b0831c6033681bc.gif

markvandertol commented 10 years ago

Hi Howard,

iPad has support for iBeacons from the 3rd generation. So iBeacons won't work with an iPad 2.

Our plugin does support Android. The Android version currently prints less than the iOS version in the console. The Android version currently doesn't support iBeacons. When you keep having trouble receiving your location on Android, you could try restarting your phone. Sometimes the non-gps based location services will freeze.

I hope this helps, Mark

hsmith825 commented 10 years ago

Hi Mark,

Thanks for the input. I will stop testing with the iPad2. I have tested also with two iPhones both running ios7. I think there is something wrong with my setup. Let me review with you my understanding of how this works.

I created an iBeacon in pilot dashboard with the same configuration that is in the broadcast example: UUID: B9407F30-F5F8-466E-AFF9-25556B57FE6D, marjorid: 4, minorid: 4. I assume this is the configuration of my iPhone (running the broadcast example).

I created a message and assigned it to the iBeacon.

I setup my application by adding the following Javascript:

function onLoad() {

                document.addEventListener("deviceready", onDeviceReady, false);

}

// Cordova is loaded and it is now safe to make calls Cordova methods

//

function onDeviceReady() {

var plot = cordova.require("cordova/plugin/plot");

var config = plot.exampleConfiguration;

config.publicKey = "yMe7sDxZwgQ7v74k"; //put your public key here

plot.init(config);

}

//Added to IOS only. Do something before the user see the beacon notification. Could send another message

plot.filterCallback = function(notifications) {

for (var i = 0; i < notifications.length; i++) {

    notifications[i].message = "Welcome home";

    console.log("plot.filterCallback2");

    notifications[i].data = "http://www.flickitt.com";

    }

return notifications;

};

//Do something afteer the notification is displayed.

plot.notificationHandler = function(notification, data) {

console.log("plot.notificationHandler");

alert(data);

}; 

I was hoping I could get pilots software working before our iBeacons arrive but I am getting pretty frustrated. We just can’t seem to get it working.

Thanks for your assistance.

Howard

From: Mark van der Tol [mailto:notifications@github.com] Sent: Wednesday, July 02, 2014 12:57 AM To: Plotprojects/plot-phonegap-plugin Cc: hsmith825 Subject: Re: [plot-phonegap-plugin] Can't receive notifications (#1)

Hi Howard,

iPad has support for iBeacons from the 3rd generation. So iBeacons won't work with an iPad 2.

Our plugin does support Android. The Android version currently prints less than the iOS version in the console. The Android version currently doesn't support iBeacons. When you keep having trouble receiving your location on Android, you could try restarting your phone. Sometimes the non-gps based location services will freeze.

I hope this helps, Mark

— Reply to this email directly or view it on GitHub https://github.com/Plotprojects/plot-phonegap-plugin/issues/1#issuecomment-47747081 . https://github.com/notifications/beacon/1394060__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcxOTkwNzA0NiwiZGF0YSI6eyJpZCI6MzU5Mjc3NDZ9fQ==--af052b6210fc580d02a6af4447dc9fbf71cf05a8.gif

markvandertol commented 10 years ago

Hi Howard,

Some basic checks:

Furthermore, you have put assignment of the filterCallback and the notificationHandler at a place where plot is in scope, for example in onDeviceReady.

Mark

hsmith825 commented 10 years ago

Hi Mark,

Our iBeacons arrived from Kontakt so we have switched from using your applications to using the actual iBeacons. We did not have very good success using an iPhone as an iBeacons. We did manage to get notifications periodically but not predictably. The major problem we had was not having filterCallback and the notificationHandler in scope.

Two questions:

  1. Do you support the  iBeacons?
  2. You indicated you did not support Android iBeacons but on your site Plot indicated you do.  Which is it?

Thanks!

Howard

From: Mark van der Tol [mailto:notifications@github.com] Sent: Thursday, July 03, 2014 1:21 AM To: Plotprojects/plot-phonegap-plugin Cc: hsmith825 Subject: Re: [plot-phonegap-plugin] Can't receive notifications (#1)

Hi Howard,

Some basic checks:

Furthermore, you have put assignment of the filterCallback and the notificationHandler at a place where plot is in scope, for example in onDeviceReady.

Mark

— Reply to this email directly or view it on GitHub https://github.com/Plotprojects/plot-phonegap-plugin/issues/1#issuecomment-47879392 . https://github.com/notifications/beacon/1394060__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcxOTk5NDg2OCwiZGF0YSI6eyJpZCI6MzU5Mjc3NDZ9fQ==--532203883c1963e9aefbd37b41e032d2fbd50fac.gif

hsmith825 commented 10 years ago

Hi Mark,

I think I am setting notifications incorrectly. I want my customers to get a notification even if they come near my iBeacons multiple times per day. I set up the notifications per iBeacon as follows:

  1. Defined 24 messages per iBeacon
  2. Start date July 4 2014.  
  3. One notification per hour with no end time.
  4. I check the allow notification multiple times with = 1
  5. I am using Kontakt iBeacons

However, notifications to my iPhone only occur, at best, once a day.

Are we setting up notifications correctly?

Thanks!

Howard

From: Mark van der Tol [mailto:notifications@github.com] Sent: Thursday, July 03, 2014 1:21 AM To: Plotprojects/plot-phonegap-plugin Cc: hsmith825 Subject: Re: [plot-phonegap-plugin] Can't receive notifications (#1)

Hi Howard,

Some basic checks:

Furthermore, you have put assignment of the filterCallback and the notificationHandler at a place where plot is in scope, for example in onDeviceReady.

Mark

— Reply to this email directly or view it on GitHub https://github.com/Plotprojects/plot-phonegap-plugin/issues/1#issuecomment-47879392 .https://github.com/notifications/beacon/1394060__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcxOTk5NDg2OCwiZGF0YSI6eyJpZCI6MzU5Mjc3NDZ9fQ==--532203883c1963e9aefbd37b41e032d2fbd50fac.gif

markvandertol commented 10 years ago

Hi Howard,

You are setting up your beacons correctly. When you leave your phone idle it is possible that indeed no notification is triggered. This is a limitation of iOS. Often opening the lock screen is enough for the notification to be shown.

Android is currently not supported.

Mark

hsmith825 commented 10 years ago

Hi Mark,

I am receiving notifications now. My biggest problem was internalizing that iBeacon notifications are only sent once and I must wait a while for new notifications to start displaying. Thanks for your help!

I am using the PhoneGap plugin on iPhone. I have a couple of questions:

  1. My app is used in shopping malls where my retailers’ customers may go in and out of a store several times in a day.  I would like to know each time they are in the proximity of the iBeacon.  However, a notification will only respond once a day.  How would you suggest I set things up so that the customer gets a notice each time they are in the proximity of a particular iBeacon and the app is notified no matter how many times that occurs? 
  2. How can I determine if a customer left the proximity of an iBeacon?
  3. Any idea when Plot will support iBeacons on Androids?  We release in August and we would like to provide support for Androids

Thanks

Howard

From: Mark van der Tol [mailto:notifications@github.com] Sent: Monday, July 07, 2014 2:39 AM To: Plotprojects/plot-phonegap-plugin Cc: hsmith825 Subject: Re: [plot-phonegap-plugin] Can't receive notifications (#1)

Hi Howard,

You are setting up your beacons correctly. When you leave your phone idle it is possible that indeed no notification is triggered. This is a limitation of iOS. Often opening the lock screen is enough for the notification to be shown.

Android is currently not supported.

Mark

— Reply to this email directly or view it on GitHub https://github.com/Plotprojects/plot-phonegap-plugin/issues/1#issuecomment-48158495 . https://github.com/notifications/beacon/1394060__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcyMDM0NTEzMSwiZGF0YSI6eyJpZCI6MzU5Mjc3NDZ9fQ==--32a9d893747e871f419766338d006e0640fe0703.gif

markvandertol commented 10 years ago

Hi Howard,

Please let me know when you have further questions, Mark

hsmith825 commented 10 years ago

Hi Mark

Thanks for the information.

  1. We could not find any information defines a notification that triggers on exist. We read all the least documentation through version 1.6. Can you let me know where we can find information on notifications that trigger on exit?
  2. We place beacons in each store. We need to know anytime a person is in a particular store. Our customers commonly go in store A and then go to store B and then back to store A. Since the app only receives a trigger the first time the customer is in the store, the app would not know that the customer is in store A the second time. One service we offer is a payment service. We use the ibeacon notifications to identify the customer and the store the customer is in. We are not concerned about the customer receiving to many notifications since we can manage that in the app using the filterCallback. The solution we see is to issue a new notification using the API anytime our customer exists the store. This is not perfect but the chances are good that the app will is triggered anytime the customer is in one of our clients stores. What do you think? Thanks! Howard

On Jul 14, 2014, at 2:03 AM, Mark van der Tol notifications@github.com wrote:

Hi Howard,

Currently a notification can only be sent once per day. Maybe you could place a different iBeacon in each store to make sure the notifications stay relevant. With the latest version, release a week ago, you can create notifications that trigger on an exit. We don't have a schedule for supporting iBeacons on Android. We don't expect it to be available in August. Please let me know when you have further questions, Mark

— Reply to this email directly or view it on GitHub.

markvandertol commented 10 years ago

Hi Howard,

Mark

hsmith825 commented 10 years ago

Any update on support of iBeacons on Android?

Howard Smith

President/CEO

Flickitt Inc

(855) 896-8968 ext. 15

www.flickitt.com http://www.virtualvyou.com/

jan-pieter commented 10 years ago

Hi Howard,

We do not yet have a release date for iBeacon support on Android. The Android OS supports the underlying technology (Bluetooth LE) from version 4.3 and up. That is about 30% of all active Android devices. And there are some issues that need to be solved (such as the entire Bluetooth stack on the phone crashing). Because we cannot guanrantee it working correctly most of the time it is not on top of our todo list. However we will definitely be supporting it in the future when the reliability is improved and more Android devices support it.

Kind regards, Jan-Pieter

markvandertol commented 9 years ago

We've added iBeacon support for Android: http://www.plotprojects.com/support/#post-416

-Mark