Archive for the ‘Android’ Category

Android Dictation app – Google SpeechRecognizer

Sunday, August 31st, 2014

Found this great article titled “Develoing Android* Application with Voice Recognition Features”, by Stanislav of Intel.  Included is a SpeechRecognitionHelper class which instantiate and invoke Google SpeechRecongizer service.  Unlike iOS OpenEar library, the free Google SpeechRecognizer service requires internet access but is impressively faster in performance and accuracy.  Apparently offline processing is possible for some devices with Jellybean and later.  Goto Settings->Language and input->Voice search->Offline speech recognition and install your language packet.  Inside the Dictation project Manifest file, comment out this line for internet permission.

<uses-permission android:name=”android.permission.INTERNET” />

Screenshot_2014-09-01-08-35-38 Screenshot_2014-09-01-08-34-50

For features and UI, there are four buttons, Dictate, Last, Clear and Save.  Dictate will invoke the Google SpeechRecognizer service and render/append the interpreted text on to the page.  I am assuming each dictation is a complete sentence and insert a period after.  The Last button will remove your last dictation instance.  The Clear button will remove all dictations.  The save button will write/append all text on screen to file along with a time stamp.  Additional features such as deletion is probably a good idea but not implemented.  Below are some screenshots of the app in operation.

Screenshot_2014-09-01-10-17-59 Screenshot_2014-08-31-19-35-52 Screenshot_2014-08-31-19-37-14 Screenshot_2014-08-31-19-47-20 Screenshot_2014-08-31-19-47-41

Complete Dictation project source maybe found on Github.

Installation of the Dictation app is available on GooglePlay under the yeuchi collection.

 

Samsung SPen SDK v2.3 exercise

Sunday, July 20th, 2014

According to Samsung SPen developer documentation, we should be using the latest Samsung Mobile SDK, version 3.0.  SPen SDK version 2.3 will no longer be supported after the 2014 calendar year.  The developer website is full of examples for the SPen usage for native mobile development in java.  Here is an SCanvasView intro page. For the most simple pen drawing exercise with SPen SDK version 2.3, I am creating this SCanvasView exercise, Note2Stylus.  All the smarts like anti-aliasing, smoothing and line thickness is handled by the SCanvasView right out of the box, very cool.  This app is created with Eclipse Juno – Android developer tool with SDK version 23.  The target hardware device is a Samsung Note 2 with Android 4.4.2.

Screenshot_2014-07-20-19-55-36

MachWaves – Android

Sunday, July 6th, 2014

Prototype and testing on Android 4.4.2, Saumsung Note II, the MachWaves app is build with eclipse-ADT, consisting of three tab-fragments, camera, configuration and about (help) page.

tab1Small tab2Small tab3Small

On tab1, camera feature current only supports still photo in portrait mode.  The highlight is default with a green color but should make it to tab2, configuration page in next iteration.  What else would be helpful in configuration ?  (highlight stroke thickness, saved file style, auto-save, angle in radian, ??).  Tab3 is the help page with a browser link to the generic support page.

downloadCrop

Saved files are currently placed in /storage/emulated/0/Pictures/ directory.  The file name follows the structure, d MMM yyyy HH:mm:ss.png.  There is currently no way of saving the highlighted image with angle and mach number information.  Would that feature be of interest ?  Maybe I should offer the option to save file as jpeg or gif too.

base1 base2

Touch start/end events for two lines are drawn as highlight for the Canvas layer.  For the Mach angle, I determine intersecting vectors and calculate their dot product.  Mach number is estimated by the relationship, sin (mach-angle) = 1 / mach-number.  For more information, see reference, Compressible-Fluid Dynamics by Philip A. Thompson, 1988.

Download from GooglePlay, here or pull the source code available on GitHub.  Feel free to use it in anyway you see fit though higher quality code will be available next iteration.  Any suggestion is greatly appreciated.

MachWaves

Thursday, June 26th, 2014

Thank you Professor Andy Davidhazy, RIT for teaching schileren method among many other flow visualization techniques. Thank you Dr. Brown of NASA Ames Research center for including me in your experiments.

Decades ago, I was privileged to work (co-op) at the Imaging Technology Branch of NASA Ames Research Center.  For most of the experience, I was in awe, fascinated by the brilliant minds, facilities and experiments much like a child would in Disney World.

NASA2_thumb

In one particular photographic assignment at the High-Reynolds laboratory, I was allowed to inquire/propose a moire schileren technique I read and learned from an old text, Schlieren Methods, Douglas William Holder, 1963 (rare but available at RIT library).  For knife edge replacements, I created various ronchi rulings with the following result-best case  (a) parallel-ronchi-rules-supersonic-flow (b) rotated-ronchi-rules-no-flow (c) rotated-ronchi-rules-supersonic-flow.

moire1_thumbmoire2_thumbmoire3_thumb

 

Recently, I developed these mobile apps, Machwaves to offer simple photo/video capability and measure mach angle, mach number.  As I have no qualifying fluid dynamic experience, I welcome any input or correction on this application.  Source code in objective-C and Java is freely available.  Information about the app and download sites are available here.

 

 

 

 

 

Android-Flex accelerometer sketch 2

Tuesday, September 4th, 2012

Made some minor enhancement on the year old android application, XLOsketch.  Like the first implementation, accelerometer is required.

Screen Shot 2012-09-04 at 6.56.15 PM

Correction from version 1.0, the drawing path appropriately draws downward as you would expect with gravity.  The steeper the angle, the faster it travels.

IMAG0135Also, there is a pause-continue option.  When paused, user has the control to change the stroke thickness.

IMAG0138

Project Source code is available on GoogleSVN.  Or download from Android marketplace (Google play).

Screen Shot 2012-09-04 at 3.35.25 PM

Android sketch with accelerometer

Sunday, February 6th, 2011

xlosketchxloSketch is my first downloadable on Android Market.  It took 20 minutes to develop it with Adobe Flex builder.  This application is essentially an Etch-a-Sketch without knobs.  Use the accelerometer to navigate the rendering line.  Use multi-touch gesture, rotate to delete and restart the drawing.

What features might make it better ?  different colors ? fill-in ? pen thickness? speed control ?

Android Froyo WireFrame3D

Monday, January 3rd, 2011

wireframeThis is my first experiment with FlashBuilder Burrito (beta) for Android development.  It is a 3D line rendering application.  Here is the project source code.  Like Java’s claim of fame “build once, run everywhere”, so is Flex !  Here is the same mobile wireframe3D application running on a browser.  Next iteration, I would like to speed up the performance and improve the rotation UI.  In this application, I am testing out Matrix3D, Vector3D, multi-touch (zoom, rotate) and standard click, button controls.