Now on Tap anticipates what you need in the moment. With a simple tap, you can get cards with useful information and apps that feed your need to know.

INTRODUCTION:


Android Marshmallow is a refinement and extension of the core features and functionality of Android Lollipop.In this Android Marshmallow review, I take a look at the major features of Google's latest OS version to let you know where it hits, where it misses, and where it has room to improve.

Android Marshmallow Release Date:


Android Marshmallow was initially announced at Google I/O on May 28, when it was released as the Android M developer preview. Several updates to the preview came out before Marshmallow was officially named on August 17. Google finally unveiled Android 6.0 Marshmallow, alongside the 2015 Nexus devices, on September 29, 2015.
As usual, Google's Nexus family was first to get the goods, and the brand new Nexus 5X and Nexus 6P were the launch devices for Android 6.0. Factory images for most of the existing Nexus range – the Nexus 5, Nexus 6, Nexus 9 and Nexus Player – appeared on October 5.

COMPARISON WITH LOLLIPOP :

      • Visual Appearance
      • Integration of new Google products
      • Core features of the system
      • Security
      • Improvements to usability

Visual Appearance :


Android Marshmallow is visually similar to its predecessor, Lollipop, in many ways. Google’s Material Design language is now more pervasive than ever before and the main areas of the UI –settings, notifications shade and navigation – remain the same. But Marshmallow does have some differences in appearance and new features .


  • Lock screen:
  1. The Marshmallow lock screen is almost identical to Lollipop's, complete with expandable notifications and app shortcuts. But where Lollipop had shortcuts in the bottom corners that too you to the camera and dialer, Marshmallow replaces the dialer shortcut with one to Google’s voice search. This small update is the first clue as to just how integral voice commands are to Marshmallow.
  • Google voice command:
  • App drawer:
  1. The app drawer in Marshmallow went through a couple of changes during the developer preview process and appears in the final version as a vertical scrolling list as opposed to the paginated horizontal list from Lollipop. You can scroll through the list or use a new scrubber bar on the right to jump to a particular letter of the alphabet.
  • Notifications and Quick Settings
  1. The notifications area displays app notifications, which can be expanded or tapped to launch the full app. This area also shows persistent system notifications, such as when a Bluetooth device is connected or other system features are enabled. The 'dismiss all' button now faces the other direction compared to Lollipop, but it does the same thing.
  • System UI Tuner
  1. Once enabled, System UI Tuner will appear in the settings menu at the very bottom. It provides a few simple UI tweaks, including adding a battery percentage indicator to your battery icon, a customizable Quick Settings area, where toggles can be rearranged or removed and new ones added, and a menu for displaying which icons are displayed in your status bar. You’ll never have to suffer a cluttered status bar with NFC, Bluetooth and Alarm icons again.
  • Animations and Easter Egg:
  1. Animations and transitions make up an even larger part of Marshmallow than they did in Lollipop. Transitions between apps, pages and settings are quite often accompanied by animations, as is toggling features on and off within the various settings and menus. It’s relatively minor stuff but it all adds to the polished feeling of Marshmallow.
  2. As always, there is a hidden Easter Egg in Marshmallow and it can be seen as a kind of metaphor for Marshmallow as a whole. In Android Lollipop the Easter Egg was a Flappy Bird clone. Just as Marshmallow looks an awful lot like Lollipop on the surface with lots of refinements and improvements underneath, the Flappy Bird Easter Egg returns, but with a bit of a makeover. It’s accessed by repeatedly tapping Android version in the About phone section of the settings.
  • Dark theme and rotation support:
  1. For unknown reasons, both the system-wide dark theme and support for a rotating home screen were removed from the final version of Marshmallow, despite appearing in versions of the developer preview. We may yet see these make a return in future updates to Marshmallow – they are frequently-requested features, after all – but for now they are not a part of the Android 6.0

