mirror of
https://github.com/love2d/love-android.git
synced 2026-08-16 08:11:44 +02:00
Now, we have a filetype association!!!! :)
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package org.love2d.android;
|
||||
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
|
||||
public class GameLauncher extends GameActivity {
|
||||
|
||||
private static String gamePath;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle bundle) {
|
||||
Uri game = this.getIntent().getData();
|
||||
if (game != null) {
|
||||
gamePath = game.getPath();
|
||||
Log.d("GameLauncher", "Selected the file: " + gamePath);
|
||||
}
|
||||
super.onCreate(bundle);
|
||||
}
|
||||
|
||||
public static String getGamePath() {
|
||||
return gamePath;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user