Failure to Launch Apps Due to Package Name Inconsistency - huawei-mobile-services

When I used huawei AppLinking Serviceļ¼Œ the app package name is queried to locate the app details page. However, the app package name varies depending on the channel. For example, for a Huawei channel, the package name ends with .huawei, which is different from that in a Google channel.Does this mean it's impossible for an App Linking link to be opened in all local app stores due to package name inconsistency?

Does this mean it's impossible for an App Linking link to be opened in
all local app stores due to package name inconsistency?
The answer is no because there is a solution to this problem.
Perform the following to resolve the issue:
We know that App Linking can redirect users to a custom website if the app has not been installed, so you can use Android intents to create custom links, in which you can configure the package name and fallback URL to be opened. The basic syntax is as follows:
intent:
HOST/URI-path // Optional host
#Intent;
package=[string];
action=[string];
category=[string];
component=[string];
scheme=[string];
S.browser_fallback_url=[encoded_full_url]
end;
Taking advantage of the preceding functions, you can:
Create a link of App Linking and use the setOpenType(CustomUrl) method to set the open type to redirect users to a custom website for the Android platform. The involved APIs are as follows:
.setAndroidLinkInfo(new AppLinking.AndroidLinkInfo.Builder()
.setAndroidDeepLink(Android_LINK)
.setOpenType(CustomUrl)
.setFallbackUrl(BACK_LINK)
.build())
Use an Android intent to configure the preceding custom website. Here, I use Taobao as an example:
"intent://details?id=com.taobao.taobao#Intent;scheme=appmarket;package=com.huawei.appmarket;S.browser_fallback_url=https://play.google.com/store/apps/details?id=com.taobao.taobao;end"
The process is as follows:
1.Use the appmarket scheme to start the app whose package name is com.huawei.appmarket, that is, to open HUAWEI AppGallery.
2.Pass the package name com.taobao.taobao to HUAWEI AppGallery. Then, HUAWEI AppGallery will start this package.
3.If com.huawei.appmarket is not found, set S.browser_fallback_url to a fallback URL.
4.The fallback URL is a Google Play link. Simply set id in this URL to the name of the package to be opened. In this example, the ID is com.taobao.taobao.
Ensure that an App Linking project of the Android platform has been completed. For details, visit:
https://forums.developer.huawei.com/forumPortal/en/topic/0204442462434640048?fid=0101188387844930001
Open the original App Linking project and add the following information in bold:
String BACK_LINK = "intent://details?id=com.taobao.taobao#Intent;" +
"scheme=appmarket;package=com.huawei.appmarket;" +
"S.browser_fallback_url=https://play.google.com/store/apps/details?" +
"id=com.taobao.taobao;end";
AppLinking.Builder builder = new AppLinking.Builder()
.setUriPrefix(DOMAIN_URI_PREFIX)
.setDeepLink(Uri.parse(DEEP_LINK))
.setAndroidLinkInfo(new AppLinking.AndroidLinkInfo.Builder()
.setAndroidDeepLink(Android_DEEP_LINK)
.setOpenType(CustomUrl)
.setFallbackUrl(BACK_LINK)
.build());
Test:
Install the demo on a device, create a link of App Linking, and add it to the note.
Uninstall the app to simulate the scenario where the app is not installed.
For a Huawei phone, tap Open/Download. On AppGallery that is displayed, open the Taobao details page. The following figure shows the Taobao details page in HUAWEI Browser.
For a non-Huawei phone, tap Open/Download. On Google Play that is displayed, open the Taobao details page. The following figure shows the Taobao details page in Google Chrome.
The problem is now resolved. If you encounter a similar problem, simply follow my example step by step and change the package name to resolve the issue.
For more details, please go to:
https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-Guides/agc-applinking-introduction?ha_source=hms1

Related

How to interact with native apps using appium-flutter-driver & webdriverIO project

