Push Notification + GeoLocation from console

Hi Backendless Team,

I have a problem with push notification and geoLocation.
The idea is when user enter the geofence, they will get push notification. I succeed last night, but when I tried again this morning, it failed. It works in afternoon and now, it doesn’t.

What i have done so far:

  1. Device succesfully registered -> on tab ‘devices’ channel, there is my registered device.
  2. I publish basic push notif from backendless console targeting my device, it works too.
  3. I make push notif in onEnter, onStay and onExit action.
  4. My geoFence able to detect my geoPoint.
  5. Data object and geopoint are one-to-one related.
  6. I dont have PushActivity.class in my project because I think push notification in geolocation backendless console has a same function with that.
  7. Messages calculation in backendless developer home is increase when I publish basic push notification but in my geolocation push notification, it doesn’t.

So, i need your help now. Maybe I do some little mistakes or I miss some concept of geolocation and push notification that makes my apps doesn’t work.

Thank You.

Solved.

I don’t know why but here I found.
If user register and automatically login, user cannot get a push notification.
But if user logout after that and login again, they can get a push notification.

Thank you, Backendless…

Hi Alvin,

What do mean by “register and automatically login”? The registration API call in Backendless does not perform automatic login…

Regards,
Mark

I used wrong word maybe. When user succesfully registered, current user set from registered user and apps redirect it to home screen.

After registration, you should also do a login request in order to have “current user” active. Do you have this logic in your code?

I use this code in LoadingCallbacks, get it from sample project in github, perhaps.

Backendless.UserService.setCurrentUser(registeredUser);

I think this code works because geopoint location update successfully in certain user.But, i will try your advice as a safer method. Thank You.