CrossGeeks / AzurePushNotificationPlugin

Azure Push Notification Plugin for Xamarin iOS and Android
MIT License
67 stars 34 forks source link

If Android App is closed, notification not comming #46

Closed k0steash closed 4 years ago

k0steash commented 4 years ago

If I swype an application from memory, then the pushs does not come. If i do the same with Youtube or Whatsapp, the pushs is still coming

k0steash commented 4 years ago
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="0.1.29" package="" android:installLocation="preferExternal">
    <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="28" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
  <uses-permission android:name ="@package_name@.permission.C2D_MESSAGE"/>
  <permission android:name ="@package_name@.permission.C2D_MESSAGE" android:protectionLevel="signature"/>
    <uses-feature android:name="android.hardware.camera" android:required="true" />
    <application android:label="BIGO_Test">
        <receiver android:name="com.google.firebase.iid.FirebaseInstanceIdInternalReceiver" android:exported="false" />
        <receiver android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver" android:exported="true" android:permission="com.google.android.c2dm.permission.SEND">
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.RECEIVE" />
                <action android:name="com.google.android.c2dm.intent.REGISTRATION" />
                <category android:name="${applicationId}" />
            </intent-filter>
        </receiver>
    </application>
</manifest>
rdelrosario commented 4 years ago

Please check the FAQ https://github.com/CrossGeeks/AzurePushNotificationPlugin/blob/master/docs/FAQ.md

k0steash commented 4 years ago

Hi, I had to create Application classe and Push there initialize ! Tnx

rdelrosario commented 4 years ago

Are you using the OnNotificationReceive event in the MainApplication class? That's were you receive notifications when closed