Support multiple package name association using Branch.io - branch.io

Branch takes care of creating, applying and confirming Android App Links associations when using it. And that's truly great.
However, it comes to be a tricky question where there are a few package names for the same app, as Branch doesn't give an ability to specify few package names in Android setup. Also, it's not possible to upload custom domain associations files.
Have anyone faced it? Please advice.
P.s. The problem is rather a missing feature than a bug.

Currently Branch doesn't support creating DAL associations files for multiple flavors (package names) of the same app.
I've contacted Branch support and applied a feature request for this so maybe it will be possible in the future releases.

I assume you want to add multiple package names so that the same link can give the option to open multiple apps. You can achieve this functionality by adding the same URI scheme intent filter and Android App links intent filter to the Android Manifest of all your apps.
<!-- Branch URI Scheme -->
<intent-filter>
<data android:scheme="androidexample" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
<!-- Branch App Links (optional) -->
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="example.app.link" />
<data android:scheme="https" android:host="example-alternate.app.link" />
</intent-filter>
If added, whenever a person clicks on the link it will provide to option to open the link via all the apps which can handle the intent. In order to read the link parameters, you can use the same Branch key for all apps.
I am not sure why you need to upload a custom domain associations file. It would be really helpful if you could provide more details about your use case to understand what you wish to achieve.

Related

how to open specific screen from a url in react native

i have a pyment gateway in my app and i'm using "react-native-inappbrowser-reborn" to go to payment website. how can i go to app dashboard on successful payment? I've been trying to implement it with deep linking but couldn't do it. On successful payment browser open URL like this :http://**8.*1.9./successpage:
This is my intent in manifest file
<intent-filter>
<action android:name="android.intent.action.VIEW"/> <category android:name="android.intent.category.DEFAULT"/> <category android:name="android.intent.category.BROWSABLE"/> <data android:scheme="stylon"/> <data android:scheme="https" android:host="**8.*1.**9.**/" /> <data android:scheme="http" android:host="**8.*1.**9.**/" />
</intent-filter>
this is my navigation container:
<NavigationContainer ref={RootNavigation.navigationRef} linking={prefixes: ['stylon://', 'http://**8.*1.**9.**/'],}>
There are two ways by which you can navigate by url
By Linking
By webView
The react-navigation's official documentation has an entry for this feature with deep-linking. Take a look here

How to get details from link_click_id in Branch.io

When clicking the button from the email which has the below Branch URL
http://my.app.link/feed/response/MyUniQuEId
redirect me to my app but the url received is something like below:
myapp://open?link_click_id=123456789
How can we get the http://my.app.link/feed/response/MyUniQuEId from the link click id in react native.
When opening from messenger these links are not getting changed but when clicking from mail the branch URL is getting changed like above.
A Branchster here -
You can not read the referring link from the link click ID. It's a unique parameter that Branch appends for attribution.
Please reference the following documentation to read the deep link data and you can check for the referring link in the link payload given by the Branch SDK - https://help.branch.io/developers-hub/docs/react-native#read-deep-link
I encountered the same issue. Make sure to double check that the deep link is configured correctly in the manifest.
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="my.app.link" />
</intent-filter>

IntelliJ plugin localization

I'm creating a plugin for Intellij IDEA. Following found tutorial now I have pretty simple working plugin. But my problem is the fact I don't know how to maintain localization for my actions.
Now I've got plugin.xml file with following actions tag:
<actions>
<group id="MyPlugin.TopMenu"
text="_MyPlugin"
description="My plugin toolbar menu">
<add-to-group group-id="MainMenu" anchor="last"/>
<action id="MyAction"
class="actions.MyAction"
text="_MyAction"
description="MyAction"/>
</group>
</actions>
This code means that my group and action will be shown as "_MyPlugin" and "_MyAction" regardless localization.
I found how to create resouces bundle and did it. Now I have strings.xml (as I used to for Android) with following content:
<properties>
<entry key="ActionName">_MyAction</entry>
</properties>
Another resource file called strings_ru.xml is combined with it into Resource Bundle, so I don't think I did something wrong with it.
I want to use resource reference to set text tag for my group and its actions. Is it even possible? If not should I create and register actions in runtime?