I'm using appium-flutter-driver & webdriverIO to automate the flutter mobile app.
I have a use case in my application where clicking on
Mail us button opens Gmail app with subject, body
Call us button opens Dailer app with phone number
I want assert/verify that gmail/phone app is opened. either one of following is fine
verifying that gmail/phone app package name
verifying the subject, content in gmail compose screen is also fine
I see here https://github.com/appium-userland/appium-flutter-driver that
await driver.switchContext('NATIVE_APP');
await (await driver.$('~fab')).click();
what is ~fab means here?
How to find elements using ID, text, class in this case and perform click, enterText, etc operations?
I'm not sure what ~fab means. But the available finders are mentioned here, with links to the documentation. The available commands are mentioned here, with links to the documentation.
An example of a finder by semantics label with a click:
element = FlutterElement(self.driver, FlutterFinder().by_semantics_label('Back'))
element.click()
An example of entering text:
driver.execute_script('flutter: enterText')
Got these examples from here.

Flutter: google founding choice

I'm using admob_consent, doing everything according to the instructions including step "Create respective messages inside Funding Choices for your desired app and publish them".
Deploying on android
after that code, nothing happens
_admobConsent.show(forceShow: true);
But I'm expecting to get consent dialog
debug console:
To fix this issue need to select "personalized ads" for EEA and UK users
https://apps.admob.com/v2/pubcontrols/eu-user-consent

Warning: Your pubspec.yaml includes an "author" section which is no longer used and may be removed

I want to publish my library and same as before, I have included author name in the pubspec file.
Running flutter pub pub publish --dry-run gives me the following warning:
Warning: Your pubspec.yaml includes an "author" section which is no longer used and may be removed
I will authorize my publishing using the email in my author value. If I remove it, how will I authorize.
I'll be thankful to know more about this.
Instead of using author or authors to verify yourself, the new way is that you make yourself a verified publisher.
According to documents:
To create a verified publisher, follow these steps:
Go to pub.dev.
Log in to pub.dev using a Google Account.
In the user menu in the top-right corner, select Create Publisher.
Enter the domain name that you want to associate with your publisher
(for example, dart.dev), and click Create Publisher.
In the confirmation dialog, select OK.
If prompted, complete the verification flow, which opens the Google Search Console.
When adding DNS records, it may take a few hours before the Search
Console reflects the changes. When the verification flow is complete,
return to step 4.
You should now use authors instead of author:
name: my_package
authors:
- me#mail.com
- another_author#mail.com
...

canOpenURL Google maps issue

so today we received a ticket that our application does't open de Google Maps but open another app JabJobs in our application we check if there is GoogleMaps installed as follow:
(UIApplication.shared.canOpenURL(NSURL(string:"comgooglemaps://")! as URL))
so if there is an GoogleMaps installed there is no problem but if we uninstall the GoogleMaps app, and install JabJobs the UIApplication.shared.canOpenURL still return true value and when we go further with
UIApplication.shared.openURL(NSURL(string:
"comgooglemaps://?saddr=&daddr=\(place.lat),\(place.lng)&directionsmode=driving")! as URL)
a system popUp is displayed with "MyApp" wants to open "JabJobs"
Q1. Is that possible that another app to respond to same URL as googleApp ?
Q2. How can i check if there is a GoogleMaps installed if the code above doesn't work?
Of course it's possible, you can respond to any URL scheme if you register app for it.
From https://developers.google.com/maps/documentation/urls/ios-urlscheme, I can see that Google Maps have more url schemes, for example comgooglemapsurl://. You can check if these 2 schemes are available if not then it's probably other App, unless they support all these schemes... then you can't do nothing, but as I can see JabJobs does not support comgooglemapsurl:// scheme.

Facebook Follow Button plugin doesn't allow periods in profile

Trying to set up a follow button with Facebook's plugin here:
https://developers.facebook.com/docs/reference/plugins/follow/
I've found that any profile url I enter that contains periods (for example, http://www.facebook.com/John.Smith) will return an error.
From the error console I receive
Failed to load resource: The requested URL was not found on this server.
This happens with the HTML5, iframe and URL versions of the plugin. Just out of curiosity I tried encoding the period with %2E, and I also tried using the numeric profile ID, but neither worked.
Is there any other trick I can try to make this work?
I don't think it's a problem with the social plugin. please enter the profile https://www.facebook.com/michael.kamleitner for testing purposes - everything's fine here.
If I open the profile url of John Smith I'm getting an error ("Page not found") - so imho the profile is restricted/not public at all. If it's privacy restricted, you can't use it for the follow-plugin. If you have access to John Smith's account, please double check his follower-settings: https://www.facebook.com/settings?tab=followers