October 22, 2024
Chicago 12, Melborne City, USA
Android

Since your App has not been integrated with HMS yet

I’ve implemented Huawei DRM and added key fingerprints,while my app "cannot be used or displayed on the HMS": Notes: Since your App has not been integrated with HMS yet, It cannot be used or displayed on the HMS. If integration of HMS is needed, please refer to: https://developer.huawei.com/consumer/en/doc/development/HMSCore-Library/android-sdk-download-0000001064112371 This link doesn’t work, while the documentation

Read More
Android

Whats wrong with this unit test?

@OptIn(ExperimentalCoroutinesApi::class) @Test fun `view model test`() = runTest { val employees = EmployeeResponse(listOf()) `when`(employeeRepo.getEmployees()).thenReturn(employees) `when`(employeeMapper.mapToState(anyList())).thenReturn(emptyList()) val testDispatcher = StandardTestDispatcher(testScheduler) Dispatchers.setMain(testDispatcher) viewModel = EmployeeViewModel(employeeRepo, employeeMapper) viewModel.getEmployees() advanceUntilIdle() Assert.assertTrue(viewModel.uiState.value is EmployeeViewModel.EmployeeState.Success) verify(employeeRepo, times(1)).getEmployees() Dispatchers.resetMain() } The assertion is failing because, assertion statement is executing before _uiState is executed. How to fix it? View model code is below

Read More
Android

React Native Expo app says “Custom Layout View” in Android build only

after I start the app, the splash screen is followed by a white screen saying "Custom Layout View" but only using Android. The problem does not appear on ios at all and the problem does also not appear in android expo go. I checked the app.json and my router structure. I use a _layout file

Read More
Android

How do I force the UI to reload with Jetpack Compose?

I have a GameState object which gets updated whenever the state of the game changes, and some of the UI doesn’t update properly. I would like to just call a reload function whenever the data reloads so I don’t have to worry about it not updating. package dev.madcatter.lostworld import android.content.Intent import android.os.Bundle import androidx.activity.ComponentActivity import

Read More
Android

How to custom bluetooth advertising data

I am deverloping bluetooth advertising on android. I need to set a advertiseData like this adv_data_const[31] = { 0x02, 0x01, 0x06, 0x03, 0x02, 0x50, 0xFD, 0x17, 0x16, 0x50, 0xFD, 0x41, 0x00, //Frame Control 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; and scan response data

Read More
Android

How Can I Receive Notifications with Firebase Cloud Messaging in Android?

I’m trying to receive notifications in my Android app using Firebase Cloud Messaging (FCM). But it doesn’t work the way I want. I have two devices and I send notifications from one to the other. I get notifications on my second device. However, when I click it, it does not enter the activity I want.

Read More
Android

Proto DataStore Fails to Generate Files Due to AndroidSourceSet Conflict in Gradle

I’m trying to implement Proto DataStore in my Android project, but the library fails to generate any files from the .proto file and throws the following exception: A problem occurred configuring project ':core:datastoreproto'.> org.gradle.api.InvalidUserDataException: Cannot add an AndroidSourceSet with name 'debug' as an AndroidSourceSet with that name already exists. You can see below how I

Read More
Android

Mobile app monetization – looking for ad providers

I have developed a few mobile apps (Android). For the last month I have been working on a new one and I decided to try integrating ads. Though I have a lot of problems with finding the right ad provider, so I decided to ask other people in the community for opinions. Firstly, I tried

Read More
Android

android.adservices.AD_SERVICES_CONFIG Android Manifest Error

So I’m having Problem with my manifest merger, play-services-measurement-api and play-services-ads-lite, so I tried adding <meta-data android:name="android.adservices.AD_SERVICES_CONFIG" android:resource="@xml/gma_ad_services_config" /> to Override the error so the merger can ignore one but it doesn’t work does anyone have a solution to this? I tried even commenting out ads initialization but it doesn’t work, Here are my Question?

Read More
Android

How to use Tauri Resource Files properly on Android

I’m currently trying to write an android app using tauri that is required to access font resource files. I added these files in my src-tauri directory within a fonts folder. In my tauri.conf.json I set the "bundle": {"resources": ["fonts/*"]} specifier I checked the targe > debug directories and the fonts folder + font files were

Read More