Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/189.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android Can';无法从解析服务器发送通知_Android_Firebase_Push Notification_Parse Server - Fatal编程技术网

Android Can';无法从解析服务器发送通知

Android Can';无法从解析服务器发送通知,android,firebase,push-notification,parse-server,Android,Firebase,Push Notification,Parse Server,我正在尝试从AWS上托管的Bitnami解析服务器(3.1.2)发送推送通知。 我在server.js中有来自firebase的服务器密钥和发件人ID。 通知可以从firebase控制台工作,但不能从解析服务器工作(既不能从dashbord也不能从RESTAPI)。它说它已保存,但显示为0,即使我有两个安装 有什么想法吗 普埃斯发送了0 我的舱单: <?xml version="1.0" encoding="utf-8"?> 模梯度 apply plugin: 'com.andr

我正在尝试从AWS上托管的Bitnami解析服务器(3.1.2)发送推送通知。 我在server.js中有来自firebase的服务器密钥和发件人ID。 通知可以从firebase控制台工作,但不能从解析服务器工作(既不能从dashbord也不能从RESTAPI)。它说它已保存,但显示为0,即使我有两个安装

有什么想法吗

普埃斯发送了0

我的舱单:

<?xml version="1.0" encoding="utf-8"?>
模梯度

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.parse.starter"
        minSdkVersion 26
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])

    implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
    implementation 'androidx.appcompat:appcompat:1.0.0-beta01'
    implementation 'com.parse.bolts:bolts-tasks:1.3.0'

    implementation 'com.github.parse-community.Parse-SDK-Android:fcm:1.19.0'
    implementation 'com.github.parse-community.Parse-SDK-Android:parse:1.19.0'
    implementation 'com.google.firebase:firebase-core:16.0.7'
    implementation 'com.google.firebase:firebase-messaging:17.3.4'

    implementation 'com.google.android.gms:play-services-auth:16.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'
}
apply plugin: 'com.google.gms.google-services'
和server.js

var express = require('express');
var ParseServer = require('parse-server').ParseServer;
var app = express();
// Specify the connection string for your mongodb database
// and the location to your Parse cloud code
var api = new ParseServer({
    databaseURI: "",
    cloud: "./node_modules/parse-server/lib/cloud-code/Parse.Cloud.js",
    appId: "",
    masterKey: "",
    push: {
    android: {
      senderId: "",
      apiKey: ""
    }
  },
    fileKey: "",
    serverURL: ""
});
// Serve the Parse API on the /parse URL prefix
app.use('/parse', api);

var port = 1337;
app.listen(port, function() {
    console.log('parse-server running on port ' + port);
});

//Parse Dashboard
var ParseDashboard = require('parse-dashboard');
var dashboard = new ParseDashboard({
    apps: [
        {
            appName: "My Bitnami Parse API",
            appId: "",
            masterKey: "",
    push: {
    android: {
        senderId: "",
        apiKey: ""
    }
  },
            fileKey: "",
            production: true,
            serverURL: "
        }
    ],
    users: [
        {
            user: "user",
            pass: ""
        }
    ], useEncryptedPasswords: true
});

var allowInsecureHTTP = true;

// Serve the Parse Dashboard on the /parsedashboard URL prefix
app.use('/', dashboard);

var portdash = 4040;
app.listen(portdash, function() {
    console.log('parse-dashboard running on port ' + portdash);
});

您好,您找到解决方案了吗?是的,我用Parse Server 3.1.3创建了一个新的VM,它成功了:)
apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.parse.starter"
        minSdkVersion 26
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])

    implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
    implementation 'androidx.appcompat:appcompat:1.0.0-beta01'
    implementation 'com.parse.bolts:bolts-tasks:1.3.0'

    implementation 'com.github.parse-community.Parse-SDK-Android:fcm:1.19.0'
    implementation 'com.github.parse-community.Parse-SDK-Android:parse:1.19.0'
    implementation 'com.google.firebase:firebase-core:16.0.7'
    implementation 'com.google.firebase:firebase-messaging:17.3.4'

    implementation 'com.google.android.gms:play-services-auth:16.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'
}
apply plugin: 'com.google.gms.google-services'
var express = require('express');
var ParseServer = require('parse-server').ParseServer;
var app = express();
// Specify the connection string for your mongodb database
// and the location to your Parse cloud code
var api = new ParseServer({
    databaseURI: "",
    cloud: "./node_modules/parse-server/lib/cloud-code/Parse.Cloud.js",
    appId: "",
    masterKey: "",
    push: {
    android: {
      senderId: "",
      apiKey: ""
    }
  },
    fileKey: "",
    serverURL: ""
});
// Serve the Parse API on the /parse URL prefix
app.use('/parse', api);

var port = 1337;
app.listen(port, function() {
    console.log('parse-server running on port ' + port);
});

//Parse Dashboard
var ParseDashboard = require('parse-dashboard');
var dashboard = new ParseDashboard({
    apps: [
        {
            appName: "My Bitnami Parse API",
            appId: "",
            masterKey: "",
    push: {
    android: {
        senderId: "",
        apiKey: ""
    }
  },
            fileKey: "",
            production: true,
            serverURL: "
        }
    ],
    users: [
        {
            user: "user",
            pass: ""
        }
    ], useEncryptedPasswords: true
});

var allowInsecureHTTP = true;

// Serve the Parse Dashboard on the /parsedashboard URL prefix
app.use('/', dashboard);

var portdash = 4040;
app.listen(portdash, function() {
    console.log('parse-dashboard running on port ' + portdash);
});