title: Android Pushwoosh IllegalStateException: Application does not define permission com.google.android.c2dm.permission.RECEIVE
body: <p>I have a problem today. When I try to register to receive a push from Pushwoosh</p>
  <pre><code>Pushwoosh.getInstance().registerForPushNotifications()
  </code></pre>
  <p>It throws an exception like that</p>
  <pre><code>E/Pushwoosh: Exception occurred
  java.lang.IllegalStateException: Application does not define permission com.google.android.c2dm.permission.RECEIVE
      at com.pushwoosh.firebase.internal.registrar.a$b.a(Unknown Source:17)
      at com.pushwoosh.firebase.internal.registrar.a$b.a(Unknown Source:30)
      at com.pushwoosh.firebase.internal.registrar.a.checkDevice(Unknown Source:2)
      at com.pushwoosh.notification.PushwooshNotificationManager.a(Unknown Source:45)
      at com.pushwoosh.Pushwoosh.a(Unknown Source:23)
      at com.pushwoosh.Pushwoosh.lambda$HgkxfkcfE_k-Lm_xVXJ-mTVOJ3g(Unknown Source:0)
      at com.pushwoosh.-$$Lambda$Pushwoosh$HgkxfkcfE_k-Lm_xVXJ-mTVOJ3g.a(Unknown Source:6)
      at com.pushwoosh.inapp.f.a.a(Unknown Source:11)
      at com.pushwoosh.inapp.f.a.lambda$qCb0Pyb8Qrzu-2CtVmkrEeLg1C0(Unknown Source:0)
      at com.pushwoosh.inapp.f.-$$Lambda$a$qCb0Pyb8Qrzu-2CtVmkrEeLg1C0.run(Unknown Source:6)
      at android.os.Handler.handleCallback(Handler.java:900)
      at android.os.Handler.dispatchMessage(Handler.java:103)
      at android.os.Looper.loop(Looper.java:219)
      at android.os.HandlerThread.run(HandlerThread.java:67)
  </code></pre>
  <p>This is my Manifest</p>
  <pre><code>&lt;manifest ..&gt;
  
  &lt;uses-permission android:name=&quot;android.permission.INTERNET&quot; /&gt;
  &lt;uses-permission android:name=&quot;android.permission.WAKE_LOCK&quot; /&gt;
  &lt;uses-permission android:name=&quot;android.permission.ACCESS_NETWORK_STATE&quot; /&gt;
  &lt;uses-permission android:name=&quot;android.permission.FOREGROUND_SERVICE&quot; /&gt;
  &lt;uses-permission android:name=&quot;com.google.android.c2dm.permission.RECEIVE&quot; /&gt;
  
  &lt;application ..&gt; &lt;/application&gt;&lt;/manifest&gt;
  </code></pre>
  <p>I have tried adding this line to my manifest but still not working</p>
  <pre><code>&lt;uses-permission android:name=&quot;com.google.android.c2dm.permission.RECEIVE&quot; /&gt;
  </code></pre>
  <p>My device is a Huawei nova 7i, I have tried to settings in my battery follow this <a href="https://help.pushwoosh.com/hc/en-us/articles/360028478751-Android-device-cannot-receive-push-notifications-when-an-application-is-force-stopped-killed-" rel="nofollow noreferrer">link</a>, and still not working. So any solution?</p>
  <p><strong>Edit : Huawei Nova i7 no longer supportted by google service, so firebase messaging doesn't work</strong></p>