The App Linking service provided by AppGallery Connect, is a great cross platform App link generation service. The SDK supports both Android and iOS. For non-Huawei Android phones, the link can be set to redirect users to the phone’s app market, as well as support for fallback URLs.
No matter what device the user is on a Huawei AppGallery Connect App Link will work and direct that user to the best method for installing the app on their device.
But here is the question, does the links create have a validity period? If they do how long can they last?
The link of App Linking can be created in AppGallery Connect manually or via code after your app has been integrated with the SDK. Is there a difference between the validity periods of the links created using the two different methods?
Taking a look at the API reference we find that the SDK for Android and the SDK for iOS both have an API to set the validity period of the link:
For Android: The API is setExpireMinute, and is a time accurate to the minute. A link is valid for two years by default, and the minimum validity period is 5 minutes.
For iOS: The API is expireMinute, and is a time accurate to the minute. A link is valid for two years by default, and the minimum validity period is 5 minutes.
However, there is no description about the validity period of the link on the link creation page in AppGallery Connect.
And there was also an Archive button, what does this do?
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
The Links created in AppGallery Connect are permanently valid if unarchived. Archived links are still valid within one year.
After you click the Archive button, links will be archived but their data will not be traced.
Archived links can still be viewed within seven days. You can filter the links in AppGallery Connect by selecting Archived in last 7 days. You can also click Unarchive in the Operation column to cancel archiving.
References:
setExpireMinute
expireMinute
Archiving a Link of App Linking
Very useful, thanks!!
Related
I want to share the project I was working on an android app to control all GPIO pins of Rapsberry Pi wirelessly from Android Phone without using SSH nor WebioPi nor port forwarding
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Download from Google Play Store
play.google.com/store/apps/details?id=com.lightmypi
The app communicates with your Raspberry without using SSH nor WebIoPi
You need to install a web server, PHP handler and wiringPi and switch.php file on your raspberry to get this app working.
I have given a detailed guide on github along with switch.php file
github.com/juniorhero/raspberrypi2
Read more on Github
If you install Weaved on HTTP port 80, then you can access the GPIO pins from anywhere in the world using LightMyPi app
I am sure you will like this app, please try it and let me know if you face any difficulties :fingers-crossed:
Have you done more development on this?
Could you share Android App source code so we can hack as in our DIY project. Please.
I've followed the directions on github, however when I run the weaved-nixinstaller_1.2.13.bin I choose option 2 and it sets up port 80 OK but then it asks for my Weave email address and password. I gave it my email and invented a password, but then it says:
You are missing a valid session token and must be logged back in.
I also installed the Android app lightmypi, however there is no place to enter an email and password, so it's very confusing how the Android app is supposed to connect to my pi. Probably the issue is with the weaved-nixinstaller not finishing correctly.
I did some Google search and discover that I have to first create a Weaved account online, however they are not accepting new accounts, rather they direct me to setup an account at www dot remot3 dot it. What a run around.
Any help is appreciated, because I am so close to testing this all out.
Background
A developer team wants to integrate HUAWEI Out-of-App Purchases, allowing users to purchase a product on the app details page of a game on HUAWEI AppGallery. To use this mode, they need to deep link a user to the app details page, and pass the ID of the product for purchase..
Official documentation: https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-Guides/appgallerykit-devguide-game#h1-1589804284330
Let’s see how they achieved this.
Implementation
1. Activity Configuration in the Manifest File
The team added intent-filters for an activity of their game.
<data android:scheme=”agpms” androidath=”/product/pay” android:host=”com.sxx.huawei”/>
The assembled request URL is agpms://com.sxx.huawei/product/pay.
The official documentation describes the requirements on the link.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Sample code:
2. Code Implementation of Redirection (Opening a Deep Link from Another App)
HUAWEI AppGallery should be used for the testing. However, the team had not released the game on AppGallery, and they failed to find a test environment on the AppGallery side. So they turned to another app.
Java:
Intent intent = new Intent();
intent.setAction("com.google.open02");
intent.addCategory("android.intent.category.DEFAULT");
intent.setData(Uri.parse("agpms://com.sxx.huawei/product/pay?producid=TestProduct503"));
startActivity(intent);
agpms://com.sxx.huawei/product/pay?producid=TestProduct503
Generally, the parameter following a question mark (?) is in the format of key=value&key1=value1.
Sample code:
As shown in the sample code, the only parameter set is producid.
3. Parameter Parsing After Redirection to the Payment Page
If the details page has not been opened before the redirection, the onCreate method of the app activity needs to be called to obtain the intent object for data parsing.
If the details page has already been opened before the redirection, the onNewIntent method of the app activity needs to be called to obtain the intent object for data parsing.
Sample code:
After the team obtains the product ID from the parsed data, the HMS Core SDK displays the payment page.
FAQs
What should I do if I fail to open the payment page after configuring the deep link?
Generally, this problem is caused by the inconsistency between scheme, host, and path in the assembled URL and those in the configuration. You can perform a check by referring to the official documentation.
Overview
We've grown accustomed to the hassle of connecting our devices to the Wi-Fi networks in new locations, which can be an annoyance at best, and a major frustration at worst. But perhaps more importantly, this process also comes with the risk of password leakage. Wouldn't it be nice if there was a way to connect our devices to Wi-Fi networks on an automatic basis, rather than having to manually enter the password each time?
HUAWEI Nearby Service offers a Wi-Fi sharing feature, which once integrated, equips your app to connect users on a wide range of smart devices to the Wi-Fi networks that they encounter.
Wi-FiShareDemo
Here, we've used Wi-FiShareDemo as an example, which has integrated the Wi-Fi sharing function in Nearby Service. Now, we'll show you the core code for the app, and how the app can be run.
Preparing Tools
One Huawei phone (The phone for sharing Wi-Fi must be a Huawei phone, and be connected to Wi-Fi.)
One Android device (The device to be connected to Wi-Fi must run Android 5.0 or later and have HMS Core installed, and can be a phone or a TV box.)
Android Studio (3.X or later)
Creating an app
Import the source code to Android Studio.
Register as a Huawei developer.
Create an app in Huawei AppGallery. For details, please refer to HUAWEI Developers-App Development. Note that you will need to download the agconnect-services.json file, generate the signing certificate, and save both to the app directory.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Run the app in Android Studio and install it on the test devices.
Procedures
After configuring the code and completing the installation, perform the following steps.
1.Start Wi-FiShareDemo on B, and tap Connect Wi-Fi.
2.Start Wi-FiShareDemo on A, and tap Share Wi-Fi.
3.On A, select the phone that will share Wi-Fi, make sure that the verification codes on both phones are the same, and tap ALLOW.
4.On B, tap ALLOW in the dialog box that is displayed to authorize the Wi-Fi connection.
Core Code
You can view the source code of the app in GitHub. In this app, the WifiShareHelper.java class is encapsulated based on the Nearby Service APIs. Only the APIs requestWiFiConfig and shareWiFiConfig for WifiShareHelper.java are used to connect to and share Wi-Fi.
requestWiFiConfig
// The device request to connect WiFipublic void requestWiFiConfig() { Log.d(TAG, "requestWiFiConfig"); mWifiShareEngine.startWifiShare(mWifiShareCallback, WifiSharePolicy.POLICY_SET) .addOnFailureListener(e -> Log.e(TAG, Objects.requireNonNull(e.getMessage())));}
shareWiFiConfig
// The device to share wifipublic void shareWiFiConfig() { Log.d(TAG, "Start to share WiFi"); mWifiShareEngine.startWifiShare(mWifiShareCallback, WifiSharePolicy.POLICY_SHARE) .addOnFailureListener(e -> Log.e(TAG, Objects.requireNonNull(e.getMessage()))); showListView(); setListViewListenerMode();}
Learn More
For more details, please visit HUAWEI Developers.
For further instructions, please refer to Development Guides.
To join the developer discussion, please visit Reddit.
To download the demo and sample code, please go to GitHub.
To resolve integration issues, please go to Stack Overflow.
After an app is launched, the app update function checks whether there is a later version available on AppGallery. If so, a pop-up is displayed, asking the user whether to update the app.
After you have integrated Cocos SDKHub, the function will use the SDK to check for app updates.
If your joint operations game is rejected for not integrating the app update function, check this post.
Before you integrate the app update function, you need to integrate Cocos SDKHub. (Reference: Integrating HUAWEI Game Service Based on Cocos SDKHub — Integrating Cocos SDKHub)
After that, here’s how you integrate the function:
1.Add the following code by referring to the official document:
JavaScript:
checkUpdate:function(){
var params = {
"showUpdateDialog": "1",
"forceUpdate": "0"
}
console.log("checkAppUpdate button pressed");
sdkhub.getUserPlugin().callFuncWithParam("checkAppUpdate",params);// Call the checkAppUpdate API.
}
2. Associate the code with a specified button and select the checkUpdate method as the tap event.
3. If you see the error information informing you that the callFuncWithParam method is not found during a simulator test, just test the packaged file on a real device.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
4. If the following information is displayed,
the function is integrated.
XML:
D/jswrapper: JS: checkAppUpdate pressed
I/updatesdk: UpdateSDK version is: 2.0.6.302 ,flavor: envrelease ,pkgName: com.cocos2d.xxx
D/HwConnectivityServiceEx: set 10323 wlan0 value false
I/NetworkKit_a: 27569-28056|null|com.huawei.hms.framework.network.grs.a|a|22|get url from sp is not empty.
I/DeviceUtil: UpdateSDK Get url from GRS_SDK Success!https://store1.hispace.hicloud.com/hwmarket/api/
I/StoreTask: UpdateSDK call store responsecode: 200
If the function passes the real-device test, the error displayed in the simulator test may be caused by compatibility failure.
For a mobile game that needs to be forcibly updated, pay attention to:
1. Select Force update when editing information for the new game version in AppGallery Connect.
(See step 8 in the official document)
2. Set forceUpdate in the input parameters to 1.
This way, you have successfully integrated the app update function.
very useful writeup
Neha J said:
very useful writeup
Click to expand...
Click to collapse
Thank you for your liking.
Are you a developer or want to become a developer in the future? If yes then you might have heard about the Google Developer Account and uploading your Apps to Play Store etc.
But do you know that you can become a Developer for Huawei AppGallery as well and not only that, you can also become a Huawei Themes/Wallpaper Designer?
All you have to do is to apply for a Huawei Developer Account, you can do this by following my instructions:
1. First step is to register a Huawei ID.
To do this Go to -> https://developer.huawei.com/consumer/en/
Click on Register (To register your Huawei ID)
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Enter the required information in the Registration Form to create your new Huawei ID.
Click on the Register button once you are done.
That’s it, you have successfully created your Huawei ID
2. Login from your Huawei ID to Huawei Developer Console
If you are done creating your Huawei ID
Go to the following link: https://developer.huawei.com/consumer/en/
Click on “Console”
Enter your Huawei ID on the Login Page (Username & Password)
3. Following options will appear after you login for the first time through Huawei Developer Console:
If you are an individual, you have to click on the blue “Next” button in the Individual Tab. (I have created an individual account for myself therefore I will show you how to do it & skip the Enterprise account creation process)
4. After clicking the “Next” button, you have to provide correct personal information and as proof of your identity you will have to upload some identity verification documents (that includes driving license, passport, identity card, etc).
You have to upload 2 of the document in order to get verified (try to upload your documents that are in English, it will speed up the verification process)
5. Once you are done, accept the “Huawei Developer Privacy Policy” and “Huawei Developer Service Agreement” and after that click the “Submit” button
6. After this process your application will be forwarded for approval, normally it takes about 7 working days to get your application approved. (If you have provided correct personal information and uploaded correct identity verification documents)
7. Once your account is verified, you will receive the following email:
8. You can now login to your Huawei Developer Account and upon login you will see the following screen on Huawei Developer Console
Now you can start developing your Apps for Huawei AppGallery and designing your Themes for Huawei Themes Store.
Thanks for sharing the information
very useful
For theme development do we need any permissions ?