Search This Blog

Monday 16 November 2015

LG Watch Urbane 2nd Edition LTE - Cellular support comes to Android Wear

Android Wear lets you stay connected, even when your phone isn’t with you. With Bluetooth and Wi-Fi support, for example, you can see who’s calling when your phone is in the next room, or respond to messages at the gym while your phone is at home. Today, we're bringing cellular support to Android Wear, so you can stay connected in even more places. 

No more worrying about Bluetooth or Wi-Fi—your watch will automatically switch to a cellular connection when you’re out of range. As long as your watch and phone are connected to a cellular network, you’ll be able to use your watch to send and receive messages, track fitness, get answers from Google, and run your favorite apps. And yes, you’ll even be able to make and take calls right from your watch, for when your hands are full, or your phone is elsewhere.

The first Android Wear watch with cellular support is the LG Watch Urbane 2nd Edition LTE.

  • ·         W200 Opal Blue
  • ·         First LTE Cellular Android Wear Smartwatch
  • ·         Real Watch Design
  • ·         Quick Access to Shortcut Settings With Three Buttons
  • ·         480 x 480 High Resolution Display / 570mAh Long-Lasting Battery
  • ·         Interactive Watch Faces

Thursday 28 May 2015

Android M Developer Preview are here, Whats new in Android M for developer?

Obviously Android M Developer Preview comes with more improvement to Android L. Along with new features and capabilities, the M Developer Preview includes a variety of system changes and API behavior changes.

Runtime Permissions

This preview introduces a new runtime permissions model, where users can now directly manage their app permissions at runtime. To determine if your app has been granted a permission, call the new Context.checkSelfPermission() method. To request for a permission, call the new Activity.requestPermission() method.

Power-Saving Optimizations


If a device is unplugged and left stationary with the screen off for a period of time, it goes into Doze mode where it attempts to keep the system in a sleep state. In this mode, devices periodically resume normal operations for brief periods of time so that app syncing can occur and the system can perform any pending operations.

App standby

With this preview, the system may determine that apps are idle when they are not in active use. Your app is considered idle after a period of time, unless the system detects any of these signals:
The app is explicitly launched by the user.
  • The app has a process currently in the foreground (either as an activity or foreground service, or in use by another activity or foreground service).
  • The app generates a notification that users see on the lock screen or in the notification tray.
  • The user explicitly asks for the app to be exempt from optimizations, via Settings.

Adoptable Storage Devices

With this preview, users can adopt external storage devices such as SD cards.

Apache HTTP Client Removal

This preview removes support for the Apache HTTP client. If your app is using this client and targets Android 2.3 (API level 9) or higher, use the HttpURLConnection class instead.

AudioManager Changes

Setting the volume directly or muting specific streams via the AudioManager class is no longer supported. The setStreamSolo() method is deprecated, and you should call the AudioManager.requestAudioFocus() method instead.

Text Selection

Text Selection

Android Keystore Changes

With this preview, the Android Keystore provider no longer supports DSA. ECDSA is still supported.

Wi-Fi and Networking Changes

  • Your apps can now change the state of WifiConfiguration objects only if you created these objects. You are not permitted to modify or delete WifiConfiguration objects created by the user or by other apps.
  • Previously, if an app forced the device to connect to a specific Wi-Fi network by using enableNetwork() with the disableAllOthers=true setting, the device disconnected from other networks such as cellular data. In this preview, the device no longer disconnects from such other networks. If your app’s targetSdkVersion is “20” or lower, it is pinned to the selected Wi-Fi network. If your app’s targetSdkVersion is “21” or higher, use the multinetwork APIs (such as openConnection(), bindSocket(), and the new ConnectivityManager.bindProcessToNetwork() method) to ensure that its network traffic is sent on the selected network.

Camera Service Changes

ART Runtime

The ART runtime now properly implements access rules for the newInstance() method. This change fixes a problem where Dalvik was checking access rules incorrectly in previous versions.

APK Validation

The platform now performs stricter validation of APKs. An APK is considered corrupt if a file is declared in the manifest but not present in the APK itself. An APK must be re-signed if any of the contents are removed.

Tuesday 31 March 2015

RecyclerView example, Source code with onItemClickListener 

What is RecyclerView?

Android official site states “The RecyclerView widget is a more advanced and flexible version of ListView. This widget is a container for displaying large data sets that can be scrolled very efficiently by maintaining a limited number of views ”

RecyclerView is generally used when elements changes at run time on user action or network events

