Why Device list won’t show up in the App GUI after integrated with HMS DeviceVirtualization engine? - virtualization

I followed HMS developer guide for Device virtualization (DV) engine development here - https://developer.huawei.com/consumer/en/doc/development/connectivity-Guides/devicevirtualization-preparation, I integrated DV SDK into my app, compile and build all finished fine. But after deployed my DV app to my cell phone, the hardware device list won’t show up in the app GUI. What could be the reason for this?

Please check to see if you have already done the following:
First of all, you need send Permission applications for the usage of DV Engine to : devConnect#huawei.com
Once your application is approved, make sure you also include all the required permissions and your app id as meta data in AndroidManifest.xml. Virtual device permission of DV Engine, which is mandatory for using the distributed virtual devices.
com.huawei.permission.DISTRIBUTED_VIRTUALDEVICE
<meta-data
android:name="com.huawei.hms.client.appid"
android:value="appid=xxxxxxxxx"/>
Make sure the DV SDK version in your code is same as the one in your cell phone. Below is a sample code to show how to check the DV version: CURRENT_KIT_VERSION is the HUAWEI DV Engine version that the app is compatible with. Your app needs to record the version, and check whether the DV Engine version on your mobile phone is the same as the DV Engine version that the app is compatible with.
boolean isSupport = true;
try {
// Obtain the running version of DV Kit.
String version = DvKit.getVersion();
if (version.compareTo(CURRENT_KIT_VERSION) < 0) {
// The current DV Kit version does not meet the app running requirements.
isSupport = false;
}
} catch (NoClassDefFoundError e) {
// The current running environment does not support the DV Kit.
isSupport = false;
Log.e(TAG, "DvKit not exist", e);
}
if (isSupport) {
// The current DV Kit version meets the app running requirements.
Intent intent = new Intent(MainActivity.this, DvKitDemoActivity.class);
startActivity(intent);
}

1. Please check Device Compatibility:
Currently, DeviceVirtualization Engine supports only Huawei mobile phones. When an app invokes the APIs in DV Engine in an unsupported running environment, or on a Huawei phone running an unsupported EMUI version, the system throws NoClassDefFoundError. Therefore, apps should check compatibility between the running environment and DV Engine version. For details, see docs.
2. Check whether the callback method connect is called successfully:
If so, your configuration is correct;
If not, check whether you have the permission to access related APIs. For security purposes, you need to apply for permissions from Huawei to use open APIs of DeviceVirtualization Engine. As #Zinna put it, applying for API permissions requires the app ID generated after you created your app on AppGallery Connect, and that the fingerprint has been configured. For permission application, please send an email to devConnect#huawei.com, and specify the topic "DeviceVirtualization Engine permission application." For details, please see docs.
3. Network connection is required when you start your app for the first time.
Check whether the callback method startDiscovery is called successfully. If so, and device parameters are not empty, you can send data to the UI thread through threads. For details, please refer to the demo provided on the official website.

Related

Access saved wifi connections and their passwords on android sdk >=30

I need to retrieve all wifis that are saved on a device (were used before) and if it is possible get their passwords.
I tried couple of libraries to do it but none of them managed to do what I'd like to achieve.
The closest to the solution was wifi_iot flutter library.
I managed to get all wifis that are currently available and there is method to check whether connection was registered before or not, but in newer version of android sdk >= 29 it doesn't work (and password field is always null).
Is it even possible to get these data?
You cannot retrieve the password of a WiFi network unless your app is a Privileged app (i.e. an app that is pre-loaded on the device).

After application uses the same package name in AppGallery and GooglePlaystore, it is removed due to Google Play protection

Application is removed playstore by Google Protect.
Every release the version code from Huawei App Gallery is always higher than the version code in Play Store.
The new release version code in the Play Store will higher than the previous release version code in both Play Store and App Gallery.
But the rolling out percentage between the two stores is different. Not sure it would affect
Please help with another quick question. What will happen to App Gallery auto-update if we release the app in Huawei App Store with a different Keystore than the release in Google Play Store?
For the overwriting of each other from AppGallery and Google Play store problem, the root cause is the apps are using the same package name and the same signing key in conjunction with auto-update from both stores. When there is a higher version available from either store, the Android system would recognize it, download and update the app, which would cause overwrite.
The answer is actually in the second question. Using a new keystore for AppGallery would make the app different from the app from GPS from Android system point of view. Please use a new keystore for AG release, there will not be any overwritten problem once this update. Remember to update the SHA256 signature in AG for the new release.
This is a message displayed on Google Protect. We could not restrict the play protect. You can disable Google Protect on your phone manually.
In addition, Google Protect is a black-box detection, which is claimed to be an intelligent detection and may display a message for all apps that are not downloaded by Google Play.
Based on the warning message, this message comes in "Backdoor" category(refer below link).
https://developers.google.com/android/play-protect/warning-strings
Also you can refer the below link
https://developers.google.com/android/play-protect/client-protections#developer-appeal
So you can contact google support team regarding this.

