Category : huawei-mobile-services

im integrating huawei Services in my app in flutter, and integrating for the backend I’m using this json to send the push notification { "validate_only": false, "message": { "data": "{params:{notificationType: Test, ticketId: Test}}", "android": { "ttl": "1296000", "delivery_priority": "HIGH", "notification": { "title": data.title, "body": data.body, "click_action": { "type": 3 }, "importance": "NORMAL", "default_sound": true, "use_default_vibrate": ..

Read more

I tried to run our app on Android Emulator but it crashes without showing any error message. It works fine on iOS and HarmonyOS devices. It was working before. I did not change anything but it started stopping app while launching. I get this error messages on Android Studio. 2021-06-08 12:49:25.488 5944-5944/com.xxx E/HAInstanceManager: createInstance error ..

Read more

I have written an android app that executes python 3.8 scripts through JNI. This app works well on samsung, wiko and emulator devices but it randomly crashes on a Huawei P30 device with this backtrace: * thread #37, name = ‘Thread-3’, stop reason = breakpoint 1.1 * frame #0: 0x00000072845feeec libart.so`art_sigsegv_fault frame #1: 0x00000072845ff3f4 libart.so`art::FaultManager::HandleFault(int, ..

Read more

@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP) public boolean onShowFileChooser(WebView mWebView, ValueCallback<Uri[]> filePathCallback, WebChromeClient.FileChooserParams fileChooserParams) { time = System.currentTimeMillis(); if (checkStorageperm()) { if (checkCameraperm()) { if (uploadMessage != null) { uploadMessage.onReceiveValue(null); uploadMessage = null; } uploadMessage = filePathCallback; Intent pickIntent = fileChooserParams.createIntent(); String[] mimetypes = {"image/*", "application/pdf"}; pickIntent.putExtra(Intent.EXTRA_MIME_TYPES, mimetypes); pickIntent.setAction(Intent.ACTION_GET_CONTENT); Intent takePhotoIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); if (takePhotoIntent.resolveActivity(getContext().getPackageManager()) != null) ..

Read more

When I use this api to get access token: https://oauth-login.cloud.huawei.com/oauth2/v3/token?grant_type=client_credentials&client_id=****&client_secret=**** it always returns { "sub_error": 20001, "error_description": "missing required parameter: client_id", "error": 1102 } although I send client_id parameter Source: Android..

Read more

i wrote a method to generate link using Applinking Huawey fun generateLink(text: String, promo: String): Single<String> = Single.create { emitter -> AppLinking.newBuilder() .setUriPrefix(Const.Deeplink.BASE_URL_APPLINKING) .setDeepLink(Uri.parse(Const.Deeplink.BASE_WEB + addParams(mapOf(Const.Deeplink.PARAM_PROMOCODE to promo)))) .setAndroidLinkInfo(AppLinking.AndroidLinkInfo.newBuilder() .setAndroidDeepLink(AGS + Const.Deeplink.PACKAGE_NAME_ANDROID) .build() ) .setIOSLinkInfo(AppLinking.IOSLinkInfo.newBuilder() .setIOSDeepLink(AGS + Const.Deeplink.PACKAGE_NAME_IOS) .setBundleId(Const.Deeplink.PACKAGE_NAME_IOS) .build() ) .buildShortAppLinking(ShortAppLinking.LENGTH.SHORT) .addOnSuccessListener { link -> Timber.e("${link.testUrl}") text.plus("n").plus(link.shortUrl?.toString()).also { emitter.onSuccess(it) Timber.e(it) } }.addOnFailureListener { var ..

Read more