Search This Blog

Support my cause by downloading

Tuesday, 30 December 2014

Best practices Android Resposiveness : Using background Intent service for background job

An IntentService isn't affected by most user interface lifecycle events, so it continues to run in circumstances that would shut down an AsyncTask.

Creating a background services

Create a class RSSPullService and extends IntentService to create component IntentService



          public class RSSPullService extends IntentService {
    @Override
    protected void onHandleIntent(Intent workIntent) {
        // Gets data from the incoming Intent
        String dataString = workIntent.getDataString();
        ...
        // Do work here, based on the contents of dataString
        ...
    }
}
       
 

Define IntentService with application Manifest


Create a background work request and send it to IntentService

Create a new, explicit Intent for the IntentService called RSSPullService.

mServiceIntent = new Intent(getActivity(), RSSPullService.class);
mServiceIntent.setData(Uri.parse(dataUrl));

Call startService()

// Starts the IntentService
getActivity().startService(mServiceIntent);

Report Status from an IntentService See Google Android Article 

Download Source


Monday, 22 December 2014

Fun time : Five reason to hate beautiful android

Everyone around me having android in their hand

Off course everyone around me have android in their hand and i am fed up of being one of them. I want to look different so i am switching to costly iPhone which gonna change my status among people around. Even its easy to be identify, people generally say "Ohh you'r talking about guy with iPhone".

Android is open source and vulnerable to security of personal data

Even i don't care if somebody try to explain me that android is no less secure than windows and ios. I am smart enough to secure my personal data even i don't have any. I like apple annoying pop up for asking permission again and again.

I don't like customization of home screen in android

Come on we are using smartphone so why to allow user to customize home screen ? I like rigid way of iPhone and windows. I don't like change at all so i love iOS and windows


Being a philanthropist i always support sinking ship

I was big fan of android when Google launch it. But when i see iOS start dying and windows crawling, i almost cry that day. Then i decided no matter what android do, i will support windows and iOS. Even i continue forced my all relative to use expensive iOS untill they kick on my ass.

I hate android for no reason

OK ! I am free to do what i want, so do i hate damn beautiful android and its huge app market.
Note : This article is written for fun. Keep this in mind


Android One is coming to Bangladesh, Nepal, and Sri Lanka soon

As part of Google to reach out maximum number of user,  Google collaborated with manufacturer to manufacture low budget devices. Their outcome named android one. Android one succeed in India and now Google plan to launch it in Bangladesh, Nepal, and Sri Lanka Which will cover 200 million user.
Google blog says In these countries — with a combined population of over 200 million people — a wide range of manufacturers and network partners such as Banglalink will begin to sell Android One smartphones. In addition to Micromax, Karbonn and Spice, Bangladesh’s own Symphony will launch their first Android One phone with the Symphony Roar A50. All these devices will give people a high quality mobile experience for an affordable price, running stock-Android with updates from Google.
Android One in India's neighbors

Android one is strong phone and cost Approx $100. Upgrading to newer o.s will work like nexus and Google will send update of latest android to Android one.

Saturday, 20 December 2014

Switching to CyanogenMod : An extended version of Google android mobile operating system

CyanogenMod  is enhanced open source firmware distribution for smartphones and tablet computers based on the Android mobile operating system. It offers features and options not found in the official firmware distributed by vendors of these devices.

Big Question : Should we start switching to CyanogenMod ?


CyanogenMod  is just extended version of android with lot of feature supporting, originally they are not supported in android. CyanogenMod  is fair deal for tech enthusiast.


There are some feature which exclusively supported in CyanogenMod 


  • Theming support
  • FLAC audio codec support
  • A large access point list
  • Open VPN list - OpenVPN is an open-source software application that implements virtual private network (VPN) techniques for creating secure point-to-point or site-to-site connections in routed or bridged configurations and remote access facilities. It uses a custom security protocol[2] that utilizes SSL/TLS for key exchange
  • Enhance reboot menu 
  • USB tethering, CPU over locking and other performance and many others.

