Skip to content

Instantly share code, notes, and snippets.

View griajobag's full-sized avatar
🏠
Working from home

Putu Guna griajobag

🏠
Working from home
View GitHub Profile
@griajobag
griajobag / activity_main.xml
Created June 30, 2016 03:44
firebase notif
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:orientation="vertical"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
package com.example.putuguna.firebasenotif.firebases;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Intent;
import android.media.RingtoneManager;
import android.net.Uri;
import android.support.v4.app.NotificationCompat;
import android.util.Log;
import android.widget.Toast;
package com.example.putuguna.firebasenotif.firebases;
import android.util.Log;
import com.google.firebase.iid.FirebaseInstanceId;
import com.google.firebase.iid.FirebaseInstanceIdService;
/**
* Created by putuguna on 20/06/16.
*/
@griajobag
griajobag / MainActivity.java
Created June 30, 2016 03:52
firebase notif
package com.example.putuguna.firebasenotif;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import com.google.firebase.iid.FirebaseInstanceId;
import com.google.firebase.messaging.FirebaseMessaging;
@griajobag
griajobag / AndroidManifest.xml
Created June 30, 2016 03:53
firebase notif
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.putuguna.firebasenotif">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<?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"
tools:context="com.example.putuguna.viewpagerindicator.MainActivity">
<android.support.v4.view.ViewPager
android:id="@+id/pager_instruction"
android:layout_width="match_parent"
<?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:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.example.putuguna.viewpagerindicator.SecondActivity">
<?xml version="1.0" encoding="utf-8"?>
<shape android:dither="true"
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval"
android:useLevel="true">
<size android:height="12dip"
android:width="12dip"/>
<solid android:color="@color/colorAccent"/>
<?xml version="1.0" encoding="utf-8"?>
<shape android:shape="oval"
xmlns:android="http://schemas.android.com/apk/res/android"
android:useLevel="true"
android:dither="true">
<size
android:height="12dip"
android:width="12dip"/>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/image_pager_item"
android:layout_width="match_parent"
android:layout_height="match_parent"