How to Make a Mobile App Launcher Icon 15 Minutes




Nowadays Mobile Apps play a major role in digital life so today's tutorial I am going to teach you how to make a pixel perfect mobile app launcher icon using famous vector drawing tool Inkscape.

What we'll be creating - Mobile App Launcher Icon


This tutorial will help you to create a launcher icon that can be used for any location based service mobile application.

Setting up the environment for drawing
Open Inkscape software, and create a new document 500×500 pixels to change the default size of document press Shift+Ctrl+D (File->Document Properties) Press 1 to fit into the screen.
Select the "Rectangle and Squares Tool (press F4)" and drag out a square at the canvas 500 pixels wide and 500 pixels in height. Now change the color of square to green (#008000).

If you want to remove the border from filled square image just select it and press Shift +[none button].
Once you have completed the square, next create a circle (height : 211.400) after then remove the color of the circle
(press none button ) you will get a new image like below.
The created circle border should be around 33 pixels width [To change stroke width press Shift+Ctrl+F and select Stroke Style tab] don't forget to change the border color of the circle to white [select circle press Shift + White color from color palette ].
Select the circle object and duplicate it [press Ctrl+D to duplicate, Remember the duplicated object will be hidden until drag from existing object]. Drag and drop the duplicated object to the center of the circle. Fill up the newly created circle with white color.

Draw a 'V' shaped object to circle footer edge [Choose Bezier curves (or press Shift+F6)] White color will add a glossy look to location icon.

Choose a white color from color palette after selecting the V-shaped object.

Export Bitmap in Inkscape

File -> Export Bitmap save it as ic_launcher.png .
Done! The icon can be used on a mobile platform like Android, or iOS.




10 Tips to Help You Keep Your Google Adsense Ads




#1 Take care of invalid clicks and Impressions


After successful activation of your AdSense account; curiously you may test your ads by clicking them. Click yourself! It will make a wrong impression. If you are a publisher you don't want to click your own ads for checking. Google gives more importance to their advertisers who publish ads over Adsense program. Try to keep track on every activity of your users by using Google Adsense console. Moreover, you can figure out user behavior on Google analytics.
10 Tips to Help You Keep Your Google Adsense Ads



#2 Test Ads by Clicking Them


       It's a wrong perspective according to AdSense program. Don't ever click on ads that you served. Don't try to encourage your friends, relatives and colleagues to click or promote your ads. Google epic algorithm can trace you easily. all clicks are generated only from genuine user interest. You need to make sure that you have got enough traffic. Avoid invalid referral, posting an invalid referral to other websites to gain traffic and pay per click. Don't encourage your visitors to click on ads. If you have an Adsense account; you must read AdSense's TOS before you implement to your website.

#3 Keep away from Alternatives 


Do not add more than 2 other alternative ads companion along with Adsense. Clicksor, Chitika are other famous ad publisher programs; which help to gain money from showing relevant ads on your website.

#4 Content & Language 


Make sure that your article or content language is fully compatible with AdSense program.

#5 Fake marketing strategy & Mature content  


Sending ads via email, or post ads on the unauthorized website may cause your account. According to Adsense program policy;  you will be banned soon. Besides Adsense does not encourage adult content. It is strictly prohibited by Adsense TOS.

#6 Placing ads 


Placing ads on the blank page or use in popup window will cause your account.

#7 Altering Ad unit


You can customize your ad but you can not modify the code /script.

#8 Revealing  sensitive Information 


Never ever reveal your confidential information like CTR, CPM, Publisher account Number, and Partnership Information etc.


#9 Ads on tab


Opens ad in a new tab by using _blank target.  Don't place ads in the navigation area.


#10 Common mistakes - Bloggers


There are so many bloggers earn money via Adsense program. Adsense approval is not an easier task. Your blog must meet the quality requirements provided by Adsense program. If you are a blogger; you must have good content, which should be unique. Ad placement is an important thing about Adsense program. Besides, keep the best alignment for each ad unit.

•    Placing Ads inappropriate way, Placing more than three ad units on a single page.
•    Force to click ads - you can only navigate by clicking ads.
•    Applying your website's Adsense account to blog. The blog contains fewer contents, poor quality         content serving.
•    Promoting copied contents through blog
•    The blog post contains less than 300 words
•    Blog post contains only images and hyperlinks
•    Partnership with other blogs which having fewer contents
•    Only promoting videos through a blog. No textual data or contents
•    Testing your blog's ads manually.
•    Recommending friends and family to click your ads serving through a blog.
•    Implementing poor web template for your blog.
•    Altering ad unit code for good looking or any other reasons.
•    Implementing ad unit on iframe


Preview of Next Android Version N is Out : Bundled with Multi-window, Direct Reply notification




Many Android users are early waiting for the next version of Android after marshmallow. Google unveiled some epic features of upcoming Android N version through Android N Developer preview. Let's see what you can see more elegant on Android N.



#1 Android N Developer APIs & Tools


Android N preview is available for developers who wish to develop an app for Android N. The next version of  Android name will be started with N, What will be the name? Nougat? Nan? The reality is only Google knows what's going on with the naming of Android.


#2 Multi-window Natively 


You will get a native muti-window feature on Android N. The feature enables developers to redefine their design pattern because the developer can able to adjust the dimension of the window. Google development team added a new attribute to Manifest called android:resizableActivity If this attribute is set to true, your activity can be launched in split-screen modes on phones and tablets.

#3 Direct Reply notification 


The RemoteInput notification API is replanted to Android N. It enables users to reply to incoming notifications quickly.

#4 Java 8 Support on Android N


Now you can use many Java 8 features to your Android N based application. (features like default and static methods, streams, and functional interfaces )


  

How to Create Java Packages in Eclipse IDE



This tutorial will help you to create a Java package in Eclipse IDE Kepler. The package describes a namespace in which classes are stored. If omit a package from java file, it will be a default package. You can make basic programs with default packages. If you want to create a complex application, you should consider Java's package.
java package example eclipse

Let's see how to create a Java package in Eclipse 


Step 1: Open up the Eclipse IDE
Step 2: Create a new project File-> New -> Java Project name it as “SimplePackage” .
Step 3: Create a new class called Company

Create a package client.data.book then drag and drop Company class to newly created package client.data.book. It will clear default package from your project explorer of Eclipse IDE.
Now client.data.book package has got a class Company Add the following code to Company class.
Company.java

package client.data.book;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import server.data.book.Server;
public class Company {

 public static void main(String args[]) throws IOException
 {
 BufferedReader b=new BufferedReader(new InputStreamReader(System.in)); 
 System.out.println("Enter URL:");
 String h=b.readLine();
 System.out.println("Enter PORT:");
 int p=Integer.parseInt(b.readLine());
 Server s=new Server(h,p);
 s.setHost();
 s.viewStatus(s);
 }

}
Next you have to create server.data.book package, it includes a class called Server which is already instantiated in the Company Class.

Server.java


package server.data.book;
public class Server {
 String URL;
 int port;
public Server(String URL,int port)
{
 this.URL=URL;
 this.port=port;
}
public void setHost()
{
System.out.println("Host Name :"+URL);

System.out.println("Port Number:"+String.valueOf(port));

}
public void viewStatus(Server s)
{

 System.out.println(s.URL+"is Working at the port of"+String.valueOf(s.port));
}
}
You might like :

JSP MySQL Eclipse JEE Tutorial 

Android Tutorial: Using Switch Case Statement



This tutorial will help you to understand how to use of switch-case statement in an android project. This for beginners who just started android programming with Java. Besides it also explains how to create a dialog for displaying a message on a wall. You may familiar with the basic idea of switch statement from any other language like C or C++; The switch statement works with primitive data types so you can use it with any context.

Before you start with this tutorial, you need to know why we use switch. It will help to manage multiple items through a condition. You can take appropriate decision according to the condition using switch.

android tutorial java switch statement




Switch statement in Java 

public class SExample
{
  public static void main(String[] args)
{
    int num=2;
    String value;
    switch(num)
{
case 1: value="Iam one";
        break;
case 2: value="Iam two";
        break;
default : value="No Number";
}
System.out.println("value is"+value);

}

Main.java
package com.bigknol.swithsample;

import android.app.Activity;
import android.app.Dialog;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;

public class Main extends Activity implements OnClickListener {

 Button b1,b2;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        b1=(Button)findViewById(R.id.ShowDialog);
        b2=(Button)findViewById(R.id.ShowToast);
        b1.setOnClickListener(this);
        b2.setOnClickListener(this);

    }

    public void onClick(View v)
    {
     switch(v.getId())
     {
     case R.id.ShowToast:
      Toast.makeText(getApplicationContext(), "Iam toast Message", Toast.LENGTH_SHORT).show();
      break;
     case R.id.ShowDialog:
      Dialog d=new Dialog(this);
      d.setTitle("Iam Title");
      TextView tv=new TextView(this);
      tv.setText("Oh! Iam Here!");
      d.setContentView(tv);
      d.show();
      break;
     }

    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.activity_main, menu);
        return true;
    }

}


activity_main.xml


<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".Main" >

    <Button
        android:id="@+id/ShowToast"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentRight="true"
        android:layout_alignParentTop="true"
        android:layout_marginTop="141dp"
        android:text="Show Toast" />

    <Button
        android:id="@+id/ShowDialog"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentRight="true"
        android:layout_below="@+id/button1"
        android:layout_marginTop="55dp"
        android:text="Show Dialog" />

</RelativeLayout>

Video Tutorial : Android Switch Case [Example]