Monday, 23 May 2016

How to replace all files with actual File Template in android studio

Found it out, I think! So what you do is you go to the more options by pressing right arrow and click "Run Inspection on..." enter image description here
Then, click "whole project" and run the inspection. You'll get a table that looks like this:
enter image description here
Turns out you can just spam the link circled in red, and it'll replace all the headers! Not sure if this is the way to do it, but this worked for me.

Thursday, 15 October 2015

How to change tooltip background color in Ubuntu

Install and open gnome-color-chooser Install gnome-color-chooser.

Go to Specific → Tooltips and put black foreground over pale yellow background.

you are done !!

Flurry in Android

Flurry is used as analytic tool for android. Flurry is supported and provided by Yahoo.

How to use flurry in an application?

It's actually really simple.
1 - Head to flurry.com and register for your app, which will generate a unique tracking code.
2 - Download and add the FlurryAgent jar to your project libraries. If you're using Eclipse, right-click your project folder, select properties, select Java Build Path, and choose Add External JARs...
3 - Add android.permission.INTERNET to your AndroidManifest.xml.
4 - Add a call to the Flurry agent from the onStart() and onStop methods of your activities.
Note: replace the ID below with your unique tracking code.
public void onStart()
{
   super.onStart();
   FlurryAgent.onStartSession(this, "9GKQD4EBX123FEP6874H");
   // your code
}

public void onStop()
{
   super.onStop();
   FlurryAgent.onEndSession(this);
   // your code
}

Thursday, 9 July 2015

How to remove all breakpoints at a time in Android Studio

ctrl + shift + f8

How to auto import the necessary classes in Android Studio with shortcut


For Windows/Linux, you can go to File -> Settings -> Editor -> General -> Auto Import -> Java and make the following changes:
  • change Insert imports on paste value to All
  • markAdd unambigious imports on the fly option as checked

Saturday, 27 June 2015

How to add Google Play Services to Android Studio



  1. Go to File -> Project Structure
  2. Select 'Project Settings'
  3. Select 'Dependencies' Tab
  4. Click '+' and select '1.Library Dependencies'
  5. Search for : com.google.android.gms:play-services
  6. Select the latest version and click 'OK'

Integrating facebook in android studio (Method - 2)

Start your New Android Project

1. Create a new project in Android Studio from File ⇒ New ⇒ Android Application Project .
2. Now minimize or close your Android Studio. Go to your project directory inside it create a new folder.
3. UnZip your facebook SDK folder, now we need to copy facebook project files to our newly created libraries folder. Open your unzip folder and find facebook folder. In my case i found here F:\socialsdk\facebook-android-sdk-3.16.0\facebook-android-sdk-3.16 i extract facebook sdk in f drive inside socialssdk. You find your where you extract sdk files.
Copy this facebook folder to your libraries folder.
 4. Now open your copied facebook folder inside libraries and we need to remove some folder which we don’t need in our project and remove other file and folders.
5. Now open your android studio and open your project you create for this. Now find your libraries folder in your project and facebook inside.
5.  Open your facebook build.gradle inside facebook folder we need to configure 
Libraries ⇒ facebook ⇒ build.gradle
i.e.
android {
compileSdkVersion 21 buildToolsVersion "21.1.2"
defaultConfig {
minSdkVersion 16 targetSdkVersion 21 versionCode 1 versionName "1.0" }
You also copy and paste above code in your build.gradle.
6. Now open your ProjectDirectory ⇒ settings.gradle. In this file we need to include our facebook library.
include ':libraries:facebook'

 7. Now you need to configure your project structure shortcut Ctrl+Alts+Shift+S .

After click on button select Module ⇒ Dependencies ⇒ ⇒ Module Dependencies 
After this select facebook module and click ok button and then Apply  and let grable sync after this your Facebook SDK is ready to  use in your project.