This repository was archived by the owner on Feb 11, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
android/src/dev/lonami/klooni Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717*/
1818package dev .lonami .klooni ;
1919
20+ import android .os .Build ;
2021import android .os .Bundle ;
22+ import android .os .StrictMode ;
2123
2224import com .badlogic .gdx .backends .android .AndroidApplication ;
2325import com .badlogic .gdx .backends .android .AndroidApplicationConfiguration ;
2426
27+ import java .lang .reflect .Method ;
28+
2529public class AndroidLauncher extends AndroidApplication {
2630 @ Override
2731 protected void onCreate (Bundle savedInstanceState ) {
2832 super .onCreate (savedInstanceState );
33+
34+ // FIXME: Hack to allow us use the old way to share files
35+ // https://stackoverflow.com/a/42437379/
36+ if (Build .VERSION .SDK_INT >= 24 ) {
37+ try {
38+ Method m = StrictMode .class .getMethod ("disableDeathOnFileUriExposure" );
39+ m .invoke (null );
40+ } catch (Exception e ) {
41+ e .printStackTrace ();
42+ }
43+ }
44+
2945 final AndroidApplicationConfiguration config = new AndroidApplicationConfiguration ();
3046 final AndroidShareChallenge shareChallenge = new AndroidShareChallenge (this );
3147 initialize (new Klooni (shareChallenge ), config );
You can’t perform that action at this time.
0 commit comments