This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class FCM { | |
public function send_notification($token, $payload_notification, $payload_data) { | |
$url = 'https://fcm.googleapis.com/fcm/send'; | |
$fields = array( | |
//'registration_ids' => $token, | |
//'condition' => "'logined' in topics || 'news' in topics", | |
'to' => '/topics/news', | |
'priority' => 'normal', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.fanalytics; | |
import android.os.Bundle; | |
import android.support.v7.app.AppCompatActivity; | |
import android.view.View; | |
import com.google.firebase.analytics.FirebaseAnalytics; | |
public class MainActivity extends AppCompatActivity { | |
private FirebaseAnalytics mFirebaseAnalytics; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<defaultsMap> | |
<entry> | |
<key>is_promotion_on</key> | |
<value>false</value> | |
</entry> | |
<entry> | |
<key>price</key> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Intent intent = new AppInviteInvitation.IntentBuilder("Send App Invitation") | |
.setMessage("Special season for this app is starting now, try it and get 100 baht") | |
.setDeepLink(Uri.parse("http://example.com/offer/100_baht")) | |
.build(); | |
startActivityForResult(intent, REQUEST_INVITE); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Intent intent = new AppInviteInvitation.IntentBuilder("Send App Invitation") | |
.setMessage("Special season for this app is starting now, try it and get 100 baht") | |
.setDeepLink(Uri.parse("http://example.com/offer/100_baht")) | |
.setCustomImage(Uri.parse("https://appjoy.org/wp-content/uploads/2016/06/firebase-invites-logo.png")) | |
.setCallToActionText("Install") | |
.build(); | |
startActivityForResult(intent, REQUEST_INVITE); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
protected void onActivityResult(int requestCode, int resultCode, Intent data) { | |
super.onActivityResult(requestCode, resultCode, data); | |
Log.d(TAG, "onActivityResult: requestCode=" + requestCode + ", resultCode=" + resultCode); | |
if (requestCode == REQUEST_INVITE) { | |
if (resultCode == RESULT_OK) { | |
// Get the invitation IDs of all sent messages | |
String[] ids = AppInviteInvitation.getInvitationIds(resultCode, data); | |
for (String id : ids) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Intent intent = new AppInviteInvitation.IntentBuilder("Send App Invitation") | |
.setMessage("Special season for this app is starting now, try it and get 100 baht") | |
.setDeepLink(Uri.parse("http://example.com/offer/100_baht")) | |
.setEmailHtmlContent("<a href='%%APPINVITE_LINK_PLACEHOLDER%%'><h1>Check it out here!</h1><img src='https://appjoy.org/wp-content/uploads/2016/06/firebase-invites-logo.png'></a>") | |
.setEmailSubject("Firebase Invites want to give you 100 baht") | |
.build(); | |
startActivityForResult(intent, REQUEST_INVITE); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Check for App Invite invitations and launch deep-link activity if possible. | |
// Requires that an Activity is registered in AndroidManifest.xml to handle | |
// deep-link URLs. | |
FirebaseDynamicLinks.getInstance().getDynamicLink(getIntent()) | |
.addOnSuccessListener(this, new OnSuccessListener<PendingDynamicLinkData>() { | |
@Override | |
public void onSuccess(PendingDynamicLinkData data) { | |
if (data == null) { | |
Log.d(TAG, "getInvitation: no data"); | |
return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<activity android:name=".DeepLinkActivity"> | |
<intent-filter> | |
<action android:name="android.intent.action.VIEW"/> | |
<category android:name="android.intent.category.DEFAULT"/> | |
<category android:name="android.intent.category.BROWSABLE"/> | |
<data | |
android:host="example.com" | |
android:scheme="http"/> |
OlderNewer