Posts

Most used Android Debug Bridge (adb) commands

Afbeelding
Before you can start developing for Android, the Android SDK is required. One of the tools provided within the Android SDK is the Android Debug Bridge aka ADB. With adb a debug connection is created with an Android device. This connection can be used for a various features: Getting information about all installed applications, collecting device logging, file management.. and many more. Keep reading to learn all about ADB. Add adb.exe to default path enviroments By default adb.exe is found within android_sdk/platform-tools/ . In order to use the adb tool the cmd path must be the same. As it's used that often, most people add it to PATH system variable. xda-developers how to add adb.exe to PATH variable Basic commands Before we can start using the adb commands, step 1 is to be able to start and stop the process service. adb start-server Command to launch the adb process service ...

Android-x86 virtual machine configuration tips

Afbeelding
Android-x86 virtual machine configuration tips There are already several guides to install android x86 on virtual machines, but never about configuring them. This guide will show the most useful tips and tricks. If you read this without an Android x86 virtual machine follow below guides to install android x86 on a virtual machine: Install android with VM VirtualBox Install android with VMware Fusion This guide is writing with Androidx86 7.1-r2 as android version. Configure Android x86 to run with a GUI Android is based on Linux, which result that a default installation results in only terminal access. If you want a graphical user interface, and Yea we all want to use Android the same as a phone, we need to configure it to boot with a GUI. During installation GRUB is installed. Every time the Android x86 device boots, first GRUB is visible. ...

ListAdapter renewed

Afbeelding
ListAdapter renewed Every Android developer has worked with the RecyclerView when a list of content needs to be shown. Before the RecyclerView Android offered the widget ListAdapter , with bad performance and several other issues. Since the Android support lib version 27.1.0 Google added a new ListAdapter which extends RecyclerView.Adapter to make life even easier. Yes it has the name ListAdapter again :(, but for the rest it is completely different! The simplified ListAdapter To create a custom ListAdapter override the methods onCreateViewHolder() and onBindViewHolder(). All other methods are already handled by the ListAdapter and don't need any attention anymore. onCreateViewHolder() : Called when RecyclerView needs a new RecyclerView.ViewHolder of the given type to represent an item. onBindViewHolder() : Called by RecyclerView to display the data at the specified position. The ListAdapter constructor requ...

Road to App Bundle and Bundletool

Afbeelding
What is a App Bundle An Android App Bundle is a new upload format that includes all your app's compiled code and resources, but defers APK generation and signing to Google Play. ... So, users can download apps as large as 500MB and, with dynamic delivery, all of that storage is used for only the code and resources they need to run the app. source: https://developer.android.com/guide/app-bundle Google is actively trying decrease the sizes of apks, first with Multiple APK support . But this was not really a success as most developer should didn't use this feature. With App Bundle it's automatically executed on the background when the App Bundle is uploaded to the play store. This feature is called Dynamic Delivery .For each language, density and ABI (Application Binary Interface) an apk is generated with only the required content. This results in smaller apk's, which result in faster download times and less memory usage. ...

Refactor to Android X

Afbeelding
At the Google I/O 2018 AndroidX is announced. To prevent any miscommunication about what parts are from Android os and which parts are from extra supporting libraries. As app developer I'm always looking to improve how to build app and use the best tool / libraries to get maximal results. Migrate Android projects, using support libraries, to AndroidX to be ready for further updates. AndroidX packages With the implementation of AndroidX all API package naming is updated. Below we see an example of pre AndroidX packages com.android.support:appcompat-v7 and com.android.support.test.espresso . implementation 'com.android.support:appcompat-v7:27.1.1' implementation 'com.android.support.constraint:constraint-layout:1.1.0' implementation 'com.android.support:design:27.1.1' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android...