Skip to main content

Posts

Kotlin Learning

Kotlin  --     A new Way   Changes of Android     Kotlin is a really powerful language  aimed to write more code using less boilerplate. And this is specially true in Android. Apart from the language itself and its own classes, Kotlin also provides a good set of useful extensions for already existing Java classes. An example of this is the way to make a request to an API and download the result. I know that a lot of different libraries already exist to help us do this task, and Kotlin can make use of them because of its interoperability with Java, but we sometimes use big libraries to commit small requirements only because it’s much simpler and less prone to errors. To learn more about the Kotlin language, take a look at  Resources to Learn Kotlin .

Push Notification using Firebase in Android

This is a tutorial about sending push notifications to Android through Firebase, based on the new release of Firebase this year (2016). This tutorial shows how to setup the skeleton for sending and receiving push notifications via FCM with instructions on server code. 1. Get started Add a new project or import an existing project to  Firebase console . If you choose to create a new project, you need to set the project name and country. For example, I will call my project Firebase Notification Then select "Add Firebase to your Android app". Set a package name for your app. I only set my package name and omit the SHA-1 because I don't use Firebase for my app's authentication. Click the  ADD APP  button here to download google-services.json. This is an important file and you will need to put it into your app. 2. Add google-services.json to your app folder Replace the google-services.json in your app folder. The Google services plugi...

Android - MediaPlayer

Following is the modified content of the xml  res/layout/activity_main.xml . =========================================== <?xml version="1.0" encoding="utf-8"?> <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"    android:paddingLeft="@dimen/activity_horizontal_margin"    android:paddingRight="@dimen/activity_horizontal_margin"    android:paddingTop="@dimen/activity_vertical_margin"    android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".MainActivity">    <TextView android:text="Music Palyer" android:layout_width="wrap_content"       android:layout_height="wrap_content"       android:id="@+id/textview"       android:textSize="35dp" ...

Android ListView Item 360 Degree 3D Rotation

main.xml : <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"     android:orientation="vertical"     android:layout_width="fill_parent"     android:layout_height="fill_parent"     > <TextView      android:layout_width="fill_parent"     android:layout_height="wrap_content"     android:text="Hello Smit Modi"     android:textColor="?attr/ColorPrimary"     /> <ListView     android:id = "@+id/smit_list"     android:layout_width="fill_parent"     android:layout_height="fill_parent"     android:background="?attr/ColorPrimary"     /> </LinearLayout> ListAnimation.java : package com.smit.ListAnimation; import com. smit .ListAnimation.*; import com. smit .ListAnimation.Rotate3dAnimation; import android.app.Activity; import android.os.Bundle; im...