mirror of
https://github.com/love2d/love-android.git
synced 2026-08-18 03:34:18 +02:00
Move the java code.
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package org.love2d.android;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
|
||||
public class DownloadActivity extends Activity {
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
Uri uri = this.getIntent().getData();
|
||||
|
||||
if (uri.getScheme().equals("http")) {
|
||||
String url = uri.toString();
|
||||
Intent intent = new Intent(this, DownloadService.class);
|
||||
intent.putExtra("url", url);
|
||||
startService(intent);
|
||||
};
|
||||
|
||||
finish();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user