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

How to make a push notification without using Firebase Cloud Messaging and Android Service

I just wondering that Messenger, Discord, X,… doesn’t need running background service in order to receive push notification. So is there a way that we can do it too? I read some post about not using FCM but a service that fetch http constantly, it’s not a good idea to do that as it could

Read More
Android

Place reference grid over all ImageView

My app has a single ImageView in a LinearLayout. It currently places a photo in the ImageView preserving the photo’s aspect ratio by setting ScaleType.CENTER_INSIDE. This results, correctly, in a display with background color rectangles above or below (or left or right of) the photo. Now, I’d like to place a reference grid over the

Read More
Android

How to fix onBackPressed for an expanded material3 SearchBar?

I am using androidx.compose.material3.SearchBar in my Android project. Here is the structure: SearchActivity.kt: class SearchActivity { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_search) if (savedInstanceState == null) { addFragment(R.id.container, SearchFragment(), SearchFragment.FRAGMENT_TAG) } } } layout/activity_search.xml: <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent"> <androidx.fragment.app.FragmentContainerView android:id="@+id/container" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" tools:context=".search.SearchActivity" tools:ignore="MergeRootFrame" tools:layout="@layout/fragment_search" /> </androidx.constraintlayout.widget.ConstraintLayout> SearchFragment.kt:

Read More
Android

Material 3 Colors in Glance Widget (Jetpack Compose)

I try to match the original colors, Google uses in their widgets. But if you check the contentColor of my widget buttons vs. the yellow "+" button background of the Google Calender widget, you see that it is not matching that quite well. I rebuilded the widget already with jetpack compose to be able to

Read More
Android

Installation banner is not showing

I have a problem. I want to develop a PWA (Progressive-Web-App) with React.js. I want to help the user and I want that the users are able to see an installion banner. For now, for IOS is everything working perfectly. But unfortunately for Android it is not working. It is everything white. Thats all. What

Read More
Android

Suitability of NRF24l01 for BTLE advertisements

I want to use NRF24L01 for BTLE advertisements (received by Android phone) in a product but as per this thread https://devzone.nordicsemi.com/f/nordic-q-a/51120/using-the-nrf24l01-for-sending-out-ble-advertisement-packets-in-a-product-is-this-legal-certifiable it does not have the correct frequency deviation. Can anyone please explain what it means and its impact in BTLE advertisement? Note:I have built a prototype and it seems to be working fine Thanks

Read More
Android

React Native Expo – Button disappear when tested on APK build

I’m facing critical differences between the development version and the build version of my React Native app only on Android using Expo. The main issues I’m encountering is that the close button visible in the development version is missing in the build version (and other smaller UI problems) Here are the 2 screens: Development Version

Read More
Android

PWA installation banner works not for android devices

I have a problem. I want to develop a PWA (Progressive-Web-App) with React.js. I want to help the user and I want that the users are able to see an installion banner. For now, for IOS is everything working perfectly. But unfortunately for Android it is not working. It is everything white. Thats all. What

Read More
Android

LazyVerticalStaggeredGrid inside LazyColumn get infinity maximum height constraints error

I have a LazyColumn with an item that contains a LazyVerticalStaggeredGrid. By default, that item has that Grid invisible and when you tap it, the grid is visible. When the Grid is visible, the app crashs and i get the following error: java.lang.IllegalStateException: Vertically scrollable component was measured with an infinity maximum height constraints, which

Read More
Android

Unable to implement “Sign in with Google in React native Expo”

I have been trying to implement google sign in expo go and I have followed almost all the tutorials on youtube and configured it correctly but everytime I click on the button if using androidClientId, i am redirected to the pop-up which show error: "Access blocked Error 400: redirect_uri_mismatch" something like that but If I

Read More