How to identify whether the react native app is downloaded from Huawei App Gallery or Google Play Store? - react-native

I created a react native application which contains in-app-purchase.
in-app purchase - react-native-iap
I published my app into google play store, ios app store and It is working fine at google play store and ios app store.
I want to publish my app in Huawei app gallery.
react-native-iap does not support Huawei and I had to implement hms in-app purchase. But after that I am facing this problem.
There are two kind of Huawei mobile phones in market now.
Huawei mobile phones that supports both gms and hms.
Huawei mobile phones that supports only hms.
Huawei mobile phones that supports both gms and hms
In these user can download the app from Huawei app gallery or Google play store. How should I differentiate whether the app is download from Huawei app gallery or Google play store ?
Because based on this information I need to do the purchase (whether I use hms purchase or gms purchase)
Thank you.

You could try this PackageManager.getInstallerPackageName(String pack). This is an native method provided by Android for your information.
This method returns the package name of the software on which the application is installed. This method can be used to determine the market where the application was downloaded.

Related

Can I use payment gateways like Razorpay or Paypal in my React Native app?

I am developing a native app in React Native app which will be published on Play Store and Apple App Store. I want to know if I can integrate a 3rd party payment gateway like Paypal rather than using Google Play in App Billing System?
You can't. You need to use Apple Pay or Google Pay in order to be accepted into the stores.
https://support.google.com/googleplay/android-developer/answer/10281818?hl=en-GB#:~:text=All%20apps%20are%20required%20to,not%20limited%20to%2C%20app%20removals.
https://developer.apple.com/app-store/review/guidelines/#in-app-purchase

Branch io: how should I configure link, in order to open default app market when user click the link of an Android App which haven't been installed?

in Branch dashboard, I must configure links like this below:
Branch links Configuration
from that, you can see that I must configure a specific address.
However, as I know, some Huawei phones do not support Google Play Store, so if I only configure the Google Play address, it will not be available on Huawei phones. However, if I configure only the Huawei AppGallery address, it will not be available on non-Huawei phones. Is there an automatic way to judge?
A Branchster here:
By default, the Branch links will redirect to the Huawei app gallery without any special configuration. This is since both google and Huawei use the same URI scheme(market://details) to launch the store. On Huawei devices with no PlayStore, Branch links will fire the same URI scheme and the user is routed to Huawei App Gallery.
I suggest to use Huawei App Linking. The Unified Linking function allows you to configure links on the AppGallery and Google Play details pages at the same time. Different phones can automatically switch to the corresponding app store.
https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-Guides/agc-applinking-unifiedlinking-0000001070790553

App won't run without google play services, which are not supported by your device Error while using firebase analytics for react native mobile app

I am trying to integrate firebase analytics on react native app, I have completed all the prerequisites and got a successful build running on Honeywell android Device, but when I open the app it gives above error. There are many such duplicate question but nothing works for me as I can't have play store as the target devices are Handheld android devices and not mobile devices. How to integrate firebase analytics without having to install google play service.
Thanks for Answer #JakeSteam
But I could get firebase integration working without google play service error.
Issue Details:
I was using react native firebase 5.x.x, which works fine but will give a pop up message mentioned in question if your device doesn't have google play service.
Workaround:
Upgrade react native firebase to version 6.x.x, the community has redeveloped this repo and I am not having issues with it now.
NOTE:
Without google play service on your device you can only use few firebase services like analytics, crashlytics etc.
As a Firebaser said:
Firebase as a platform requires Google Play Services, even though some Firebase products may be able to work without it.
If you cannot use Google Play Services, you may want to look into Google Analytics, which does not require it:
Note: Google Analytics can be used and will work on devices that do not have Google Play Services. In this case you still download and use the Google Play Services SDK and Google Analytics will automatically fall back to local dispatching.

does android tv lollipop support WebRTC?

I want to write an app for android 5.0 Lollipop smart tv. I need to know if webRTC is supported by the native Chrome version which is installed in these devices.
Thanks.
Android TV does not have a browser installed.
The 'TV app quality' page has a paragraph (TV-WB) that says: "For web content, the app uses WebView components and does not attempt to launch a web browser app."
developer.android.com/distribute/essentials/quality/tv.html

Android, Iphone, Windows and Blackberry API search apps

Is it possible to search apps via API on:
1. Android Market
2. App Store
3. Windows Phone App Store
4. Blackberry App World
5. Facebook App Store
and if so, can you provide specific links to that sections (not only to the develops pages)?
Thanks
you can use google api, or some simple stuff
for example you want to search games in android market place
get the result of this
games site: https://play.google.com/
in google.com
For Apple App store---
https://itunes.apple.com/search?term=+<appname>+&entity=software
There are no public apis are available for Android, Windows, Blackberry.
Paid API For Android Apps--
42Matters
For Windows, Backberry, Facebook--
Do web scrapping by using CSQuery(or) html agility pack..