android: read Dropbox API from main package resources

This makes Dropbox work on apps using the SDK without needing to build it
themselves.
This commit is contained in:
Saúl Ibarra Corretgé
2019-01-29 15:39:20 +01:00
committed by Saúl Ibarra Corretgé
parent d5a43426ed
commit 9bfe54475b
@@ -41,9 +41,11 @@ public class Dropbox
public Dropbox(ReactApplicationContext reactContext) {
super(reactContext);
String pkg = reactContext.getApplicationContext().getPackageName();
int resId = reactContext.getResources()
.getIdentifier("dropbox_app_key", "string", pkg);
appKey
= reactContext.getString(
org.jitsi.meet.sdk.R.string.dropbox_app_key);
= reactContext.getString(resId);
isEnabled = !TextUtils.isEmpty(appKey);
clientId = generateClientId();