我想将firebase邀请添加到我的Android应用程序中。我按照教程中的步骤(https://firebase.google.com/docs/invites/android),但我有这个错误
无法解析符号REQUEST_INVITE
我添加了firebase核心并邀请到我的应用程序,当我点击consol中的动态链接时,它没有让我接受任何内容。
gradle:
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 service json:
"services": {
"analytics_service": {
"status": 1
},
"appinvite_service": {
"status": 1,
"other_platform_oauth_client": []
},
"ads_service": {
"status": 2
}
}
或REQUEST_INVITE是否是我们必须设置的变量,具体取决于Playstore上我们应用的ID? 如果是这样,是否可以在启动之前知道该ID?
非常感谢您的帮助
答案 0 :(得分:2)