How to Export and Import Java Documentation in Android Studio

When creating an Android library for distribution, besides the class package, source code and documentation are also needed in order to assist developers. Although Eclipse is convenient that you just need to right-click on the project and choose export to generate Javadoc and JAR file, more and more Android developer gets started to use Android Studio instead of Eclipse ADT. In this tutorial, l will show you how to pack and attach Java documentation and source code in Android Studio from scratch.

Read more

How to Monitor USB Events on Android

Comparing to iOS, one of my favorite Android features is that Android supports USB peripherals. It’s fairly convenient to connect USB devices to Android smartphones via OTG cables. Therefore, no matter whether your Android phones, which probably only have 16G built-in storage, have SD card slot or not, it’s still capable of extending storage spaces with the power of accessing USB flash drive on Android operating system. In this post, I’d like to share what I’ve learned from Android developer website about how to monitor the events of attaching and detaching USB devices.

Read more

How to Push Notifications to Android Applications from Windows

When you are scanning tons of documents with your scanner applications, probably you don’t have enough time to take a break sometimes. Because you need to stare at the screen for checking all scanning information in case of some errors. Fortunately, mobile applications can help us reduce the burden. No matter where we are, using a smartphone as the monitor is a convenient way to deal with some emergencies. In this tutorial, I’d like to share how to create an Android application for receiving notifications from a .NET scanner application which is implemented based on Dynamic .NET TWAIN.

Read more

Wireless TWAIN Document Scanning on Android

If you have a TWAIN-compliant scanner, you can easily control it with Dynamic Web TWAIN or Dynamic .NET TWAIN. Both SDKs can help you create some excellent applications for document scanning and management on PCs. However, have you ever complained that it’s so inconvenient to stay with your scanners and PCs all the time? Since mobile technology is so hot today, why don’t you make TWAIN scan wireless, getting rid of clumsy machines? In this tutorial, I’d like to show you how to create a simple Android application and a .Net TWAIN server to conveniently capture document images from remote TWAIN scanners to your smartphone.

Read more

Getting Started with JNI on Android, Windows and Mac

Java Native Interface (JNI) is the glue between Java and native code such as C, C++, and assembly. With JNI, Java applications are capable of supporting platform-specific features. JNI enables developers to call low-level APIs (e.g. SQL, OpenGL etc.) to make Java application more powerful with higher performance. For example, we can download a JDBC driver, and unzip the jar package to take an insight. The driver is not written in pure Java. It also contains native libraries for Linux, Mac, and Windows.


Since JNI is so useful, I’d like to share how to get started with JNI on Android, Windows, and Mac.

JNI on Android

Download NDK and configure the location in Eclipse:

android JNI

Create a new project named hellojni. To automatically generate the native C/C++ code and configuration file, you just need to right-click on your project and select Add Native Support:


After that, a JNI project will be automatically generated. To build the shared library, you just need to implement JNI methods in C/C++, and add configurations in


When you save all changes, the shared library will be automatically generated. You can also build the library by typing in ndk-build.ndk_build

JNI on Windows

Create a Win32 project named hellojni in Visual Studio:

Read more

Making Android Smart Phone a Remote IP Camera

When you are going to purchase a new smartphone like iPhone 6 or Galaxy S5, don’t just throw your old devices away. Via socket connection, we can build a remote monitoring system with obsolete mobile devices instead of purchasing expensive Webcams or wireless cameras. In this article, I’d like to share how to connect an Android camera app to a remote server by socket, as well as how to display the camera preview frames of my mobile device on the server Window.

Read more