commit
28071a10b5
2 changed files with 6 additions and 4 deletions
|
@ -100,7 +100,7 @@ public class MainActivity extends Activity implements DefaultHardwareBackBtnHand
|
||||||
switch (requestCode) {
|
switch (requestCode) {
|
||||||
case STORAGE_PERMISSION_REQ_CODE:
|
case STORAGE_PERMISSION_REQ_CODE:
|
||||||
if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
||||||
if (!Settings.canDrawOverlays(this)) {
|
if (BuildConfig.DEBUG && !Settings.canDrawOverlays(this)) {
|
||||||
Intent intent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION,
|
Intent intent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION,
|
||||||
Uri.parse("package:" + getPackageName()));
|
Uri.parse("package:" + getPackageName()));
|
||||||
startActivityForResult(intent, OVERLAY_PERMISSION_REQ_CODE);
|
startActivityForResult(intent, OVERLAY_PERMISSION_REQ_CODE);
|
||||||
|
|
|
@ -9,6 +9,8 @@ import com.facebook.react.bridge.ReadableMap;
|
||||||
|
|
||||||
import com.mixpanel.android.mpmetrics.MixpanelAPI;
|
import com.mixpanel.android.mpmetrics.MixpanelAPI;
|
||||||
|
|
||||||
|
import io.lbry.browser.BuildConfig;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
@ -16,9 +18,9 @@ import org.json.JSONException;
|
||||||
|
|
||||||
public class MixpanelModule extends ReactContextBaseJavaModule {
|
public class MixpanelModule extends ReactContextBaseJavaModule {
|
||||||
|
|
||||||
// TODO: Detect dev / debug and release mode and update value accordingly
|
private static final String MIXPANEL_TOKEN = BuildConfig.DEBUG ?
|
||||||
private static final String MIXPANEL_TOKEN = "93b81fb957cb0ddcd3198c10853a6a95"; // Production
|
"bc1630b8be64c5dfaa4700b3a62969f3" /* Dev Testing */ :
|
||||||
//private static final String MIXPANEL_TOKEN = "bc1630b8be64c5dfaa4700b3a62969f3"; // Dev Testing
|
"93b81fb957cb0ddcd3198c10853a6a95"; /* Production */
|
||||||
|
|
||||||
private Context context;
|
private Context context;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue