OpenLieroX: fixed opening app from Chrome notification
This commit is contained in:
@@ -67,7 +67,7 @@ SwVideoMode=y
|
||||
SdlVideoResize=y
|
||||
|
||||
# Application resizing will keep 4:3 aspect ratio, with black bars at sides (y)/(n)
|
||||
SdlVideoResizeKeepAspect=y
|
||||
SdlVideoResizeKeepAspect=n
|
||||
|
||||
# Do not allow device to sleep when the application is in foreground, set this for video players or apps which use accelerometer
|
||||
InhibitSuspend=y
|
||||
|
||||
@@ -7,10 +7,10 @@ AppName="OpenLieroX"
|
||||
AppFullName=openlierox.net
|
||||
|
||||
# Application version code (integer)
|
||||
AppVersionCode=10580525
|
||||
AppVersionCode=10580526
|
||||
|
||||
# Application user-visible version name (string)
|
||||
AppVersionName="0.58rc5a25"
|
||||
AppVersionName="0.58rc5a26"
|
||||
|
||||
# Specify path to download application data in zip archive in the form 'Description|URL|MirrorURL^Description2|URL2|MirrorURL2^...'
|
||||
# If you'll start Description with '!' symbol it will be enabled by default, other downloads should be selected by user from startup config menu
|
||||
@@ -269,7 +269,7 @@ MultiABI='armeabi-v7a arm64-v8a x86 x86_64' # arm64-v8a x86 x86_64
|
||||
# Optional shared libraries to compile - removing some of them will save space
|
||||
# MP3 support by libMAD is encumbered by patents and libMAD is GPL-ed
|
||||
# Available libraries: mad (GPL-ed!) sdl_mixer sdl_image sdl_ttf sdl_net sdl_blitpool sdl_gfx sdl_sound intl xml2 lua jpeg png ogg flac tremor vorbis freetype xerces curl theora fluidsynth lzma lzo2 mikmod openal timidity zzip bzip2 yaml-cpp python boost_date_time boost_filesystem boost_iostreams boost_program_options boost_regex boost_signals boost_system boost_thread glu avcodec avdevice avfilter avformat avresample avutil swscale swresample bzip2
|
||||
CompiledLibraries="sdl_image sdl_mixer xml2 curl gd jpeg vorbis ogg lzma mad"
|
||||
CompiledLibraries="sdl_image sdl_mixer xml2 curl ssl crypto gd jpeg vorbis ogg lzma mad"
|
||||
|
||||
# Application uses custom build script AndroidBuild.sh instead of Android.mk (y) or (n)
|
||||
CustomBuildScript=n
|
||||
|
||||
@@ -11,9 +11,9 @@ index 9e6150a..09ade66 100644
|
||||
if( Globals.TouchscreenKeyboardTheme == 4 )
|
||||
nativeSetupScreenKeyboardButtons(loadRaw(p, R.raw.retro));
|
||||
if( Globals.TouchscreenKeyboardTheme == 5 )
|
||||
--- /dev/null 2018-04-10 21:06:44.327303421 +0300
|
||||
+++ b/project/java/RunFromOtherApp.java 2018-05-17 22:21:46.816651827 +0300
|
||||
@@ -0,0 +1,108 @@
|
||||
--- /dev/null 2018-12-13 18:37:19.876000065 +0200
|
||||
+++ Connect.java 2018-12-17 21:16:01.027001714 +0200
|
||||
@@ -0,0 +1,115 @@
|
||||
+/*
|
||||
+Simple DirectMedia Layer
|
||||
+Java source code (C) 2009-2014 Sergii Pylypenko
|
||||
@@ -105,7 +105,7 @@ index 9e6150a..09ade66 100644
|
||||
+import android.content.ComponentName;
|
||||
+
|
||||
+
|
||||
+public class RunFromOtherApp extends Activity
|
||||
+public class Connect extends Activity
|
||||
+{
|
||||
+ @Override
|
||||
+ protected void onCreate(Bundle savedInstanceState)
|
||||
@@ -114,9 +114,16 @@ index 9e6150a..09ade66 100644
|
||||
+
|
||||
+ Intent main = new Intent(this, MainActivity.class);
|
||||
+ main.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||
+ if( getIntent().getScheme() != null && getIntent().getScheme().equals("openlierox") )
|
||||
+ if( getIntent().getScheme() != null && getIntent().getScheme().equals("openlierox") && getIntent().getData() != null && getIntent().getData().getHost().equals("connect") )
|
||||
+ {
|
||||
+ main.putExtra(RestartMainActivity.SDL_RESTART_PARAMS, getIntent().getData().getHost() + ":" + getIntent().getData().getPort());
|
||||
+ main.putExtra(RestartMainActivity.SDL_RESTART_PARAMS, getIntent().getData().getPath().replace("/","").replace("!",":"));
|
||||
+ }
|
||||
+ if( getIntent().getScheme() != null && getIntent().getScheme().equals("https") && getIntent().getData() != null && getIntent().getData().getPath().contains("connect") )
|
||||
+ {
|
||||
+ if( getIntent().getData().getQueryParameter("a") != null )
|
||||
+ main.putExtra(RestartMainActivity.SDL_RESTART_PARAMS, getIntent().getData().getQueryParameter("a").replace("!",":"));
|
||||
+ else
|
||||
+ main.putExtra(RestartMainActivity.SDL_RESTART_PARAMS, getIntent().getData().getPath().replace("/connect/","").replace("!",":"));
|
||||
+ }
|
||||
+ startActivity(main);
|
||||
+ finish();
|
||||
|
||||
@@ -1,21 +1,26 @@
|
||||
--- a/project/AndroidManifest.xml 2018-05-17 22:12:08.421817275 +0300
|
||||
+++ a/project/AndroidManifest.xml 2018-05-17 22:14:05.186301554 +0300
|
||||
@@ -27,6 +27,19 @@
|
||||
@@ -27,6 +27,24 @@
|
||||
<category android:name="tv.ouya.intent.category.GAME" /> <!-- For that one user who still got an OUYA in his living room and won't throw it away just because someone else decides that it's dead -->
|
||||
</intent-filter>
|
||||
</activity>
|
||||
+ <activity android:name=".RunFromOtherApp"
|
||||
+ <activity android:name=".Connect"
|
||||
+ android:label="@string/app_name"
|
||||
+ android:launchMode="standard"
|
||||
+ android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|screenLayout|fontScale|uiMode|orientation|screenSize|smallestScreenSize|layoutDirection"
|
||||
+ android:windowSoftInputMode="stateUnspecified">
|
||||
+ <intent-filter>
|
||||
+ <action android:name="android.intent.action.RUN" />
|
||||
+ <action android:name="android.intent.action.MAIN" />
|
||||
+ <action android:name="android.intent.action.VIEW" />
|
||||
+ <category android:name="android.intent.category.DEFAULT"/>
|
||||
+ <category android:name="android.intent.category.BROWSABLE"/>
|
||||
+ <data android:scheme="openlierox"/>
|
||||
+ </intent-filter>
|
||||
+ <intent-filter>
|
||||
+ <action android:name="android.intent.action.VIEW" />
|
||||
+ <category android:name="android.intent.category.DEFAULT"/>
|
||||
+ <category android:name="android.intent.category.BROWSABLE"/>
|
||||
+ <data android:scheme="https" android:host="liero.1337.cx" android:pathPrefix="/connect/"/>
|
||||
+ </intent-filter>
|
||||
+ </activity>
|
||||
<meta-data android:name="com.sec.android.support.multiwindow" android:value="true" /> <!-- Samsung's multiwindow -->
|
||||
<activity android:name=".RestartMainActivity"
|
||||
|
||||
Reference in New Issue
Block a user