Android Marshmallow Google integration:

  • Google Now on Tap:
  • Google Now on Tap basically shortcuts the need to search for additional contextual information and delivers it at any turn. Long-pressing the home button now activates Google Now on Tap, replacing the old gesture for Google Now from any screen.
  • Now on Tap reads the content of any screen on your phone, whether it is in a Google or third-party app, and delivers information that might be relevant to keywords on-screen.
  • It’s basically everything we always wanted Google Search to be: instant, useful and effortless. It isn’t perfect, and you’ll still get results you’re not after from time to time, but it’s a really great start.

  • Voice API and Assist API:
  1. voice search is implemented in google voice api to launch application such as watzup,hike,settings .and also command for call, messages like siri in Iphone .
  • Google settings app:
  1. Google Settings is implemented seperately for changing voice control settings and google api calling settings.
  • Android Pay:
  1. Android Pay is simple to set up but it requires an NFC-equipped terminal at
    participating retailers as well as an NFC-equipped smartphone. Samsung Pay has an advantage here because it also works on the existing magnetic strip readers already in stores

Android Marshmallow performance

  • Doze
    Doze is battery status checking settingsl. Where other devices lose an average of 15-25 percent of battery life overnight, Marshmallow can take that down to 3-5 percent, taking your standby time to nearly two weeks in the process.
  • App standby
  1. App standby is the app equivalent of Doze, like a stock Android version of Greenify. App standby identifies apps that haven’t been used in a while and puts them into a deep sleep, which is basically the same thing as disabling them in the settings.
  2. This means they can’t use system resources, run background processes or sync and access the network, so an instant messenger you rarely use might end up on standby and stop receiving notifications, for example. If you don't want this, Google has created a whitelist, with which you can prevent apps from being put on standby.
  • Type-C and reverse charging:
    Marshmallow also supports the new standard, USB Type-C. Type-C cables are reversible – so you won’t have to worry about fumbling around with your charging cable in the dark – and they also support faster data transfer and charging speeds
  • microSD support – Adaptable Storage Devices
  1. Marshmallow also supports the new standard, USB Type-C. Type-C cables are reversible – so you won’t have to worry about fumbling around with your charging cable in the dark – and they also support faster data transfer and charging speeds
  1. With the arrival of Marshmallow we're finally looking at full-fledged support for microSD expansion in Android devices. Under Marshmallow, microSD cards can be formatted to a specific device – meaning they will be unusable elsewhere – and treated as another part of internal storage by the Android system.
  • Internal storage and file manager
RAM manager is implemented in android 6.0 in settings for checking the ram status.