Lot of coding enthusiast and volunteer had work hard to make Google Android code transform into CyanogenMod. Still they are working collectively to benefit most smartphones. They have a good bug tracking and improvment system. So lets try this with Micromax's Yu Yureka

Tuesday, 9 December 2014

Micromax canvas selfie launched officially, A phone with great specification

Micromax canvas selfie goes official in press event with tennis star like Sania Mirza,  Ana ivanovic. Micromax canvas selfie will directly compete to HTC Desire Eye. canvas selfie loaded with 13 MP front and rear facing camera.

Micromax Canvas Selfie loaded with 1.7GHz octa-core CPU, 2GB of RAM, and 16GB of expandable memory. The device’s display is a 4.7” 720p unit covered by Gorilla Glass 3. The smartphone will run with Android 4.4 KitKat and is powered by a 2,300mAh battery. Micromax has biggest share of smartphone in Indian market and directly competing with Chinese manufacture like oppo and Xiaomi.

Micromax Canvas Selfie Launch event

According to GSM arena, Micromax canvas selfie will launch in India in second week of January in two colors - Angelic White and Mystic Blue. Price of canvas selfie is not uncovered yet.
Keep a comment if you have plan to go with Micromax canvas selfie.

Key features of Canvas Selfie


  • 13MP rear & front cameras with
  • flash & Sony Sensor
  • Inbuilt Beauty Tools in the
  • Camera App like Eye
  • Enhancement, Face Slimming,
  • Skin Smoothening, Teeth
  • Whitening, Remove Oil and Fade
  • Dark Circles, Make-up
  • 4.7-inch HD IPS display
  • Color depth of 16.7 million
  • Corning Gorilla Glass 3
  • 2300 mAh battery
  • 1.7 GHz Tru-octacore processor
  • Android KitKat 4.4
  • Dual SIM; Common slot for
  • memory card and nano SIM card
  • 2GB RAM; 16GB ROM
  • Expandable memory of up to32GB
  • Available in Mystic Blue and
  • Angelic White colors
  •  Faux leather back finish


Sunday, 7 December 2014

Message and Request to Reader of This Blog

I have been blogging since 3 year and writing on this site by arranging my time. Sometime even i had help people personally too if i had time. And you guys give me so much respect in return. Usually my purpose was to benefit all struggling android beginner but as time passes i realize if you are not getting any benefit in terms of livelihood then its hard to continue.


Today i making one appeal to my dear reader, if this blog had ever help you in past or will help you in future, then please help me by

  • Download and share my apps
  • Shop through my affiliate program Flipkart for Indian user and Amazon for non Indian User. Banner are attached to site
  • Keep visiting so that my motivation of writing will always be high 


Friday, 5 December 2014

WRITE_EXTERNAL_STORAGE permision limit to primary memory acess : Weirdest update of Android KitKat 4.4

Post Address Issue -


  • WRITE_EXTERNAL_STORAGE  doesn't work with Android KitKat 4.4
  • Android KitKat 4.4 doesn't allowing writing to secondary storage
  • Error accessing the SD card on Android KitKat (4.4.x)

I had gone through Weirdest  issue recently, My app suddenly got bad reviews as  app is not working with Android KitKat 4.4 and above. I dig out and find problem, My android application was not able to read from android secondry memory storage (i.e called Sdcard also.). Android KitKat 4.4 support WRITE_EXTERNAL_STORAGE  in certain manner now.

Interesting point for KitKat is that writing to secondary external storage (such as SD memory card) is prohibited, except of app's specific directory, which is deleted during app uninstall.Only solution to this problem is to get your phone rooted.

Google Android cleary says


The WRITE_EXTERNAL_STORAGE permission must only grant write access to the primary external storage on a device. Apps must not be allowed to write to secondary external storage devices, except in their package-specific directories as allowed by synthesized permissions. Restricting writes in this way ensures the system can clean up files when applications are uninstalled.

If your phone is rooted you will have access to /system/etc/security/permissions.xml . media_rw is clearly missing here

<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
<group gid="media_rw" />
</permission>

