AuthorAnkita Deshmukh

Convert String to PrivateKey


Below code works to convert string to PrivateKey public static class DecryptionUtil { private static final String ASYMMETRIC_ALGO = "RSA/ECB/PKCS1Padding"; public static byte[] decryptUsingPrivateKey(PrivateKey privateKey, byte[] data) throws IOException, GeneralSecurityException { Cipher pkCipher = Cipher.getInstance(ASYMMETRIC_ALGO); pkCipher.init(Cipher.DECRYPT_MODE, privateKey); return...

Uploading image to Google Drive from Android


Below code will help to upload image directly to your google drive private void saveFileToDrive() { final Bitmap image = mBitmapToSave; Drive.DriveApi.newDriveContents(getGoogleApiClient()) .setResultCallback(new ResultCallback<DriveApi.DriveContentsResult>() { @Override public void onResult(DriveApi.DriveContentsResult result) { if (!result.getStatus().isSuccess()) { Log.i("ERROR", "Failed...

Volley Library to make network connection from Android App


Android volley is a networking library was introduced to make networking calls much easier, faster without writing tons of code. By default all the volley network calls works asynchronously, so we don’t have to worry about using asynctask anymore. Volley comes with lot of features. Some of them are 1. Effective request cache and memory management 2. Cancelling the requests To use volley library...

First onsite experience in my dream country … Australia


It was my school days dream that I wanted to go Australia and now I still cant believe that I got an opportunity to work onsite for the first time in Australia and that too in the capital city CANBERRA. I was shocked as well as surprised when I came to know that Nanostuffs have chosen me for this opportunity . The biggest hurdle for me to grab the opportunity was getting the passport as well the...

How to Login via Facebook,get facebook friendlist and their details, post on friends wall and get newsfeeds details


How to Login with Facebook: follow the below steps to add login via facebook: step1: register app on step 2: get the app_id , add it to strings file and add following code to manifest file: <meta-data android:name=”com.facebook.sdk.ApplicationId” android:value=”@string/app_id” /> //add meta-data inside appication tag. <activity...

Loading image from url using AQuery


Download android-query.jar from below link:   Add following code where you want to load image : public ImageLoader imageLoader; imageLoader = new ImageLoader(this); AQuery androidAQuery=new AQuery(getApplicationContext());, true, true, 100,default_pic);   Note: if you dont want to store image in cache memory set true parameters to false.  ...