Google restricts FCM service based on IP Address, Is there any other free Android push notification provider?

大憨熊 提交于 2019-11-30 04:22:34

问题


I start to write down a simple push notification App using FCM For Android. But I got this message in my Android studio Log.

signInWithCustomToken com.google.firebase.FirebaseException: An internal error has occurred. [ This service is not available from Iran. If you believe the country of origin was incorrectly identified, please report it at https://support.google.com/websearch/contact/ip. ]

My Android (client) app works fine[Successful Registering and Signing In and Receiving notification] when I use with VPN to change my IP.

My question: is there any way to use FCM for my project beside forcing customers to use VPN? If not what are other alternatives for FCM that provides free and pay as you go service for cross-platform push Notification?[it is clear that companies that uses FCM/GCM services as 3rd party like Batch.com, Backendless, Pushwoosh wouldn't do any help]

by free, i mean for small amount of users (around 1000 MAU)

EDIT: As Antoine Guénard said, with batch my app registered and got Token and authenticated without any problem but receives test notification only through VPN.


回答1:


The exception occurred while calling signInWithCustomToken which is related to the Firebase Authentication feature, not Firebase Cloud Messaging (FCM).

We at Batch.com have many customers in Iran as we are based in Europe not US and most of the business sanctions were lifted last year. Our webservices are not geo-restricted like Firebase ones so I don't see a reason why it would fail with us.

On Android, Batch uses Google Cloud Messaging (GCM) through Google Play Services SDK and our Iranian end-users are fully able to subscribe to push notifications and receive those. FCM is basically just a rebranding of GCM, sending APIs works the same, but subscribing from the client side requires another SDK that heavily relies on the Firebase ecosystem.

Edit: from Firebase term of services:

The Software is controlled by U.S. Export Regulations, and it may be not be exported to or used by embargoed countries or individuals.




回答2:


OneSignal has free unlimited cross-platform push notifications.

https://onesignal.com/



来源:https://stackoverflow.com/questions/41776992/google-restricts-fcm-service-based-on-ip-address-is-there-any-other-free-androi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!