still its not clear why Google android KitKat 4.4 has logic behind this Weirdest . See Reported BUG to Android 4.4 does not allowing writing to secondary storage.

Thursday, 4 December 2014

Moto G first generation will get Android Lollipop update soon From Motorola Offcial Blog

Motorola had confirm upgrade of Android Lollipop to Moto G first generation. And it should start rolling out very soon according to Motorola news. Motorola other phone Moto G second generation and Moto X are already start getting upgrade to Android L. Android Lollipop is latest version launch by Google Android.

GSM Arena stated
Well, it seems they won't have to wait too long. Motorola has updated the Motorola Update Services app on the first generation Moto G. If you check the change log for the app, it simply says 'This update is necessary to enable a future upgrade of your device to Android 5.0, Lollipop.
Its seems that User will start getting upgrade in mid December.
                  

Motorola is very quick in providing latest update to its user. Motorola promise Android Lollipop upgrade to below devices.

  •     Moto X (1st Gen. & 2nd Gen.)
  •     Moto G (1st Gen. & 2nd Gen.)
  •     Moto G with 4G LTE
  •     Moto E
  •     Droid Ultra, Droid Maxx, and Droid Mini


Tuesday, 2 December 2014

WebView Scroll Vertically : WebView scroll in one direction after zoom in android

Android WebView allow to load HTML content. Recently i was facing issue regarding zoom of WebView. What my requirement was, for scroll WebView content vertically regardless of its zoom level. Simply i want to stop horizontal scroll of webview.
I came across meta tag ViewPort and it did a lot of help with some attribute of WebSettings dynamically.

  • Wrap WebView inside ScrollView
  • Meta Tag viewport : Attach this meta tag immediately after <head>

<meta name="viewport" content="width=device-width,height=device-height,target-densityDpi=device-dpi,user-scalable=yes,initial-scale=0.5, maximum-scale=2, minimum-scale=0.5" />

If you don't have control on HTML content, then read HTML content in one string and then append above tag and then write to file again or use with webview's method loadwithBaseURL

StringBuilder mBuilder = new StringBuilder(mBuffer.toString().replace("<head>",
"<head><meta name=\"viewport\" content=\"width=device-width,height=device-height,target-densityDpi=device-dpi,user-scalable=yes,initial-scale=0.5, maximum-scale=2, minimum-scale=0.5\" />"));

mBuffer is the HTML string. you can change WebView's scale according to requirement

  • Attribute need to set dynamically are 

view.getSettings().setLoadWithOverviewMode(true);
view.getSettings().setUseWideViewPort(true);
view.setWebChromeClient(webChromeClient);
view.getSettings().setBuiltInZoomControls(true);
view.getSettings().setSupportZoom(true);

where view is reference of WebView.

Achieve Through this Article 

  •  Content will fit to new line to scroll WebView only vertically
  •  Fit content to initial scale using Meta Viewport
  • Content will not go more than WebView width




Monday, 1 December 2014

Samsung to launch Tizen O.S : Why South Korean giant Samsung choose India?

Samsung is going to launch Tizen new mobile o.s in India on new sub-$100 smartphone. They had a plan to launch it in Russia but they scrap the plan. Samsung mostly device are running android o.s platform. Android is responsible for their recent success over Apple. They thoroughly enjoyed selling their overprice devices but cheap compare to Apple iPhone. But now they are coming up with their own Tizen operating System.

Why they choose specifically India?


India had a huge market which is not still explored totally so they had huge opportunity to reach out million of customer with their Tizen mobile operating. Its kind of beta phase and they don't want to cost their prime customer in USA and Europe with developing O.S. Indian are pretty much price sensitive and they will buy Tizen loaded device with $100 (INR 6000). In recent survey, its stated that Indian smart phone user prefer low end and cheap device and they never complain about quality of product. And Samsung choose rightly this point and in the mean time they will try to improve Tizen before they go to USA or Europe.

There is section in India which has capability of purchase high end phone and those will not give a shit to $100 Tizen phone.



Its will be good to see weather Samsung can survive without Android !
Android News and source code