You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Android app, "No apps can perform this action" error #44
Hello, I have an issue when trying to pick files. It works in editor and in build on my computer, it also works with unity remote. When I Try to build it and a phone, even If the application have the rights to access the files (I also looked at the android manifest), the message "No apps can perform this action" appears. I tried on Bluestacks, Xiaomi, Huawei but still the same error. I saw some post, saying that it's because I have no application to pick the files, but since I'm using one (UnityNativeFilePicker isn't an app, but it should handle this I think) I don't really understand the problem, I have no compilation errors or anything, also the message appears before any folder/ file get displayed.
Sorry if my English is bad, I hope someone has a solution
@NIKOLAOS77 ConvertExtensionToFileType accepts only a valid extension. You can pass "*/*" directly to PickFile (without passing it to ConvertExtensionToFileType) to achieve the desired effect on Android.
@NIKOLAOS77 ConvertExtensionToFileType accepts only a valid extension. You can pass "*/*" directly to PickFile (without passing it to ConvertExtensionToFileType) to achieve the desired effect on Android.
The code directly from the repository instructions, but it's not working. Same error, "No apps can perform this action". I've tried replacing the string array with a single string and it gets the same issue. I'm not even using ConvertExtensionToFileType.
You can't pass an extension directly to PickFile. You must pass it to ConvertExtensionToFileType. "*/*" isn't an extension but rather a MIME type which is why it can't be passed to ConvertExtensionToFileType.
You can't pass an extension directly to PickFile. You must pass it to ConvertExtensionToFileType. "*/*" isn't an extension but rather a MIME type which is why it can't be passed to ConvertExtensionToFileType.
oh, okay. I was able to get it working without any extensions, but i tried this
"/image" isn't an extension so you shouldn't pass it to ConvertExtensionToFileType 😸 Here's the golden rule: if we are talking about an actual file extension (e.g. png), pass it to ConvertExtensionToFileType. If we're talking about a MIME type (e.g. image/*), don't pass it to ConvertExtensionToFileType (note that passing MIME types like that won't work on iOS since iOS uses UTIs instead of MIME types).
@prakyath-07 FBX doesn't have a MIME type as far as I can see. You could try NativeFilePicker.PickFile(OnModelPicked, "application/octet-stream") on Android and when the user selects a file, verify that its extension is fbx (selection won't be limited to fbx).
Activity
yasirkula commentedon Jul 20, 2023
Hi, can I see your code?
LunXyy commentedon Jul 21, 2023
using System.Collections;
using System.IO;
using UnityEngine;
using UnityEngine.UI;
public class FilePickerSystem : MonoBehaviour
{
}
LunXyy commentedon Jul 21, 2023
I also have this in another script, I know the WWW class is outdated, but it seems like there wasn't any problem
public IEnumerator LoadSound(string name, string _path)
{
WWW request = GetAudioFromFile(_path, name);
yield return request;
AudioClip audioClip = request.GetAudioClip();
audioClip.name = name;
buttons.Last().button.GetComponent().clip = audioClip;
}
yasirkula commentedon Jul 21, 2023
ConvertExtensionToFileType accepts a single extension. You can call it as many times as you wish, one call per extension.
LunXyy commentedon Jul 24, 2023
changed it
string fileType = NativeFilePicker.ConvertExtensionToFileType("mp3");
but still the same problem, still work in editor but not in build
yasirkula commentedon Jul 24, 2023
I wish I knew why, it just should've worked 😞
NIKOLAOS77 commentedon Aug 1, 2023
have the same problem. Using a samsung although i think that doesnt matter.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.IO;
using UnityEngine.UI;
public class filePickerSystem : MonoBehaviour
{
}

i get the following message
yasirkula commentedon Aug 2, 2023
@NIKOLAOS77 ConvertExtensionToFileType accepts only a valid extension. You can pass
"*/*"directly to PickFile (without passing it to ConvertExtensionToFileType) to achieve the desired effect on Android.Nischal-012 commentedon Aug 7, 2023
It seems like you can directly use "audio/*" on PickFile method and being able to select audio files.
Mashimaro7 commentedon Dec 14, 2023
I'm using
The code directly from the repository instructions, but it's not working. Same error, "No apps can perform this action". I've tried replacing the string array with a single string and it gets the same issue. I'm not even using ConvertExtensionToFileType.
yasirkula commentedon Dec 15, 2023
You can't pass an extension directly to PickFile. You must pass it to ConvertExtensionToFileType.
"*/*"isn't an extension but rather a MIME type which is why it can't be passed to ConvertExtensionToFileType.Mashimaro7 commentedon Dec 15, 2023
oh, okay. I was able to get it working without any extensions, but i tried this
And it had the same issue.
yasirkula commentedon Dec 15, 2023
"/image" isn't an extension so you shouldn't pass it to ConvertExtensionToFileType 😸 Here's the golden rule: if we are talking about an actual file extension (e.g. png), pass it to ConvertExtensionToFileType. If we're talking about a MIME type (e.g. image/*), don't pass it to ConvertExtensionToFileType (note that passing MIME types like that won't work on iOS since iOS uses UTIs instead of MIME types).
prakyath-07 commentedon Jan 7, 2024
I'm still getting the same issue. No apps to perform this action.
Device Tested : Google Pixel 6a
yasirkula commentedon Jan 7, 2024
@prakyath-07 Try this:
NativeFilePicker.PickFile(OnModelPicked, NativeFilePicker.ConvertExtensionToFileType("png"));prakyath-07 commentedon Jan 11, 2024
@yasirkula Thanks for the reply. this works, but not able to pick fbx files, Getting same warning "No apps can perform this action"
yasirkula commentedon Jan 11, 2024
@prakyath-07 FBX doesn't have a MIME type as far as I can see. You could try
NativeFilePicker.PickFile(OnModelPicked, "application/octet-stream")on Android and when the user selects a file, verify that its extension is fbx (selection won't be limited to fbx).prakyath-07 commentedon Jan 28, 2024
Thanks :) this works only on Android, any alternative for iOS?
prakyath-07 commentedon Jan 28, 2024
How do I allow user to select video or image (png, jpeg, mp4)?
prakyath-07 commentedon Jan 29, 2024
Any updates?
yasirkula commentedon Jan 29, 2024
@prakyath-07 To be able to pick all files: https://forum.unity.com/threads/native-file-picker-for-android-ios-open-source.912890/page-3#post-8987518 (or you could limit the selection to FBX files on iOS by declaring a custom file type via Window-NativeFilePicker Custom Types on iOS). You can also pass multiple file types to PickFile function since it takes a string array.
prakyath-07 commentedon Jan 29, 2024
still not able to select media file with multiple formats
yasirkula commentedon Jan 29, 2024
NativeFilePicker.PickFile(OnMediaFilePicked, NativeFilePicker.ConvertExtensionToFileType("png"), NativeFilePicker.ConvertExtensionToFileType("jpeg"), NativeFilePicker.ConvertExtensionToFileType("mp4"));