OneSignal / OneSignal-Xamarin-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your Xamarin app with OneSignal. https://onesignal.com
Other
105 stars 50 forks source link

Missing Google Play Services Library #151

Closed omrishsu closed 5 years ago

omrishsu commented 5 years ago

After registering a user on the mobile app we couldn't send him a notification. When checking the user's status on the control panel (users -> all users) we saw that under "SUBSCRIBED" there is an error: "Missing Google Play Services Library". Since there is no "Google Play Services Library" but several (https://www.nuget.org/packages?q=Xamarin+Google+Play+Services) can you share which one is needed?

rgomezp commented 5 years ago

Howdy, Please make sure you are following our issue template.

In Android Studio open build.gradle (Module: app) and make sure you are using the latest OneSignal SDK under dependencies.

omrishsu commented 5 years ago

@rgomezp thank you, however (and I may be wrong) since this is xamarin SDK there is no build.gradle, right? anyway, since I'm new to onesignal, the only version I've ever used is 3.3.0

omrishsu commented 5 years ago

I was able to solve it by adding more permissions;

<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
  <uses-permission android:name="android.permission.WAKE_LOCK" />
  <uses-permission android:name="android.permission.INTERNET" />
  <uses-permission android:name="com.MYAPP.permission.C2D_MESSAGE" />
  <permission android:name="com.MYAPP.permission.C2D_MESSAGE"
              android:protectionLevel="signature" />

And now I get a success message when sending notification via the rest API to my test user. However, I don't get the notification in the device emulator. any other permissions \ settings I need to add \ change?

rgomezp commented 5 years ago

Great to hear @omrivm , If you tested on iOS, you won't be able to get notifs in the simulator. Otherwise, I suggest you reach out through our support channel at onesignal.com

mikechoch commented 5 years ago

You should not have needed to add a permission to fix this issue. This seems like a setup problem and I recommend removing the permission and verifying that the issue has gone away.