Skip to content

Commit

Permalink
Fix playing levels from the browser on Android
Browse files Browse the repository at this point in the history
  • Loading branch information
rollerozxa committed Jul 7, 2024
1 parent a508334 commit 11126be
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,8 @@ public void onClick(DialogInterface dialog,int id) {
// PRINCIPIA
this.init_webview();

this.handle_intent(this.getIntent());

SDLActivity.open_adapter = new ArrayAdapter<Level>(SDLActivity.mSingleton,
android.R.layout.select_dialog_item);
QuickaddDialog.object_adapter = new ArrayAdapter<String>(this, android.R.layout.simple_dropdown_item_1line);
Expand Down Expand Up @@ -2651,6 +2653,24 @@ public void onStopTrackingTouch(SeekBar seekBar) {

}

private void handle_intent(Intent i)
{
Log.v("Principia", "intent new!");

if (i != null) {
if (i.getScheme() != null && i.getScheme().equals("principia")) {
PrincipiaBackend.setarg(i.getDataString());
}
}
}

@Override
public void onNewIntent(Intent i)
{
super.onNewIntent(i);

handle_intent(i);
}
}

/**
Expand Down

0 comments on commit 11126be

Please sign in to comment.