You will need android-support-v7-recyclerview.jar for RecyclerView to integrate in your projects. This article will explain you a way to implement onItemClickListener in RecyclerView.

Lets implement RecyclerView steps by steps. Source code  is here in case you may want to skip theory or unable to find android-support-v7-recyclerview.jar

Steps 1- Create android xml layouts

 < xmlns:android=""  
   tools:context="com.recyclerview.MainActivity" >  

Steps 2- Create Activity and RecyclerView.Adapter

 package com.recyclerview;  
 import android.os.Bundle;  
 import android.widget.Toast;  
 public class MainActivity extends ActionBarActivity implements OnItemRecycleViewClickListener {  
      RecyclerView mRecyclerView;  
      private String[] mData = { "Tofeeq AHmad", "Recycler View", "Layout managers for positioning items", "Default animations for common", "Tofeeq AHmad", "Recycler View",  
                "Layout managers for positioning items", "Default animations for common", "Tofeeq AHmad", "Recycler View", "Layout managers for positioning items",  
                "Default animations for common" };  
      protected void onCreate(Bundle savedInstanceState) {  
           mRecyclerView = (RecyclerView) findViewById(;  
           LinearLayoutManager mLinearManager = new LinearLayoutManager(this);  
           //          StaggeredGridLayoutManager mStaggeredGridLayoutManager = new StaggeredGridLayoutManager(1, StaggeredGridLayoutManager.HORIZONTAL);  
           //          mRecyclerView.setLayoutManager(mStaggeredGridLayoutManager);  
           //          GridLayoutManager mGridLayoutManager = new GridLayoutManager(this, 2, GridLayoutManager.VERTICAL, false);  
           //          mRecyclerView.setLayoutManager(mGridLayoutManager);  
           mRecyclerView.setAdapter(new RecyclerAdapter(mData, this));  
      public void onItemClicked(int position, RecyclerAdapter mAdapter) {  
           Toast.makeText(this, String.valueOf(position), Toast.LENGTH_LONG).show();  
 package com.recyclerview;  
 import android.view.LayoutInflater;  
 import android.view.View;  
 import android.view.View.OnClickListener;  
 import android.view.ViewGroup;  
 import android.widget.ImageView;  
 import android.widget.TextView;  
 public class RecyclerAdapter extends RecyclerView.Adapter<RecyclerAdapter.ViewHolder> {  
      private String[] mDataset;  
      OnItemRecycleViewClickListener mOnItemRecycleViewClickListener;  
      public RecyclerAdapter(String[] myDataset, OnItemRecycleViewClickListener mOnItemRecycleViewClickListener) {  
           mDataset = myDataset;  
           this.mOnItemRecycleViewClickListener = mOnItemRecycleViewClickListener;  
      public static class ViewHolder extends RecyclerView.ViewHolder {  
           public TextView mTextView;  
           public ImageView mImageView;  
           public ViewHolder(View v) {  
                mTextView = (TextView) v.findViewById(;  
                mImageView = (ImageView) v.findViewById(;  
      public int getItemCount() {  
           return mDataset.length;  
      public void onBindViewHolder(ViewHolder arg0, int arg1) {  
           arg0.itemView.setOnClickListener(new OnClickListener() {  
                public void onClick(View v) {  
                     mOnItemRecycleViewClickListener.onItemClicked(Integer.parseInt(v.getTag().toString()), RecyclerAdapter.this);  
      public ViewHolder onCreateViewHolder(ViewGroup parent, int arg1) {  
           View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.list, parent, false);  
           ViewHolder vh = new ViewHolder(v);  
           return vh;  

Steps 3- To Implment onItemClickListener create one interface and attach it with adapter. RecyclerAdapter adapter already have this attach with it in step 2.

 package com.recyclerview;  
 public interface OnItemRecycleViewClickListener {  
      public void onItemClicked(int position, RecyclerAdapter mAdapter);  

Wednesday 25 February 2015

Motorola surprise with moto e 2nd generation with android lollipop and 4G LTE

After giving high end phone like Nexus 6, Moto X 2nd generation and low end phone like Moto E and Moto G, Motorola come up with surprising budget phone Moto E second generation.Motorola delivered the new Moto E smart phone to some select media organizations overseas. It was  previously announced that Motorola would hand-deliver a box to members of the press although it wasn't clear what would be in the box.


The second generation Moto E has a 4G LTE speed, a 4.5-inch qHD display with 540×960 245 ppi IPS resolution and Corning Gorilla Glass 3,1.2GH quad-core 64-bit Qualcomm Snapdragon 410 processor and a 400MHz Adreno 306 GPU. It comes with 8GB storage space and 1GB of RAM. Moto E 2nd  has a VGA camera in the front and a 5 megapixel rear camera with autofocus and 720p video recording capabilities. The storage space can be expanded via a MicroSD slot with 32GB limit. Other connectivity options include Wi-Fi, Bluetooth 4.0LE, GPS/ A-GPS, GLONASS, FM radio, and Micro-USB. Phone loaded with  2390 mAh battery and come with customizable back cover with lot of option.

Starting today, the new Moto E will begin rolling out in more than 50 countries in North America, Latin America, Europe and Asia. It will be available unlocked in the U.S. at for $119.99 (3G) and $149.99 (LTE). 

Wednesday 18 February 2015

Killer Samsung Galaxy S6 teaser is out

Samsung once again grab eyeball by launching anticipated Samsung Galaxy s6's teaser. Phone is loaded with high end specification.  Samsung is facing stiff competition from Chinese phone maker and other mobile manufacturer like LG, Motorola.

Samsung S6 is expected to come up with 3 GB RAM, 32 GB internal memory (microSD, up to 128 GB), 5MP front facing and 20 MP rear camera. Galaxy new avatar will have 1440 x 2560 pixels (~587 ppi pixel density) and 5.0 inches (~67.9% screen-to-body ratio) .

Other special features are
  • Quad-core 1.3 GHz Cortex-A53 & Quad-core 1.9 GHz Cortex-A57.
  • Lollipop (5.0).

Release date of Samsung Galaxy S6 will first quarter of 2015. Samsung had tried their hand on their own mobile operating system Tizen

Wednesday 14 January 2015

Android Memory optimization tips and tricks

Android central process Zygote forked to allocate memory for every other process. Because of limited resource in mobile, memory optimization is necessary in android. Don't ask for more memory if you don't require it. Here are some tips which will help running your application smoothly

  • Enums often require more than twice as much memory as static constants. You should strictly avoid using enums on Android.
  • Every class in Java (including anonymous inner classes) uses about 500 bytes of code.  and every class instance has 12-16 bytes of RAM overhead.
  • Putting a single entry into a HashMap requires the allocation of an additional entry object that takes 32 bytes 
  • Use optimized container from android framework like  SparseArray, SparseBooleanArray, and LongSparseArray. generic HashMap use can be quite memory inefficient because it needs a separate entry object for every mapping so use  SparseArray.
  • Release memory as memory becomes tight 
  • onTrimMemory() callback of Activity help you finding way to release resource. Callbacks like TRIM_MEMORY_RUNNING_LOW, TRIM_MEMORY_RUNNING_MODERATE, TRIM_MEMORY_RUNNING_CRITICAL etc gives you way to release unused resource which eventually help improving performance of your app
  • Load views on demand using ViewStub read about ViewStub
  • Use multiple process in a single application. Name your background services as separate process like 

         <service android:name=".PlaybackService" android:process=":background" />

Thursday 1 January 2015

Happy new year, Meaning of newly born 2015 for android developer

This is my first article of newly born 2015. First of all i wish a very happy and safe 2015 to reader. Today i choose to right about my own judgement, suggestion and prediction for android developer. Never forgot to tell me at end of the article how much i went correct?

More tough competition to survive

Lot of big player had joined android success ride.Day by day, Google play is flooded with thousand of quality android application daily.Getting attention is going stiff unless you have not made something really great. For small and individual developer, this is more tough to survive now.We should thanks to Google search strategies on play store which indeed a help to developer. Success mantra is keep growing your creativity.

Android wear will be strong

Developing app for android wear will be a good option. Keeping vision in information technology is best way to survive.Android Wear was announced and launched in 2014. We saw some great devices from the usual suspects (Samsung, LG, Motorola)

Keep an eye on CyanogenMod and Tizen

CyanogenMod is highly customize android by some enthusiastic developer community. For techgeek it will be a great option to have in their device. CyanogenMod has potential and its hardly take days for android developer to make application for CyanogenMod. Keep posting your ideas for Tizen too.
Samsung had created user sector all over the world and you can't ignore Korean giants.

Give a chance to amazon developer console

Most of the android application run on amazon devices with no or less modification. Give it a chance, that will surely increase your earnings. Amazon provide you amazing test framework which will help you building quality application.

Don't tease ios Developer

Last but not leaset, Being human you should respect a human so as being developer you should respect developer. 2015 will not gonna downfall of apple. iPhone 6+ advance
booking shows craze of iPhone lover.
Android News and source code