Play store console detects android.permission.READ_PHONE_STATE requirement for a Vanilla React Native app

I created a react native app using react-native init. Did not change a single line of code. (Note: react-native version is 0.55.4)
I generated a singed release APK by following steps given in the official docs.
I tried to upload this APK to Google Play console.
I got the following error:
Your APK or Android App Bundle is using permissions that require a privacy policy: (android.permission.READ_PHONE_STATE)
This is an unexpected behaviour right? Why will a vanilla app require this permission? How can I solve this issue?
Edit 1
My Android manifest is the default one created by react-native init.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.praveenavtestproject">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<application
android:name=".MainApplication"
android:label="#string/app_name"
android:icon="#mipmap/ic_launcher"
android:allowBackup="false"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
</application>
Edit 2
My app doesn't need any permission to work. It just displays 3 lines of text from a historical literature. It is just for information purpose. In Play Store Console, under Store listing tab, at the bottom, there is a Privacy Policy section. It says If you wish to provide a privacy policy URL for this application, please enter it below. Also, please check out our User Data policy to avoid common violations.
I am not providing a privacy policy URL. My app is not supposed to be accessing any user data or phone state. Does React Native access it by default? Can that be the reason for this issue?
Edit 3
Looks like this issue is already being looked at by React Native team.

NoClassDefFoundError Google-Play-Services / Maps

Getting NoClassDefFoundError within project and in Google Maps for Android sample found in google-play-services folder.
I have tried so far:
Importing google-play-services_lib into workspace through wizard and making sure code is copied to directory
Manually copying google-play-services_lib into directory with sample, then importing into workspace
Copying jar into workspace
Google Play Services is installed on test devices (Nexus 5, Galaxy S4)
There is a green check next to the library under my project when going to properties > android
I can see the classes in source at compile time, compiles with no errors
Reinstalled the lib from the Android SDK Manager and made sure the key is correct in Google API console; also made sure v2 of maps was enabled for that key
Added proguard exceptions as per integration instructions
Any ideas?
Manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.package.projectname"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="18"
android:targetSdkVersion="21" />
<permission
android:name="com.package.projectname.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="com.package.projectname.permission.MAPS_RECEIVE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.package.projectname.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.package.projectname.MapActivity"
android:label="#string/title_activity_map"
android:parentActivityName="com.package.projectname.MainActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.package.projectname.MainActivity" />
</activity>
<uses-library
android:name="com.google.android.maps"
android:required="true" />
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value=“my_key_from_google_api_console” />
</application>
</manifest>
I don't think you need the line:
<uses-library
android:name="com.google.android.maps"
android:required="true" />
In fact, I think that's the name of the old maps library. Try removing it and see if that fixes your problem. Also, make sure your code is importing from com.google.android.gms.maps and com.google.android.gms.maps.model, the packages for Google Maps API V2.
UPDATE
Your build configuration isn't including the Google Play Services jar in your APK.
To fix this in IntelliJ: https://stackoverflow.com/a/17977734/1235702
To fix this in Eclipse, follow steps 3 and 4 here: https://docs.google.com/document/pub?id=19nQzvKP-CVLd7_VrpwnHfl-AE9fjbJySowONZZtNHzw (I didn't write this doc, but kudos to whoever did!)
Add the Google Play Services project into your Eclipse workspace.
Click File -> Import..., select Android -> Existing Android Code into Workspace
Browse to and select /extras/google/google_play_services/libproject/google-play-services_lib
To add the dependency to Google Play Services into your project
Project -> Properties -> Android -> Library, Add -> google-play-services_lib
(Sorry; the markdown won't let me set the numbers to 3 and 4 explicitly.)
Screenshot from OP for posterity: