Posts

Showing posts from December, 2016

Alert Dialog in Android

Image
Alert Dialog in Android In some conditions in your application you ask the decisions of user like yes or no. By taking the user response in the same activity  and within changing the screen(activity) you can use a alert dialog. Create a new project in Android Studio. File --> New Android -->Application Project Next, Select Target Device After that, Select Activity And then Click finish. * For, alert dialog you need to create a object  of AlertDialogBuilder which an inner class of AlertDialog. see below, AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this); Then, you have to set yes or no buttons like this: alertDialogBuilder.setPositiveButton(CharSequence text,    DialogInterface.OnClickListener listener) alertDialogBuilder.setNegativeButton(CharSequence text,    DialogInterface.OnClickListener listener) For 2 Buttons(Yes or no): activity_main.xml: <?xml version="1.0" encoding="utf-8"?> <Relat...

Android Splash Screen

Image
Android Splash Screen Most Android Apps uses Android Splash Screen before launching application Activity. Android splash screen is used to display a logo or company name or brand for an app. In this blog we are going to discuss about implementing an Android Splash Screen. 1. Android Splash screen Create a new project in Android Stuido. File --> New Android -->Application Project Next, Select Target Device After that, Select Activity And then Click finish. For Splash Screen we are creating a SplashActivity. Create a new class in your package and name it as SplashAcivity.java. Open Manifest.xml, and make your splash screen activity as Launcher activity.       <activity android:name=".SpalshActivity">             <intent-filter>                 <action android:name="android.in...

Android Webview

Image
Android - Webview Android’s WebView allows you to integrate a webpage as a part of the app. WebView comes with all the features that of a desktop browser like managing history, cookies, HTML5 support and lot more. 1. Create a new project      Android Studio --> Open --> Create  a new project Then, select the Target devices Next, Select Activity Then,Click on finish.  After creation of project, open Manifest.xml (left side top):  And write Internet permission. <uses-permission android:name="android.permission.INTERNET"/> 1. Now open    activity_main.xml:     <WebView     android:id="@+id/webview"     android:layout_width="match_parent"     android:layout_height="match_parent"/> 2. In  MainActivity.java   Initialize the webview   WebView webView;   webView = (WebView) findViewById(R.id.webvi...

Facebook login from android application

Image
Facebook Login in Android Application Facebook login provides a convenient way for people to log  into app without having to go through a signup process. Using the latest version of  Facebook SDK's of android, it takes only a few minutes to add this feature to your android app. In this blog, you will learn how to add a Facebook login into your android app and handle the event to log a user in using Facebook login.  1. Register your app:     All apps that use the Facebook SDK's must be registered with Facebook Account.     - First login into Facebook Developer Page https://developers.facebook.com/     - Click on login and Click a create a new app in the top right.     - You will get a form that asks for the App's Display name, Contact email and Category.     - Enter the required fields and click the " Create App ID ". See below:     - In the next scree...

Privacy Polciy for MusicFind

Welcome to MusicFind.   By using MusicFind app, we are no intended to any user private information.