Langsung ke konten utama

Postingan

Android ButterKnife View Binding

In this android tutorial, I am going to show how to use Android ButterKnife View Binding in android application development. If you have been developing android application, you will realized that there are lots of boilerplate codes in your application. In some cases, it will be too much that the onCreate() method will be bloated with boilerplate codes. This is where Android ButterKnife comes to your help. How it can help us to Improve your code Eliminate findViewById calls by using @BindView on fields.  Group multiple views in a list or array. Operate on all of them at once with actions, setters, or properties.  Eliminate anonymous inner-classes for listeners by annotating methods with @OnClick and others. Eliminate resource lookups by using resource annotations on fields.  In this post, I am going to show the method of using ButterKnife in RecyclerView and Each Single Views. Project Setup:  Open Project Level build.gradle file and add the following line. buildscr...

Firebase Cloud Messaging in Android

Firebase Cloud Messaging (FCM) is the new version of GCM. It inherits the reliable and scalable GCM infrastructure, plus new features. If you are integrating messaging in a new app, start with FCM. GCM users are strongly recommended to upgrade to FCM, in order to benefit from new FCM features today and in the future. Firebase Cloud Messaging is very easy to integrate into your Application. Just like GCM, FCM is a cross-platform messaging solution that allows you to send messages. FCM is completely free and there are no limitations Firebase Setup The Feature and Settings up of Application in Application is Explained in  Previous post . After this, follow the tutorial as in below. In This post, I am not explaining about any Layouts. Simply explains the Java code build to FCM Application. Adding Firebase Messaging to Your Project Now come back to your android project. Go to app folder and paste  google-services.json   file. Now go to your root level build.gradle f...

Firebase User Authentication in Android

Firebase provides more features as described in previous post . One of the very useful feature is User Authentication. Different types of User Authentication are, Email and Password Authentication Google Plus Authentication Facebook Authentication Github Authentication In this post, I will explain the way to implement Firebase Email & Password authentication. To demonstrate how simplified and easy to use Firebase is, we will build a simple login / register (Firebase Authentication) demo. This separates sensitive user credentials from your application data, and lets you focus on the user interface and experience for your Application. It is suitable for Simple, Easy and Perfect way of handling Login, Registration, Forget Password and so on. The Feature and Settings up of Application in Application is Explained in Previous post . After creating the project, Enable Firebase Email & Password authentication by selecting Authentication in Left Pane in Firebase Console and Go to Sign-i...

Android Getting Started with Firebase

With the latest news from Google I/O comes the new and upgraded Firebase. Firebase is a mobile platform that helps you quickly develop high-quality apps, grow your user base, and earn more money. Firebase is made up of complementary features that you can mix-and-match to fit your needs. Features of Firebase: Firebase comes with bunch  features  essential for every android app starting from authentication to hosting the app. Advantages of using Firebase: Super easy and quick to implement. No server side configuration needed. No PHP Scripts and No Database Designs. Realtime update without using GCM. Autoscaling built-in Can start for free (only need to start paying once we hit 50 connections) Robust APIs for Javascript (including several frameworks like Angular), iOS, and Android Built-in support for authentication services like Facebook, Google, and Twitter Declarative Security Rules model allows us to enforce read/write privileges and data validation throughout the tree Disadv...

Google Form to Android Application

Hi Friends, I will show you how to use Google Forms as Back-End.  For On-line application we have a separate table for feedback from users. But, In off-line applications like Music player we will not connect any databases. To get real-time feedback we can go for Firebase . But, Firebase has some CONS : 1.Data stored in JSON like Format. 2.Free account of Firebase has Limitation and for Unlimited Access we have to pay some amount per month. To avoid these CONS , we can connect Google Forms as Back-end PROS of using this method: 1.It provides real time user-friendly response 2.Cost Free 3.Easy to Integrate CREATE A GOOGLE FORM First thing you need to do is login to drive.google.com and create a new “Google Form”. After Creating your Google Form, get your share link from Forms. Your link looks like below https://docs.google.com/forms/d/e/1FAIpQLScIpmqndQeQG3lFbj0QkQ1Kt6tEXoPrOt314AZGQ2WKuK8IvA/viewform This URL needs to be converted to be used for sending data from code. The conversi...

How to use External SQLite DB in Android

In this Post, I will explain how to import and use External SQLite DB in Android. You can import and use SQLite database with the extensions like .db, .db3,sqlite and sqlite3. The External DB is created with some desktop applications like SQLite Browser , SQLite Converter and so on. After Generating the DB paste that into your App's assets folder. Code: DBHelper.class Create a class named as DBHelper extending with SQLiteHelper . Paste the following code in that class. public class DBHelper extends SQLiteOpenHelper { Context context; String DB_PATH; String divider = "/"; String DB_NAME; public DBImporterExporter(Context context, String DB_NAME) { super(context, DB_NAME, null, 1); this.context = context; this.DB_NAME = DB_NAME; DB_PATH = divider + "data" + divider + "data" + divider + context.getPackageName() + divider + "databases/"; } public boolean isDataBaseExists() { Fi...

Mobile or Web (or both)?

Many beginning developers are questioning themselves about the area of the software development they want to build their career in and I was one of them (I'm still beginning, but I did choose already). Today there are several major areas you can focus on. Operation Systems (Windows, Android, iOS etc.) - here you would write pretty low-level code that would handle interaction with the hardware. Game Developing - could be broken down into many subcategories, such as game engines, UI in games, gameplay etc.  Mobile - building apps for mobile devices running Android, iOS, Windows Phone etc. This area is growing really fast nowadays because of new mobile devices. Android is embedded in TVs, cars, VR and IoT (I personally think, that someday Android development would be one of these major areas of software development itself). The Web is growing just as fast as mobile, and the reason for it is online clouds. Almost everything is going to the web, it's convenient, you can access it al...