How to Upgrade my flutter app without using Playstore or App store?

I have an app created for internal use. I have not published it on the play store, but I have to update it regularly.
Can anyone help...with which library should I use for implementing a self-upgrade system to my app. Any answer would be appreciated.
The answer is - yes,
You can upload your app to the Apple Store and Google Play but Not publish it to the public, instead, you can use internal testing
So only users that you define will be able to see or download your app in the Google Play and Apple Store
Google Play internal test https://support.google.com/googleplay/android-developer/answer/9303479?hl=en
Apple test flight https://developer.apple.com/testflight/
Yep it has some limitations, for example, Apple allows up to 10000 testers but I hope it's ok for your company, but its only way to share app internally without any issues on iOS (android allow you to download apps from anywhere, iOS don't)
The answer is - no, you can't do that - not at least the Flutter* apps. As #Abion47 said, you can publish the new APK and ask users to install it. If you app involves back-end then you can check the (client) mobile app version and display the alert if the version is below minimum version required.
On the iOS side, it is slightly more difficult. For internal use, the organisation needs to sign-up with Apple's enterprise program. You can then distribute the app internally.
*- I've seen certain apps downloads the zip (or whatever) file, and updates themselves without actually going through App update process via AppStore/Playstore. However, it is more of a web part within the particular app which gets updated. The app version as such remains same.

Phone Gap iPhone App itunes connect error “invalid binary”

I have created a phoneGap app for iphone and successfully deployed it device.
Now i am trying to upload the app to app store using xcode 4.5
Successfully validated.
Successfully Distributed.
itunes connect app status-- app received
after 3sec app status-- invalid binary
I am using phone gap 1.2.0, xcode 4.5, target ios version 6.0, Distribution provisional profile.
I have received email followup from apple
Non-public API usage:
Apps are not permitted to access the UDID and must not use the uniqueIdentifier method of UIDevice. Please update your apps and servers to associate users with the Vendor or Advertising identifiers introduced in iOS 6.
If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. In addition, note that one or more of the above APIs may be located in a static library that was included with your app. If so, they must be removed.
If you think this message was sent in error and that you have only used Apple-published APIs in accordance with the guidelines, send the app's nine-digit Apple ID, along with detailed information about why you believe the above APIs were incorrectly flagged, toappreview#apple.com. For further information, visit the Technical Support Information page.
Somebody please help.
Apple Changed their policy on using the UDID. Which was included by default in earlier version of Phonegap API on IOS. If you upgrade to the newer versions you will find the code no longer uses the UDID and will pass App store.
Looks like from version 1.8 onwards is the change.
Latest version of phonegap is 2.7 so it would be good to update anyways,

Mobile Application Management for iPhone

I am trying to develop a critical enterprise application for iPhone,which needs to be able to list all the installed applications on the device.
Also the application should allow the user to install other apps from this application by clicking some install button and uninstall app by clicking some uninstall button.That means this app should be able to manage all apps on the device (atleast all the enterprise apps on the device).
I know it is not possible in the sandboxed iPhone environment. So I am thinking to setup some MDM/MAM server which accepts requests from the client app in the iPhone and let the MDM/MAM server manage the app installation,deletion etc .
Is it possible to setup custom MDM or MAM sever? We already have an enterprise account.
If you want to determine whether other apps provided by your company are installed, you can add a unique URL scheme for each to the apps' Info.plist. Then to check their installation, you can iteratively check the return from -[UIApplication canOpenURL:]
If you want to be all crafty about this, you could download the list of url schemes from a server on your intranet. Thus users without a certain app could be directed to download it. Furthermore, you can check the installed version via a second special url for each app version of each app.
This does most of what you want… as for the uninstall, users can just hold down on the app until it jiggles then delete it.