question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

osu! is registered to open all file types on Android

See original GitHub issue

Describe the bug:

After installing the latest update, when opening most file types, osu! is presenting itself as an application that can open that file type. Notable examples are PDFs, APKs, etc.

Looking at osu!'s androidmanifest.xml, osu! is registered to open all mime types matching application/*

<intent-filter>
    <action android:name="android.intent.action.VIEW"/>
    <action android:name="android.intent.action.SEND"/>
    <category android:name="android.intent.category.DEFAULT"/>
    <data android:mimeType="application/*"/>
    <data android:pathPattern=".*.osz"/>
    <data android:pathPattern=".*.osk"/>
</intent-filter>

This suggests to use .*\\.osz and to specify android:scheme and android:host

I believe that if you don’t use backslashes, a file named fileosz would get matched in addition to file.osz. Some comments suggest using four backslashes, so test those two filenames with the modified androidmanifest.xml

osu!lazer version: 2020.1225.0

Device information:

Realme 6, Android 10 LG G Pad 8.3, Android 7.1.2

Logs:

Not needed as the issue is outside of osu!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
Game4allcommented, Dec 28, 2020

Note that the game only handles content uris for the moment so that should only make two intent filters to commit. Also I think that the send intent should be moved to its own intent filter as the only thing used to match for those are the accepted mime types.

1reaction
Susko3commented, Dec 28, 2020

Finally figured it out, string arrays are the devil. Using more than one android:pathPattern or android:scheme will break it.

So the new IntentFilters should be:

[IntentFilter(
        new[] { Intent.ActionDefault, Intent.ActionSend },
        Categories = new[] { Intent.CategoryDefault },
        DataScheme = "content",
        DataHost = "*",
        DataPathPattern = ".*\\\\.osz",
        DataMimeType = "*/*"
        )]

Four in total for two filetypes (osz and osk) and two schemes (file and content)

I feel like using mime type */* is best, in case a file manager app misidentifies the file.

I’ll make a PR in a bit. First time using this PR stuff on GitHub, so it’ll take me a bit of time.

Read more comments on GitHub >

github_iconTop Results From Across the Web

OSU File Extension: What Is It & How To Open It? - Solvusoft
The OSU File Extension has zero different file types (mostly seen as the ... Open your files in Android 6.0.1 with FileViewPro File...
Read more >
[Archived] .osk, .osz, etc. filetypes default to opening ... - Osu!
I've tried changing the default app to open osu! filetypes with to the regular client, but my only option is the tournament client...
Read more >
Save yourself some disk space and delete all Osu video files
Save yourself some disk space and delete all Osu video files ... You don't have to use CMD, just open your songs folder...
Read more >
I want my android app to be able to open all file extensions
What's the best way to make my android app be able to handle all type of files and all file extensions? For example...
Read more >
How to Download Osu in your Android! (IN-DEPTH Tutorial)
So 1 year ago i made a video on how to download osu in your android and also on how to download beatmaps...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found