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;  
      }  
 }  

Registering with Google Cloud Messaging


  • Goto Google APIs Console page and create a new project. (If you haven’t created already otherwise it will take you to dashboard)




  • After creating project you can see the project id in url. Note down the project id which will be used as SENDER ID in android project. (Example: in #project/encoded-region-847 after semicolon encoded-region-847 is the sender id)








  • Once you are done, click on Credentials and Create new Key in Public API access and Select Browser key. Leave empty and Create key.





    This API key will be used when sending requests to GCM server.