Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: Issue with acceptable file types via bluetooth

I've got a problem with pushing files to my Nexus One.

It seems to me that there is only a small selection of file types that are accepted by my phone (such as jpg, gif and so on).

I recently tried to push other files to my phone (in my case gpx) and my phone rejected it automatically.

Is there a way to bypass or extend this filter in my program?
Is there also a way to catch those files by a service?

like image 994
poeschlorn Avatar asked May 31 '10 09:05

poeschlorn


People also ask

Why can't I send files via Bluetooth?

Check whether your computer and the Bluetooth device are too far apart. A greater distance between the two devices results in a weaker Bluetooth signal and slower file transmission. 3. If the file is large in size (for example, larger than 100 MB), it is recommended that you use Wi-Fi, USB, or another transfer method.

How do I access Bluetooth files on Android?

You can access it by using the Files by Google app and look for the Bluetooth folder under your device name (e.g., Pixel 4XL). You can also find files received via Bluetooth in your phone's Bluetooth settings > Connection preferences > Files received via Bluetooth.

Can Bluetooth be used to transfer files?

But one of the most overlooked uses of Bluetooth is file sharing. If you happen to have a desktop or laptop with a Bluetooth device, you can easily share files between your Android smartphone or tablet and that desktop.

Why does Android ble require location permissions?

Your app needs this permission because a Bluetooth scan can be used to gather information about the location of the user. This information may come from the user's own devices, as well as Bluetooth beacons in use at locations such as shops and transit facilities.”


1 Answers

I've got this error before. It would say "File Not Accepted: The target device claims it will not accept a file of the type you are trying to send" or "Error, device does not accept files of this type" This is because of not having permission to accept this file. You have to add permission in the Manifest file.

<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />

Under the activity enter something like this!

<activity name="BluetoothActivity">
<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:mimeType="*/*" />
    <data android:pathPattern="*.*\\.gpx" />
</intent-filter>
</activity>
like image 91
user651068 Avatar answered Oct 15 '22 07:10

user651068