Android

  • Android Input Keyevent

    Android Input Keyevent

    usage: input [text|keyevent] [code lang=”text”] input text <string> input keyevent <event_code> [/code] Codes:- [code lang=”text”] 0 –> “KEYCODE_UNKNOWN”…


  • Display HTML String in Android TextView

    Display HTML String in Android TextView

    [code lang=”java”] String htmlString = "<h1>HTML String Title in TextView</h1>\n" + "<h3>HTML Paragraph:</h3>\n" + "<p>Display html string in…


  • Sign the OTA Package

    Sign the OTA Package

    [code lang=”text”] java -jar signapk.jar -w platform.x509.pem platform.pk8 myupdate.zip myupdate-signed.zip [/code] Note:- 1. -w flag to sign the…


  • Adding a jar file from libs/ to Android.mk

    Adding a jar file from libs/ to Android.mk

    [code lang=”text”] LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE_TAGS := optional LOCAL_SRC_FILES := $(call all-subdir-java-files) LOCAL_PACKAGE_NAME := MDM LOCAL_STATIC_JAVA_LIBRARIES…


  • Generate RLE file through FFMPEG

    Generate RLE file through FFMPEG

    From PNG file to RLE file [sourcecode language=”text”] ffmpeg -vcodec png -i logo.png -vframes 1 -vcodec rawvideo -f…


  • Schedules the task to run asynchronously

    Schedules the task to run asynchronously

    There are three ways to achieve this in Android. Through Worker thread [code lang=”java”] private static final ScheduledExecutorService…


  • Android USB communication

    Android USB communication

    Permissions:- Need to add following permissions in AndroidManifest.xml file. [code lang=”xml”] <intent-filter> <action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" /> <intent-filter> <meta-data android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"…


  • Android get MAC and IP addresses

    Android get MAC and IP addresses

    Permissions:-      Need to add following permissions in AndroidManifest.xml file. [code lang=”xml”] <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />…