Categories
Android Development

Android Studio emulator icons not visible after quick booting a few times

When I boot emulator for the first time then everything is okay, but when I close it and it starts it again, it quick boots, but app icons become invisible only app names are shown. as shown in the above image. When I start it again using cold boot mode it then icons appear. I […]

Categories
Android Development Kotlin

OTP Input in Kotlin – library android-otpview-pinview

I am using below library in my Android application to provide UI for OTP : https://github.com/mukeshsolanki/android-otpview-pinview Successfully, Added dependency as below : implementation ‘com.github.mukeshsolanki:android-otpview-pinview:2.1.0’ Also, added below line : maven { url “https://jitpack.io” } Using it in layout as below : <com.mukesh.OtpView android:id=”@+id/otp_view” android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:layout_centerInParent=”true” android:inputType=”number” android:itemBackground=”@drawable/drawable_otp_entry” android:textColor=”@android:color/white” app:itemCount=”4″ app:lineColor=”@color/colorPrimary” app:viewType=”none” /> Now, at […]

Categories
Android Development HTML

can’t login in HTML page which loaded in android webview

Hello friends I have one android WebView app. in that app I have loaded particular URL. the problem is that web-page have login page when press login it returns the same login page again . anybody tell me how to solve this problem here is my mainactivity – public class MainActivity extends AppCompatActivity { public […]

Categories
Android Development Kotlin

Android Studio – Kotlin – How to make the reference to the service null?

I’m trying to adapt Google’s LocationsUpdatesForegroundService example into Kotlin to use in my app. Now, everything is going fine, until I need to make a reference to a service equal to null. That doesn’t ’cause any problems within the Java code it originates from but, when I try to implement it in Kotlin, even if […]

Categories
Android Development

Image optimization Android to reduce the APK size

I have created an apk whose size is 80mb. I have set minifyEnabled true shrinkResources true in Gradle file. Now I want to optimize the images so that it will reduce the APK size. How can I optimize the images in android?

Categories
Android Development

How do I get back to the default Android Studio toolbar?

I recently updated my laptop to Ubuntu 18.04 and lost my Android Studio 3.5.1 settings including the toolbar, which now looks like this: How do I get back to the default toolbar, which had a bunch of icons to the right of app drop-down menu (Select device drop-down menu, run button, Apply changes and restart, […]

Categories
Android Development Linux

Android TUN interface not working inside Linux-Deploy chroot. Up but no any packets

I am trying to bring up openvpn client on Android 5.0 inside linux-deploy chroot with Debian Buster inside (android kernel 3.10.65) The tun is up and get ip address, but no any packets transfered. No ping works or any tcp connection. Openvpn successfully keep-alives and didn’t drop, stays connected forever. The same config works on […]

Categories
Android Development Plugins

ERROR: Unable to resolve dependency for ‘:app@debug/compileClasspath’: Could not resolve androidx.legacy:legacy-support-v4:1.0.0, why?

I don’t really know where this problem is coming from, been trying to fix it for while now. when i perform a gradle sync i keep getting this error. ERROR: Unable to resolve dependency for ‘:app@debug/compileClasspath’: Could not resolve androidx.legacy:legacy-support-v4:1.0.0. And i don’t even know why i’m receiving an androidx error, I didn’t even migrate […]

Categories
Android Development

Creating random colour in android with some key (for the same key it should generate same colour)

I’m developing a chat application, for this, I’m in need of generation random colour for the user profile picture. But I need to generate the same colour for the same person. I have a unique user id. I don’t like to save the colour code after generating the colour code once. So, basically I need […]

Categories
Android Development

getInitialUrl is not working when the app is in background using deeplinking in android

When the app is in background i would like to navigate to the into app from the chrome or message through link but it is navigating when i have removed the instance if (Platform.OS === ‘android’) { Linking.getInitialURL().then(url => { this.navigate(url); }); } else { Linking.addEventListener(‘url’, this.handleOpenURL); } // AppState.addEventListener(‘change’, this._handleAppStateChange); } componentWillUnmount() { Linking.removeEventListener(‘url’, […]