Ignore the logging of branch sdk errors occurred due to no internet.
@@ -8,6 +8,7 @@ import org.edx.mobile.base.MainApplication;
import org.edx.mobile.core.IEdxEnvironment;
import org.edx.mobile.logger.Logger;
import org.edx.mobile.util.Config;
+import org.edx.mobile.util.NetworkUtil;
import org.json.JSONObject;
import io.branch.referral.Branch;
@@ -61,10 +62,13 @@ public class SplashActivity extends Activity {
// params are the deep linked params associated with the link that the user
// clicked -> was re-directed to this app params will be empty if no data found
} else {
+ // Ignore the logging of errors occurred due to lack of network connectivity
+ if (NetworkUtil.isConnected(getApplicationContext())) {
logger.error(new Exception("Branch not configured properly, error:\n"
+ error.getMessage()), true);
}
}
+ }
}, this.getIntent().getData(), this);
finish();
