我想添加防火墙邀请到我的android应用程序。我遵循了教程( https://firebase.google.com/docs/invites/android )中的步骤,但我有以下错误
无法解析符号REQUEST_INVITE
我已经添加了firebase核心并邀请到我的应用程序,当我点击consol中的动态链接时,它没有要求我接受任何东西。
等级:
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.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:24.2.1'
compile 'com.google.firebase:firebase-ads:10.2.0'
compile 'com.google.firebase:firebase-invites:10.2.0'
compile 'com.google.firebase:firebase-core:10.2.0'
testCompile 'junit:junit:4.12'
}
apply plugin :'com.google.gms.google-services'java文件:
//sent Invite
private void onInviteClicked(){
Intent intent = new AppInviteInvitation.IntentBuilder(getString(R.string.invitation_title))
.setMessage(getString(R.string.invit_message))
.setCallToActionText(getString(R.string.invit_cta))
.build();
startActivityForResult(intent, REQUEST_INVITE);
}google服务json:
"services": {
"analytics_service": {
"status": 1
},
"appinvite_service": {
"status": 1,
"other_platform_oauth_client": []
},
"ads_service": {
"status": 2
}
}还是REQUEST_INVITE是我们必须设置的变量,取决于我们在playstore上应用程序的ID?如果是的话,是否有可能在启动之前知道这个ID?
非常感谢你的帮助
发布于 2017-03-22 01:16:18
REQUEST_INVITE只是您在使用它的活动中定义的一个static final int。例如:
private static final int REQUEST_INVITE = 0;请参阅快速启动样本上的代码。
https://stackoverflow.com/questions/42940584
复制相似问题