Yes, I know that stand-alone games are of low-priority right now, but I was curious and started to play around a bit. In LoveLauncher.java, I saw that when you click on a .love file in the list, if calls
Code: Select all
Intent i = new Intent(LoveLauncher.this, LoveNative.class);
i.setData(Uri.parse("file://" + (String) (parent.getAdapter().getItem(position))));
startActivity(i);
which seems to start up the game. So I thought, what the hell, I should simply be able to add something like this to public void onCreate(...), and it should start up my game straight away. So I made it like this:
Code: Select all
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.launcher);
Intent i = new Intent(LoveLauncher.this, LoveNative.class);
i.setData(Uri.parse("android.resource://net.schattenkind.nativelove/" + R.raw.game));
startActivity(i);
}
and I place my game, named game.love, inside net.schattenkind.nativelove/res/raw/, and tried it. It started LÖVE straight away, but it showed the no-game screen instead of my game. I think I'm referring to the file correctly. At least this is how I've learned to refer to local files inside the app.
Do any of you know what's wrong? I know love-native-android isn't quite ready yet, but it is getting there, and I'd love to play around a bit