Tuesday, April 29, 2014

The navigation drawer is a panel that displays the app’s main navigation options on the left edge of the screen. It is hidden most of the time, but is revealed when the user swipes a finger from the left edge of the screen or, while at the top level of the app, the user touches the app icon in the action bar.

With navigation drawer, you can easily develop app with YouTube or Google+ apps like navigation.

Sunday, April 27, 2014

Previous example show how to Implement PagerTitleStrip on ViewPager. In the onCreate() method, we get view of PagerTitleStrip (pagerTitleStrip) without using it. We can set text size and color of the PagerTitleStrip by calling its setTextSize() and setTextColor() methods.

Saturday, April 26, 2014

This example show how to use android.media.AudioRecord and android.media.AudioTrack, to record and playback audio. And also show how to implement voice changer by recording and playing audio in different sampling frequency. (Actually, it is almost same as my old example)

AsyncTask enables proper and easy use of the UI thread. This class allows to perform background operations and publish results on the UI thread without having to manipulate threads and/or handlers.When first introduced, AsyncTasks were executed serially on a single background thread. Starting with DONUT, this was changed to a pool of threads allowing multiple tasks to operate in parallel. Starting with HONEYCOMB, tasks are executed on a single thread to avoid common application errors caused by parallel execution.If you truly want parallel execution, you can invoke executeOnExecutor(java.util.concurrent.Executor, Object[]) with THREAD_POOL_EXECUTOR.

This example show how to execute multi AsyncTask at the same in parallel, by calling executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR) for (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB), in our StartAsyncTaskInParallel() method. The first three ProgressBars updated by AsyncTask execute in normal approach by calling execute(), the last two ProgressBar updated by AsyncTask execute in parallel.

Wednesday, April 23, 2014

The demand for Android apps is not slowing down but many mobile developers who want to create Android apps lack the necessary Java background. This beginner guide gets you up and running with using Java to create Android apps with no prior knowledge or experienced necessary!

Shows you the basic Java development concepts and techniques that are necessary to develop Android apps

Explores what goes into creating an Android app to give you a better understanding of the various elements

Addresses how to deal with standard programming challenges and debugging

Beginning Android Programming with Java For Dummies puts you well on your way toward creating Android apps quickly with Java.

As the Android operating system continues to increase its share of the smartphone market, smartphone hacking remains a growing threat. Written by experts who rank among the world's foremost Android security researchers, this book presents vulnerability discovery, analysis, and exploitation tools for the good guys. Following a detailed explanation of how the Android OS works and its overall security architecture, the authors examine how vulnerabilities can be discovered and exploits developed for various system components, preparing you to defend against them.

If you are a mobile device administrator, security researcher, Android app developer, or consultant responsible for evaluating Android security, you will find this guide is essential to your toolbox.

Saturday, April 19, 2014

This session will cover the strategic decisions developers have to make when targeting multiples devices in application. The video will explore the tools and technologies that available in Visual Studio 2013 for both web and native applications that target Windows, iOS and Android devices, as well as best practices to reuse code and skills across them.

Wednesday, April 16, 2014

The video show how to setup Chrome Remote Desktop on shared computer (running Windows 8.1) to enable remote access with PIN. Then you can control your computer remotely using Chrome Remote Desktop App on Android device.

The following video show remote control shared PC from Android Phone. In this example, the Android phone connect Internet using 3G network. The shared PC running Windows 8.1, with Chrome Remote Desktop installed and setup "Enable remote connection", power-on with internet connection (via home network), even have not log-in Windows session, no any port forwarding setting on router.

Chrome Remote Desktop allows users to remotely access another computer through Chrome browser or a Chromebook. Computers can be made available on an short-term basis for scenarios such as ad hoc remote support, or on a more long-term basis for remote access to your applications and files. All connections are fully secured.Chrome Remote Desktop is fully cross-platform. Provide remote assistance to Windows, Mac and Linux users, or access your Windows (XP and above) and Mac (OS X 10.6 and above) desktops at any time, all from the Chrome browser on virtually any device, including Chromebooks.

This video show installation and setup Chrome Remote Desktop on Windows 8.1 to be shared. And install and setup on Ubuntu to access the shared Windows desktop.

Tuesday, April 15, 2014

This example TRY to show various available currency symbols on Android. This symbols reference to the file http://www.unicode.org/charts/PDF/U20A0.pdf, it contains an excerpt from the character code tables and list of character names for
The Unicode Standard, Version 6.3.

