ANDROID MISC / CATATAN</>↗Android Misc11 Feb 2024
I was trying to run Android Studio Emulator on my old 13-inch Mid 2012 MacBook Pro (Mac OS X Catalina, version 10.15.7). Every time I tried to start a Virtual Device it failed to start, it crashed all the time. Checking the idea.log, which located at $HOME/Library/Logs/Google/AndroidStudio2023.1/, give me some hints. The log tells me […]
ANDROID MISC / CATATAN</>↗Android Misc20 Mei 2021
The following Android code snippet shows you how to customize the input value format of an EditText component for accepting currency number. To format the input value we will create a text watcher class called MoneyTextWatcher, this class implements of the android.text.TextWatcher interface. In the MoneyTextWatcher class we implement the afterTextChanged(EditText s) method, in this […]
ANDROID MISC / CATATAN</>↗Android Misc19 Mei 2021
The following code snippets shows you how to get a Device ID of an Android phone. To be able to read the Device ID you need to update the AndroidManifest.xml file and add the READ_PHONE_STATE permission. <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.kodejava.android"> <uses-permission android:name="android.permission.READ_PHONE_STATE" /> … … </manifest> package org.kodejava.android; import android.Mani...
ANDROID MISC / CATATAN</>↗Android Misc15 Mei 2021
In this example we are going to create a simple Android application to print texts to a Bluetooth thermal printer. We’ll be using the Android library for ESC/POS Thermal Printer to develop this example. We begin by creating an Android project with an Empty Activity. After the project is created we need to edit the […]
ANDROID MISC / CATATAN</>↗Android Misc13 Mei 2021
This example show you how to connect and read data from MySQL database directly from Android. The following steps and code snippet will show you how to do it. Add the MySQL JDBC driver into your project dependencies. Open the app/build.gradle file and add the dependency. … … dependencies { … … implementation 'mysql:mysql-connector-java:5.1.49' } […]