1

私はFirebase Consoleを使用して通知を送信しています。FCM Firebaseの1日の制限(1日に1つしか送信できません)

私のアプリが自分の携帯電話にのみインストールされるように私のアプリをテストしています。私は一日に私のアプリにのみ通知を送信することができる午前

は、通知の残りの部分は完了として示したが、配信されません。

私の選択したオプションは=>ユーザーセグメント>アプリ>と私のアプリのパッケージ名です。

無料プランには制限はありますか?

build.gradle(PROJECT)

buildscript { 
    repositories { 
     jcenter() 
    } 

dependencies { 
    classpath 'com.android.tools.build:gradle:2.2.3' 
    classpath 'com.google.gms:google-services:3.0.0' 
    // NOTE: Do not place your application dependencies here; they belong 
    // in the individual module build.gradle files 
} 
} 

allprojects { 
repositories { 
    jcenter() 
} 
} 

task clean(type: Delete) { 
    delete rootProject.buildDir 
} 

build.gradle(MODULE)

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 24 
    buildToolsVersion "25.0.1" 
    defaultConfig { 
     applicationId "com.example.myfirstapp" 
     minSdkVersion 15 
     targetSdkVersion 24 
     versionCode 1 
     versionName "1.0" 
     testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
} 

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 
     exclude group: 'com.android.support', module: 'support-annotations' 
    }) 
    compile 'com.android.support:appcompat-v7:24.2.1' 
    compile 'com.google.firebase:firebase-core:9.0.1' 
    compile 'com.google.firebase:firebase-messaging:9.0.1' 
    testCompile 'junit:junit:4.12' 
} 


apply plugin: 'com.google.gms.google-services' 

のAndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="com.example.myfirstapp" > 


    <uses-permission android:name="android.permission.INTERNET" /> 

    <application 
     android:allowBackup="true" 
     android:icon="@mipmap/ic_launcher" 
     android:label="@string/app_name" 
     android:supportsRtl="true" 
     android:theme="@style/AppTheme"> 
     <activity android:name=".MainActivity"> 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 

       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 
     </activity> 

     <service 
      android:name=".TokenService"> 
      <intent-filter> 
       <action android:name="com.google.firebase.INSTANCE_ID_EVENT"/> 
      </intent-filter> 
     </service> 

     <service 
      android:name=".FCMMessageReceiverService"> 
      <intent-filter> 
       <action android:name="com.google.firebase.MESSAGING_EVENT"/> 
      </intent-filter> 
     </service> 

    </application> 


</manifest> 

TOKENサービス

public class TokenService extends FirebaseInstanceIdService { 

@Override 
public void onTokenRefresh() { 
    // Get updated InstanceID token. 
    String refreshedToken = FirebaseInstanceId.getInstance().getToken(); 
    Log.d("notification", refreshedToken); 
    sendRegistrationToServer(refreshedToken); 
} 

private void sendRegistrationToServer(String token) { 
} 
} 

FCMMessageReceiverService

package com.example.myfirstapp; 

import android.app.NotificationManager; 
import android.app.PendingIntent; 
import android.content.Context; 
import android.content.Intent; 
import android.media.RingtoneManager; 
import android.net.Uri; 
import android.support.v4.app.NotificationCompat; 
import android.util.Log; 

import com.google.firebase.messaging.FirebaseMessagingService; 
import com.google.firebase.messaging.RemoteMessage; 


public class FCMMessageReceiverService extends FirebaseMessagingService { 


    @Override 
    public void onMessageReceived(RemoteMessage remoteMessage) { 

     Log.w("fcm", "received notification"); 
     sendNotification(remoteMessage.getNotification().getTitle()); 
    } 

    private void sendNotification(String messageBody) { 
     Intent intent = new Intent(this, MainActivity.class); 
     intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); 
     PendingIntent pendingIntent = PendingIntent.getActivity(this, 0 , intent, 
       PendingIntent.FLAG_ONE_SHOT); 

     Uri defaultSoundUri= RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION); 
     NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this) 
       .setSmallIcon(R.mipmap.ic_launcher) 
       .setContentTitle(messageBody) 
       .setAutoCancel(false) 
       .setSound(defaultSoundUri); 

     NotificationManager notificationManager = 
       (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); 

     notificationManager.notify(1, notificationBuilder.build()); 
    } 

} 
+2

[FCMの制限のAndroidのプッシュ通知の可能な複製?](http://stackoverflow.com/questions/40284336/fcm-limitation-for-android-push-notification) –

+0

そのような制限はありません極端な制限(* 1日あたりの通知?O_O *)。制限は一切ありません。詳細をお知らせください。 –

+0

ええ、確かに、私は家に帰ると詳細を提供します。 –

答えて

0

私は、テスト目的のために信じて、複数のデバイス、およびインスタンスを持つ初期の限界があります。残りは元気です。

+0

私はこれに同意しません。非常に小さな制限があるかどうかをテストする方法。 –

関連する問題