Please note that some symbols cannot be shown, because it have not been installed in Android system.

If you’re an Android application developer, chances are you’re using fixed, scrolling, swipe-able, and other cutting-edge custom UI Designs in your Android development projects. These UI Design approaches as well as other Android ViewGroup UI layout containers are the bread and butter of Pro Android User Interface (UI) design and Android User Experience (UX) design and development.

Using a top down approach, Pro Android UI shows you how to design and develop the best user interface for your app, while taking into account the varying device form factors in the increasingly fragmented Android environment. Pro Android UI aims to be the ultimate reference and customization cookbook for your Android UI Design, and as such will be useful to experienced developers as well as beginners.

With Android’s powerful UI layout classes, you can easily create everything from the simplest of lists to fully tricked-out user interfaces. While using these UI classes for boring, standard user interfaces can be quite simple, customizing a unique UI design can often become extremely challenging.

What you’ll learn

How to design and develop a sleek looking and highly functional user interface (UI) design and experience (UX) design using Android APIs

What Android layout containers are, and how to best leverage them

How to design user-friendly UI layouts that conform to Android UI guidelines

How to use new media assets such as images, video, and animation in a UI

How to create UI Fragments for UI design for specific ActionBar or Activity classes that you wish to create for UI designs within your applications

Scaling UI Design for the various Android smartphone and tablet form factors

Who this book is for
This book is for experienced Android app developers. It can also be for app developers and UI designers working on other platforms like iOS and BlackBerry who might also be interested in Android.

Sunday, April 13, 2014

It's another example of custom Spinner, which have different normal view and drop-down view, using custom object and adapter for the spinner. Our custom object have two String, one for display text, another for Internet address.

In normal view, returned by getView() of our custom ArrayAdapter, there are one TextView to show the display text, and another button to open the target address if clicked.
In drop-down view, returned by getDropDownView() of our custom ArrayAdapter, there are two TextView to show the display text, and the target address.

In the most basic Spinner implementation, selected item can be retrieved by calling parent.getItemAtPosition(position) in onItemSelected() method in OnItemSelectedListener. It will be the same object of the display items, as show in the spinner0 of the example.

Sometimes, we want to display some meaningful text in Spinner (such as "Sunday", "Monday"...), but return some other value when any item selected (such as 0, 2...).

Spinner with different display text and return value

Here I show two approaches:

The first one may be the simplest method, spinner1 in the example. Create another array to hold the values we want to return. And return the coresponding item on position in onItemSelected().

The second approach implement our custom class to hold the display text and the return value. And implement our custom Adapter, as shown in spinner2 in the example.

Thursday, April 10, 2014

To get the user-agent of your browser in HTML code, you can read navigator.userAgent.

This example show user-agent of your WebView, and also include a link to HTML5TEST to test your HTML compatibility. It's how it run on Nexus 7 running Android 4.4.2 KitKat, and on HTC One X running 4.2.2.

Run on Nexus 7, Android 4.4.2

Run on HTC One X, Android 4.2.2

Android 4.4 (KitKat) includes a new WebView component based on the Chromium open source project. The new WebView includes an updated version of the V8 JavaScript engine and support for modern web standards that were missing in the old WebView. It also shares the same rendering engine as Chrome for Android, so rendering should be much more consistent between the WebView and Chrome.The new WebView adds Chrome/_version_ to the user-agent string. ~ about WebView for Android

Wednesday, April 9, 2014

This example examine the behaviour between the contexts retrieved with MainActivity.this vs getApplicationContext(). The getApplicationContext() method return the context of the single, global Application object of the current process. This generally should only be used if you need a Context whose lifecycle is separate from the current context, that is tied to the lifetime of the process rather than the current component.
Shown in the following video, MainActivity.this will change when activity destroyed and re-created, getApplicationContext() will change when the application killed and re-started.

It demonstrate how to call JavaScript function in HTML from Android Java code (the EditText), call Android Java methods with @JavascriptInterface from HTML JavaScript (the first "Say hello" and "Open Dialog" buttons).

Create a Android Project using Project Wizard in Android-Eclipse, to generate a default MainActivity extends ActionBarActivity. Implement MyJavaScriptInterface class, its public method with @JavascriptInterface can be called from Javascript. Modify the onCreateView() method of PlaceholderFragment() class to embed our HTML.