Android Marshmallow security

  • App permissions
  1. This means you are in control of whether or not an app has access to something as critical as your microphone or camera.
  2. Some apps might not work properly with certain permissions disabled, but the onus is on the app developers to stabilize their apps without all permissions granted, not on you to accept what you might feel are unnecessary permissions.
  3. Permissions for a particular app can be viewed within the settings menu (to which permissions an app does or doesn't have) or by permission type (so you can see how many apps have access to your contacts, for example).
  4. Viewing by permission type is slightly hard to get to, but at least that will stop accidental changes from being made.


  • Fingerprint API
  1. Android Marshmallow introduces system-level fingerprint support via the new fingerprint API.
  2. Both new Nexus devices have a fingerprint scanner. The rollout of Android Pay and other touchless payment systems that rely on fingerprint scanners for authentication can now be handled by Android itself rather than a manufacturer add-on.
  3. Fortunately, Google has set minimum standards for scanner accuracy in order to pass its device certification.


  • Automatic app backup
  1. Historically, Android has offered a pretty weak app backup solution. The Backup and reset section in Lollipop was opt-in, vague and incomplete. Marshmallow can now automatically back up both your apps and data, so any apps restored from a backup will be the same as they were before – you’ll be signed in and right where you left off.
  • Network security reset
  1. Network security reset is a nice little feature in the Backup and reset settings which allows you to quickly and easily remove all passwords, settings and connections associated with Bluetooth, cellular data and Wi-Fi. It’s a simple addition that demonstrates how much attention to enhanced security and user-facing controls in Marshmallow.
  • Monthly security patches
  1. Following the Stagefright scare, Google and a number of manufacturers pledged to provide monthly security updates to keep on top of any security weaknesses in Android. With this in mind, Marshmallow now displays your device’s Android security patch level section in the About phone section.
  • Encryption
  1. Encryption is back in Android Marshmallow with a vengeance
  2. Marshmallow heralds the dawn of the new age of Android encryption, although only on new devices. New Android devices running Marshmallow are required to use full-disk encryption by default, but devices updated from a previous version of Android do not.
  • Smart Lock
  1. Smart Lock has been around since Lollipop, but it bears repeating now that smartwatches are more prevalent.
  2. Smart Lock on Marshmallow provides options for unlocking your

    device or keeping your device unlocked depending on various intuitive scenarios.
  3. Smart Lock is found in the security settings and requires the use of some form of lock screen security.
  • Smart Lock for Passwords
  1. Google’s old Google Settings app is no more, having graduated to its very own section in the Settings menu, where it belongs. This area contains all your Google settings and preferences.
  2. Everything from Voice, Google Fit, Now and location access is contained here, so it’s worth getting to know this area.
  3. One new addition is called Smart Lock for Passwords and it is basically a Google password manager

Android Marshmallow usability

  • Text selection
  1. Marshmallow introduces an improved text selection setup
  • Delete screenshots from notifications shade
  1. In previous versions of Android, when you took a screenshot the only option you had straight from the notifications preview was to share it.
  2. In Marshmallow, you can now delete it too. This may not seem like a big deal, but if, like me, you take about a hundred screenshots a day, it's hugely convenient because you no longer have to go into your gallery to delete a poorly timed or duplicate screenshot.
  • App links
  1. Another long-standing irritation with Android is the way it handles app links.
  2. Previously, you seemed to have to repeated tell the system to always open certain links with a certain app, only to have to repeat the process again and again.
  3. This seems to have finally been solved with Marshmallow.
  • Silent mode/priority notifications
  1. Silent mode is back in Android Marshmallow, along with a fairly confusing new volume setup.
  2. When you press the volume button you'll get a single volume slider, which can be expanded to reveal ring volume as well as media volume and alarm volume.
  • Direct share
  1. Direct Share is a new feature. It doesn't work everywhere yet, but the idea is that when you hit the share picker, instead of just seeing a list of apps, you'll see some contacts at the top as well.
  2. Theoretically you can instantly share the content with that person rather than head to an app in which you then need to choose a contact.
  • Chrome custom tabs
  1. This is basically a Chrome-based in-app mini-browser that developers can use to display web page content within their app (like an FAQ or Help page), rather than having a user bounce from their app to a web app and possibly not make it back.
  2. Developers can color and brand the Chrome custom tab to look as much like part of their app as possible.
  3. The popup browser draws over the top of the original app, and supports basically all the features of the full version of Chrome itself, but with dedicated tweaks specifically for that app that's using it, such as an embedded share button specifically for their app.

Conclusion:

Android Marshmallow isn't so much a revolution as a refinement of Android. The visual makeover of Android Lollipop now has a lot more depth beneath that shiny surface. Marshmallow is primarily about a few things: making Google services even easier to use; delivering better ways to access and manage apps; addressing core system weaknesses like battery life and security; and delivering more customization and user-facing controls to stock Android.

React Native
React Native enables you to build world-class application experiences on native platforms using a consistent developer experience based on JavaScript and React. The focus of React Native is on developer efficiency across all the platforms you care about - learn once, write anywhere. Facebook uses React Native in multiple production apps and will continue investing in React Native.
http://facebook.github.io/react-native/


NativeScript
Open Source framework for building cross-platform truly native iOS, Android and Windows mobile apps using JavaScript.


JUniversal
JUniversal makes Java truly cross platform
Writing the same code from scratch for every platform is a pain & inefficient. There must be a better way. JUniversallets you write code in Java (like you probably already do if you develop for Android) and take that code to places you never thought it could go. It’s primarily targeted to sharing code across mobile apps, but the technology can extend to non-mobile scenarios as well.


Intel® XDK
Intel® XDK HTML5 Cross-platform Development Tool provides a simplified workflow to enable developers to easily design, debug, build, and deploy HTML5 web and hybrid apps across multiple app stores, and form factor devices.
Experience Intel® XDK - the easy and fast way to get your apps to market.
Ecere
Cross Platform SDK with C-styled object oriented language, GUI toolkit, powerful 2D/3D engine and IDE.

Appcelerator (Titanium Mobile)
Enterprise Mobile Application Development Platform.

Ionic
The beautiful, open source front-end framework for developing hybrid mobile apps with HTML5.

Corona SDK
Corona SDK is the leading mobile development framework. Build high-quality apps and games for iOS, Android, Kindle Fire and Nook in record time.

PhoneGap
PhoneGap is a free and open source framework that allows you to create mobile apps using standardized web APIs for the platforms you care about.

Adobe AIR
The Adobe® AIR® runtime enables developers to package the same code into native apps for Windows and Mac OS desktops as well as iPhone, iPad, Kindle Fire, Nook Tablet, and other Android devices.

Unity (PAID)
Unity3D is a cross-platform game engine with a built-in IDE developed by Unity Technologies. It is used to develop video games for web plugins, desktop platforms, consoles and mobile devices.

Basic4android (PAID)
Basic4android is the simplest and most powerful Rapid Application Development (RAD) tool available for the Android platform.

Xamarin (PAID)
Create native iOS, Android, Mac and Windows apps in C#.

Telerik Platform (PAID)
The only modular platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native apps.


After Long search finally your Android-Action find out a solution for changing image resolution ie. dpi/ppi.

Dots per inch (DPI) in this context, refers to the smallest amount of ink that a given printer can print. Put another way, the more dots that a printer (or imagesetter) can apply per inch, the higher the resolution (and therefore quality of image reproduction) an imaging device can reproduce. (Source : designtalkboard)

Pixels per inch (PPI) is often used interchangeably with DPI. PPI is, arguably, where the confusion started from in the first place. PPI a somewhat relative term. Once a photograph is opened in a program such as Adobe Photoshop and displayed on a computer screen, its relation to print paradigm concepts such as per inch are not always helpful. In many cases it is actually more helpful to talk about the total width and height of the digital image in pixels, rather than pixels per inch or dots per inch. (Source : designtalkboard)


Convert image to bitmap using BitmapFactory, then convert to byte[] array(ByteArray) that will store the Bitmap.compress(). From ByteArray



 ByteArrayOutputStream image_barr = new ByteArrayOutputStream();  
 input.compress(Bitmap.CompressFormat.JPEG, 100, image_barr);  
 byte[] image_byte = image_barr.toByteArray();

Based on the JFIF structure we need to edit 13th, 14th, 15th, 16th, and 17th indexes in the byte array. 

13th index             - Density
14th & 15th index        - X resolution
16th & 17th index        - Y resolution
For example if we need to set for 500dpi as the X and Y resolution, then convert decimal to hex value [use this link for conversion binaryhexconverter]

So 500  = 1F4

 image_byte[13] = 00000001;  
 image_byte[14] = 00000001;  
 image_byte[15] = (byte) 244  
 image_byte[16] = 00000001;  
 image_byte[17] = (byte) 244  

As the same for 200 dpi hex value is C8


 image_byte[13] = 00000001;  
 image_byte[15] = (byte) 200  
 image_byte[17] = (byte) 200  




Intro:
In-app Billing is a Google Play service that lets you sell digital content from inside your applications. You can use the service to sell a wide range of content, including downloadable content such as media files or photos, virtual content such as game levels or potions, premium services and features, and more.

Steps to integrate into an Android Application:


 1. Create sign apk for your application.
 2. Upload your apk on Google play store.
 3. Create product for your application.
 4. Wait for 6-12 hour for update item’s on Play store.
 5. Copy Key of your Google account and paste it into BillingSecurity
 String base64EncodedPublicKey = "PUT YOUR PUBLIC KEY HERE";  

 6. Give Billing permissions in Manifest.xml
 <uses-permission android:name="com.android.vending.BILLING" />  

 7. Install the Google Play Billing Library of Extrafolder in Sdk.
 8. Adding the InAppBillingService.aidl File to the Project.
 9. Adding the Utility Classes to the Project
      Eg: <sdk path>/extras/google/play_billing/samples/TrivialDrive
 10. Google Play Developer Console and Google Wallet Accounts
 Each application developer making use of Google Play billing must be identified by a unique public license key. The only way to obtain a public license key is to register an application within the Google Play Developer Console. If you do not already have a Google Play Developer Console account, go to http://play.google.com/apps/publish and follow the steps to register as outlined in the chapter entitled Signing and Preparing an Android Application for Release.   

 11. Obtaining the Public License Key for the Application


 From the home page of the Google Play Developer Console, click on the Add new application button, specifying the default language and a title of InAppBilling. Once this information has been entered, click on the Upload APK button  

 12. Setting Up Google Play Billing in the Application


 String base64EncodedPublicKey = "<your license key here>";(Already mentioned above )  
          mHelper = new IabHelper(this, base64EncodedPublicKey);  
          mHelper.startSetup(new   
                IabHelper.OnIabSetupFinishedListener() {  
                  public void onIabSetupFinished(IabResult result)   
                 {  
                if (!result.isSuccess()) {  
                 Log.d(TAG, "In-app Billing setup failed: " +   
                          result);  
                } else {         
                     Log.d(TAG, "In-app Billing is set up OK");  
                 }  
               }  
          });  

 13. Initiating a Google Play In-app Billing Purchase
        eg:InAppBillingActivity.java file and adding the code for the buyClick method so that it reads as follows


 public void buyClick(View view) {  
           mHelper.launchPurchaseFlow(this, ITEM_SKU, 10001,    
                     mPurchaseFinishedListener, "mypurchasetoken");  
      }  

 14. Implementing the onActivityResult Method
       When the purchasing process returns, it will call a method on the calling activity named onActivityResult.


 @Override  
      protected void onActivityResult(int requestCode, int resultCode,   
         Intent data)   
      {  
           if (!mHelper.handleActivityResult(requestCode,   
              resultCode, data)) {     
              super.onActivityResult(requestCode, resultCode, data);  
       }  
      }  

 15. Implementing the Purchase Finished Listener
 IabHelper.OnIabPurchaseFinishedListener mPurchaseFinishedListener   
      = new IabHelper.OnIabPurchaseFinishedListener() {  
      public void onIabPurchaseFinished(IabResult result,   
           Purchase purchase)   
      {  
        if (result.isFailure()) {  
         // Handle error  
         return;  
       }     
       else if (purchase.getSku().equals(ITEM_SKU)) {  
         consumeItem();  
        buyButton.setEnabled(false);  
      }  
   }  
 };  

 16. Consuming the Purchased Item
 public void consumeItem() {  
      mHelper.queryInventoryAsync(mReceivedInventoryListener);  
 }  
 IabHelper.QueryInventoryFinishedListener mReceivedInventoryListener   
   = new IabHelper.QueryInventoryFinishedListener() {  
        public void onQueryInventoryFinished(IabResult result,  
         Inventory inventory) {  
         if (result.isFailure()) {  
            // Handle failure  
         } else {  
          mHelper.consumeAsync(inventory.getPurchase(ITEM_SKU),   
                mConsumeFinishedListener);  
         }  
   }  
 };  
  As with the query, the consumption task is also performed asynchronously and, in this case, is configured to call a listener named mConsumeFinishedListener when completed. This listener now needs to be implemented such that it enables the “Click Me!” button after the item has been consumed in the billing system:  
 IabHelper.OnConsumeFinishedListener mConsumeFinishedListener =  
       new IabHelper.OnConsumeFinishedListener() {  
        public void onConsumeFinished(Purchase purchase,   
        IabResult result) {  
       if (result.isSuccess()) {                    
              clickButton.setEnabled(true);  
       } else {  
           // handle error  
       }  
  }  
 };  

 17. Releasing the IabHelper Instance
 Remaining in the InAppBillingActivity.java file, override the onDestroy() activity lifecycle method as follows:  
     @Override  
     public void onDestroy() {  
      super.onDestroy();  
      if (mHelper != null) mHelper.dispose();  
      mHelper = null;  
    }  

 18. Modifying the Security.java File
 public static boolean verifyPurchase(String base64PublicKey,   
      String signedData, String signature) {  
     if (TextUtils.isEmpty(signedData) ||   
         TextUtils.isEmpty(base64PublicKey) ||  
         TextUtils.isEmpty(signature)) {  
       Log.e(TAG, "Purchase verification failed: missing data.");  
       if (BuildConfig.DEBUG) {  
         return true;  
       }  
       return false;  
     }  
     PublicKey key = Security.generatePublicKey(base64PublicKey);  
     return Security.verify(key, signedData, signature);  
   }  

Reference:
Techotopia - Google Play In-app Billing

Javacodegeeks
Intro:
This project allows you to calculate the direction between two locations and display the route on a Google Map using the Google Directions API.

Github Link:
https://github.com/jd-alexander/Google-Directions-Android

Screenshot:

Sample:
The sample makes use of the Google Places API for Android in order to provide a real life example of how the library can be used.
Directions Sample App


Like writing Android network plumbing code? Didn't think so. Start with Firebase in 3 minutes




In Android, this form validation lib simplify and streamline the code to validate a form. It validates all type of EditText. It is used for all validation like
* Email
* Credit card Exp Year,Month, cvv

* Username
* Required Fields etc


 public class Formvalidation {  
      Context context;  
      EditText Username, Password, PhoneNumber;  
      static String emailPattern = "[a-zA-Z0-9._-]+@[a-z]+\\.+[a-z]+";  
      public Formvalidation(Context context) {  
           this.context = context;  
      }  
      public static boolean isFirstName(EditText Et_Firstname) {  
           return Et_Firstname.getText().toString().isEmpty() ? false : true;  
      }  
      public static boolean isLastName(EditText Et_LastName) {  
           return Et_LastName.getText().toString().isEmpty() ? false : true;  
      }  
      public static boolean isUsername(EditText Et_Username) {  
           return Et_Username.getText().toString().isEmpty() ? false : true;  
      }  
      public static boolean isEmailValid(EditText Et_Username) {  
           return !Et_Username.getText().toString().matches(emailPattern) ? false : true;  
      }  
      public static boolean isConformPassword(EditText Et_ConformPassword) {  
           return Et_ConformPassword.getText().toString().isEmpty() ? false : true;  
      }  
      public static boolean isPassword(EditText Et_Password) {  
           return Et_Password.getText().toString().isEmpty() ? false : true;  
      }  
      public static boolean isPasswordMinLength(EditText Et_Password) {  
           return Et_Password.getText().toString().trim().length()<6 ? false : true;  
      }  
      public static boolean isConformPasswordMatch(EditText et_Password,  
                EditText et_ConformPassword) {  
           // TODO Auto-generated method stub  
           return !et_Password.getText().toString()  
                     .equals(et_ConformPassword.getText().toString()) ? false : true;  
      }  
      public static boolean isPhoneNumber(EditText Et_Phonenumber) {  
           return Et_Phonenumber.getText().toString().isEmpty() ? false : true;  
      }  
      public static boolean isValidPhonenumber(EditText Et_valid_Phonenumber) {  
           return Et_valid_Phonenumber.getText().toString().length() != 10 ? false  
                     : true;  
      }  
      public static boolean isAddress(EditText Et_Address) {  
           return Et_Address.getText().toString().isEmpty() ? false : true;  
      }  
      public static boolean isDob(EditText Et_Dob) {  
           return Et_Dob.getText().toString().isEmpty() ? false : true;  
      }  
      public static boolean isCardNumber(EditText Et_CardNumber) {  
           return Et_CardNumber.getText().toString().isEmpty() ? false : true;  
      }  
      public static boolean isCardHolder(EditText Et_CardHolder) {  
           return Et_CardHolder.getText().toString().isEmpty() ? false : true;  
      }  
      public static boolean isAmount(EditText Et_Amount) {  
           return Et_Amount.getText().toString().isEmpty() ? false : true;  
      }  
      public static boolean isExpireMonth(Spinner Expire_Montht) {  
           return Expire_Montht.getSelectedItem().toString().equals("Month") ? false : true;  
      }  
      public static boolean isExpireYear(Spinner Expire_Year) {  
           return Expire_Year.getSelectedItem().toString().equals("Year") ? false : true;  
      }  
      public static boolean isCvvr(EditText Et_Cvvt) {  
           return Et_Cvvt.getText().toString().isEmpty() ? false : true;  
      }  
 }