Compare commits

...

3 Commits

Author SHA1 Message Date
fysx c0fd9a6e1b beta2 2014-02-23 15:21:29 +01:00
fysx 539ca8d4f2 fixed opening of .love files when URL is entered in Chrome 2014-02-23 14:51:33 +01:00
fysx fab725ad8b using identity 'unnamed' if none is specified in conf.lua(fixes issue #46) 2014-02-20 22:31:59 +01:00
4 changed files with 74 additions and 53 deletions
+55 -49
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest package="org.love2d.android" <manifest package="org.love2d.android"
android:versionCode="10" android:versionCode="10"
android:versionName="0.9.0-beta1" android:versionName="0.9.0-beta2"
android:installLocation="auto" xmlns:android="http://schemas.android.com/apk/res/android"> android:installLocation="auto" xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
@@ -9,55 +9,61 @@
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application <application
android:allowBackup="true" android:allowBackup="true"
android:icon="@drawable/ic_launcher" android:icon="@drawable/ic_launcher"
android:label="LÖVE for Android"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
<service android:name=".DownloadService" />
<activity
android:name="GameActivity"
android:configChanges="orientation|screenSize"
android:label="LÖVE for Android" android:label="LÖVE for Android"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" > android:screenOrientation="landscape" >
<service android:name=".DownloadService" /> <intent-filter>
<activity <action android:name="android.intent.action.MAIN" />
android:name="GameActivity" <category android:name="android.intent.category.LAUNCHER" />
android:configChanges="orientation|screenSize" <category android:name="tv.ouya.intent.category.GAME"/>
android:label="LÖVE for Android" </intent-filter>
android:screenOrientation="landscape" > </activity>
<intent-filter> <activity
<action android:name="android.intent.action.MAIN" /> android:name="GameActivity"
<category android:name="android.intent.category.LAUNCHER" /> android:configChanges="orientation|screenSize"
<category android:name="tv.ouya.intent.category.GAME"/> android:screenOrientation="landscape" >
</intent-filter> <intent-filter>
</activity> <action android:name="android.intent.action.VIEW" />
<activity <category android:name="android.intent.category.DEFAULT" />
android:name="GameActivity" <data android:scheme="file" />
android:configChanges="orientation|screenSize" <data android:scheme="content" />
android:screenOrientation="landscape" > <data android:mimeType="application/x-love-game" />
<intent-filter> </intent-filter>
<action android:name="android.intent.action.VIEW" /> <intent-filter>
<category android:name="android.intent.category.DEFAULT" /> <action android:name="android.intent.action.VIEW" />
<data android:scheme="file" /> <category android:name="android.intent.category.DEFAULT" />
<data android:scheme="content" /> <data android:scheme="file" />
<data android:mimeType="application/x-love-game" /> <data android:mimeType="*/*" />
</intent-filter> <data android:pathPattern=".*\\.love" />
<intent-filter> <data android:host="*" />
<action android:name="android.intent.action.VIEW" /> </intent-filter>
<category android:name="android.intent.category.DEFAULT" /> </activity>
<data android:scheme="file" /> <activity
<data android:mimeType="*/*" /> android:name="DownloadActivity"
<data android:pathPattern=".*\\.love" /> android:noHistory="true" >
<data android:host="*" /> <intent-filter>
</intent-filter> <action android:name="android.intent.action.VIEW" />
</activity> <category android:name="android.intent.category.DEFAULT" />
<activity <category android:name="android.intent.category.BROWSABLE" />
android:name="DownloadActivity" <data android:scheme="http"
android:noHistory="true" > android:host="*"
<intent-filter> android:pathPrefix="*"
<action android:name="android.intent.action.VIEW" /> android:mimeType="*/*"
<category android:name="android.intent.category.DEFAULT" /> android:pathPattern=".*\\.love" />
<category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="https"
<data android:scheme="http" /> android:host="*"
<data android:scheme="https" /> android:pathPrefix="*"
<data android:host="*" /> android:mimeType="*/*"
<data android:pathPattern=".*\\.love" /> android:pathPattern=".*\\.love" />
</intent-filter> </intent-filter>
</activity> </activity>
</application> </application>
<!-- Android 2.3.3 --> <!-- Android 2.3.3 -->
+5
View File
@@ -32,6 +32,11 @@ tracker](issues).
Changelog: Changelog:
---------- ----------
beta2:
* fixed bug with canvases
* fixed writing of files when no identity in conf.lua was set
* added file association (somewhat experimental)
beta1: beta1:
* fixed nasty crash on startup bug * fixed nasty crash on startup bug
@@ -240,6 +240,9 @@ bool Filesystem::setIdentity(const char *ident, bool appendToPath)
save_path_full += save_path_relative; save_path_full += save_path_relative;
#ifdef LOVE_ANDROID #ifdef LOVE_ANDROID
if (save_identity == "")
save_identity = "unnamed";
std::string internal_storage_path = SDL_AndroidGetInternalStoragePath(); std::string internal_storage_path = SDL_AndroidGetInternalStoragePath();
std::string save_directory = internal_storage_path + "/save"; std::string save_directory = internal_storage_path + "/save";
+11 -4
View File
@@ -22,7 +22,7 @@ public class DownloadService extends IntentService {
@Override @Override
public void onDestroy() { public void onDestroy() {
Log.d("DownloadService", "ending"); Log.d("DownloadService", "destroying");
unregisterReceiver(downloadReceiver); unregisterReceiver(downloadReceiver);
} }
@@ -33,7 +33,7 @@ public class DownloadService extends IntentService {
String url = intent.getStringExtra("url"); String url = intent.getStringExtra("url");
Uri uri = Uri.parse(url); Uri uri = Uri.parse(url);
Log.d("DownloadActivity", "Downloading from url: " + url + "file = " + uri.getLastPathSegment()); Log.d("DownloadService", "Downloading from url: " + url + "file = " + uri.getLastPathSegment());
DownloadManager.Request request = new DownloadManager.Request(Uri.parse(url)); DownloadManager.Request request = new DownloadManager.Request(Uri.parse(url));
request.setDescription("LÖVE Game Download"); request.setDescription("LÖVE Game Download");
@@ -42,8 +42,8 @@ public class DownloadService extends IntentService {
// in order for this if to run, you must use the android 3.2 to compile your app // in order for this if to run, you must use the android 3.2 to compile your app
if (Build.VERSION.SDK_INT >= 11) { if (Build.VERSION.SDK_INT >= 11) {
request.allowScanningByMediaScanner(); DownloadRequestSettings_API11 settings = new DownloadRequestSettings_API11();
request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED); settings.setup (request);
} }
request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, uri.getLastPathSegment()); request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, uri.getLastPathSegment());
// get download service and enqueue file // get download service and enqueue file
@@ -87,3 +87,10 @@ public class DownloadService extends IntentService {
} }
}; };
} }
class DownloadRequestSettings_API11 {
public static void setup (DownloadManager.Request request) {
request.allowScanningByMediaScanner();
request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
}
}