Yes India is under digital revolution with the mission of "Digital India" by our prime minister . Thanks to him for leading initiatives and country with an example.
C2DM is being replaced by Google Cloud Messaging (GCM), the next generation of C2DM (http://android-developers.blogspot.com/2014/08/powerful-new-messaging-features-with-gcm.html). Please note that C2DM push messaging will no longer function properly if your app does not migrate to the latest GCM library.
If you have any apps that still use C2DM, we strongly urge you migrate to GCM as soon as possible. You can see if you’re using C2DM by checking if you’re using a gcm.jar library or GCM helper libraries in your implementation. If none of your apps use C2DM, there is no action required on your part.
Learn more here: https://developers.google.com/cloud-messaging/c2dm
For many apps, doing work in the background can be an important part of building a great experience. An alarm registered with AlarmManager (http://goo.gl/FtpShV) is one way to schedule your app to be run sometime in the future, even if your app isn’t in the foreground. What alarm type and API should you use for your app or are alarms even the best option? Let’s go through some of the factors that should influence your opinion:
How often do you want to trigger?
For events less than 60 seconds apart, alarms aren’t the best choice: use the much more efficient Handler (http://goo.gl/CE9vAw) for frequent work.
Want to set a user visible alarm clock?
On API 21+ devices, new APIs allow you to set a user visible alarm via setAlarmClock(): the system UI may display the time/an icon and apps can retrieve the next alarm clock with getNextAlarmClock(). Note that alarms set with setAlarmClock() work even when the device/app is idle (similar to setExactAndAllowWhileIdle()): getting you as close to an exact wake up call as possible. For backward compatibility, you’ll follow the same guide below for a single alarm.
Wake up the device/app while idle (i.e., doze, app standby)?
On Android 6.0+ (API 23) devices, additional power-savings optimizations (http://goo.gl/dVtgz6) have been added in the form of Doze (triggered by a completely stationary, unplugged, and idle device) and App Standby (triggered by an unplugged device on idle apps that haven’t been used recently). You’ll use setAndAllowWhileIdle() for inexact and setExactAndAllowWhileIdle() for exact alarms if you need it to fire an alarm while in these idle states. If it can wait until the user returns to their device/your app, use the standard set() and setExact() to be the best Android citizen and save your user’s battery.
(We’ll be talking more specifically about Doze and App Standby later!)
Just a single alarm?
A single alarm can be set with the aptly named set() method. One thing to keep in mind is that on API 19+ devices when you target API 19+, the system will be treated as inexact, potentially batching alarms together - the alarm will never go off before the time specified, but may go off afterwards. If you have some flexibility in the start time but have a hard deadline, consider using setWindow() to gain more control over the exact time period to be used.
You can use setExact() for a precisely timed single alarms on API 19+ devices, but use these only when the exact timing is required (such as with a calendar reminder).
Need to repeat at a constant rate?
For repeating alarms, batching is the key to good battery life. setInexactRepeating() does exactly that. Prior to API 19, you can use one of the INTERVAL_ constants (such as INTERVAL_HOUR to batch alarms of the same interval. On API 19+ devices, all repeating alarms (no matter what the interval) set with setInexactRepeating() will be batched.
You’ll note there’s also setRepeating() - similar to set() the behavior changes with API 19 from exact to inexact repeating alarms, meaning if you are on an API 19+ device and target API 19+, this functions identically to setInexactRepeating(). If you really need exact repeating alarms on API 19+, set an exact alarm with setExact() and schedule the next alarm once your alarm has triggered - keep in mind the battery implications though!
BUT WAIT: should you even use alarms?
If you want to be as battery efficient as possible (and you should!), consider using JobScheduler (https://goo.gl/CQjbsp) on API 21+ devices or GcmNetworkManager (https://goo.gl/CGNi3p) on all Google Play services enabled devices of API 9+.
Supporting both one off and periodic work, these APIs lack the ability to wake from idle, but gain the ability to wait for network access, wait until the battery is charging, take advantage of automatic backoff and retry, persist across reboots, and batch jobs across the system (meaning lower battery usage!).
That’s a lot of good reasons to use JobScheduler and GcmNetworkManager so consider them strongly in your push to #BuildBetterApps
Android app developers face a difficult tradeoff when it comes to showing web content in their Android app. Opening links in the browser is familiar for users and easy to implement, but results in a heavy-weight transition between the app and the web.
You can get more granular control by building a custom browsing experience on top of Android’s WebView, but at the cost of more technical complexity and an unfamiliar browsing experience for users. A new feature in the most recent version of Chrome called custom tabs addresses this tradeoff by allowing an app to customize how Chrome looks and feels, making the transition from app to web content fast and seamless. Learn more in our latest blog post.
To coincide with the talk, I have also released Retrofit 2.0.0-beta1! While it's not done, it's very usable.
Appsite is a Material Design Website Template for an app's landing page, built with Project Polymer. The template brings a well-commented codebase and step-by-step instructions, enabling app developers to have a landing page up and running within minutes.
Version 2 of the template brings the following changes:
- Update to Polymer 1.0 base
- Replaced Others section with Screenshots section
- Added lightbox to view screenshots
- Design tweaks
- Code optimization
- Saffrony Institute Of TechnologyBachelor of Engineering in Information Technology, 2007 - 2011
I have been working on the Android platform since 2011 and I hope that sharing what I have learned will help people get proficient in Android faster!
- Infostretch Corporation India Private Ltd.Software Engineer, 2015 - present
- Azilen TechnologiesSr. Software Engineer, 2014 - 2015
- IndiaNICAndroid Developer, 2011 - 2014
- Trials Frontier
- The Flintstones
- 월드 레이싱 투어
- Ironkill:Robot Fighting Game
Smart IR Remote Developer Launches AnyMote Kickstarter To Put Your Phone...
Home automation of any kind is a pretty tough market in which many products generally create more problems than they can solve. However, the
Advani agrees on Modi after BJP partners with Google for Lal Krishna And...
A compromise formula has been reached within BJP over the leadership of Narendra Modi. Sources tell Faking News that LK Advani has finally r
Balky carriers and slow OEMs step aside: Google is defragging Android
Versions don't matter, because Google now controls the platform behind the platform.
Android reaches massive 80% market share, Windows Phone hits global high...
This really is Mac versus PC all over again, as iOS hit its lowest levels since 2010.
10 Things about good and not good programmers ~ KP Bird
It has been nearly 6 years since my debut in the software industry. I have written lots of code and developed applications for various domai
LG announces world's slimmest full HD smartphone display panel | Android...
It takes thin parts to make a thin smartphone, and LG is leading the pack when it comes to display technology