Solved : AAPT: error: unbound prefix / file failed to compile

When we tried to edit the existing layout XML in android by adding Material theme for EditText, but got the below error, Solution : In our resource xml file, following line was missing, So, we changed /home/myuser/android_app/app/src/main/res/layout/fragment_name.xml to make it like, So, in your code it can be any Layout.

Identify WiFi Mac, Product Model, Serial Number using ADB

If you are looking for the device information of your Android device such as, product model, manufacturer, serial number or WiFi mac address etc, we will show how this can be obtained using following adb shell commands First connect your android device/mobile over USB/Ethernet and check if that device is connected as Check the Mac … Read more

Selecting Birthdate using Material Calendar in Android

In this post, we will show you how to use Calendar from Material components for selecting Birthdate of user during registration process in UI. In Above code below code create the Material Date picker builder. Below code sets the Input Mode of Calender, we are using INPUT_MODE_CALENDAR to show the complete calendar. Set the title … Read more

Create two buttons of equal size inside Linear Layout in Android

Following code we used to create two buttons we use to select the Gender of user during registration, As you can see in LinearLayout we have set, android:weightSum=”2″ and then in each of the button we set android:layout_weight=”1″ to make those of equal size, and also another important is android:layout_width=”0dip” For using Material view for … Read more

How to add drawable icon along with TextView in Android ?

We wanted to show icons along with titles in our applications, this is possible in one way to add Imageview along with textview and combine both in a LinearLayout while we write layouts.xml. But all of this has been very simplified by adding just a drawable within textview and mention whether we want the icon … Read more

How to add border around Android Textview ?

One of our android app shows lot of user information in text views one after another, to make sure this information looks good, we added a top card layout and inside that the information in text views with bottom border, so it looks good. This post shows how you can add a border to textview, … Read more

Alert Dialog with Buttons in Material components in Android

In our previous post, “Show alert dialog with options on click on Button in Android” we have shown how you can write alert dialog with options on click of a button and the alert dialogs were shown using default AppCompat theme. In this post we will show how to write alert dialogs using material theme. … Read more

Setting up a Material Components theme for your Android Application

Recently we migrated one of our old application to Androidx and then we came across this Material components which we can use for our app. This posts details only changes required to migrate your app from AppCompat theme to Material Design theme. Other details of Material components can be seen on its website. Modify app/build.gradle … Read more This request is missing a valid app identifier, meaning that neither SafetyNet checks nor reCAPTCHA checks succeeded. Please try again, or check the logcat for more details

Prerequisite : “Identify and add SHA1 / SHA-256 Certificates to Firebase console for Phone Authentication” When we were trying for Firebased based SMS OTP Authentication for our android app, we followed all the steps but got the exception as below, Solution : This can be solved by modifying app/build.gradle to add a line as,