Skip to content

Commit

Permalink
[DEBUG] Added logs to the preInstall java function
Browse files Browse the repository at this point in the history
Signed-off-by: Clovis Durand <[email protected]>
  • Loading branch information
Clovel committed Jun 14, 2021
1 parent 7f9470a commit 819489d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions android/src/main/java/com/microsoft/capacitor/CodePush.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import android.content.pm.PackageManager;
import android.os.AsyncTask;
import android.util.Base64;
import android.util.Log;
import android.webkit.WebView;

import com.getcapacitor.JSObject;
Expand Down Expand Up @@ -419,14 +420,19 @@ public void preInstall(PluginCall call) {
try {
// TODO: fix client side
final String startLocation = call.getString("startLocation");
Log.v("CodePush.Clovel", "Trying to get the package's start page at " + startLocation);
File startPage = this.getStartPageForPackage(startLocation);
if (startPage != null) {
/* start page exists */
call.resolve();
} else {
Log.e("CodePush.Clovel", "Failed to get the package's start page at " + startLocation);
call.reject("Could not get the package start page");
}
} catch (Exception e) {
Log.e("CodePush.Clovel", "Failed to get the package's start page or it's location.");
Log.e("CodePush.Clovel", "Error is " + e.getMessage());
e.printStackTrace();
call.reject("Could not get the package start page");
}
}
Expand Down

0 comments on commit 819489d

Please sign in to comment.