Categories
Android Development

Sorting data according to Road Distance in Android App

I am making a simple android app where I want to sort the service providers according to their distance with the user. All the solutions that I have seen were related to opening google map. I just want the road distance of every service provider from user. I want a small icon on right hand […]

Categories
Android Development

How can you keep the Structue window always displayed in Android Studio 3.5.1?

I’m sure that I open the Structure window in my Android Studio 3.5.1 project, you can see Image 1, but sometimes Android Studio 3.5.1 hide the Structure window automatically. I hope to keep the Structure window displayed. How can I do? Image 1

Categories
Android Development

Event Of Specific BT device Has Connected Android

I want to know when specific BT device has connected. What I tried is, BroadcastReceiver listen to ACL_CONNECTED. But it works only when app is running. When I stop app, I don’t get the event. I read that Android exempted this event But still doesn`t work. Do you know another solution? <receiver android:name=”.recivers.BTReceiver” android:enabled=”true” android:exported=”true”> […]

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 […]