14

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?

Michael Myers
  • 188,989
  • 46
  • 291
  • 292
poeschlorn
  • 12,230
  • 17
  • 54
  • 65
  • 1
    This is very strange. I just tried sending a .gpx file to my HTC Desire and it worked fine. It does have a customised version of Android 2.1, but I wouldn't think that would affect these kinds of issues. Perhaps somebody with a Nexus One can have a go and report back – HXCaine May 31 '10 at 12:16
  • 1
    mh, my nexus has been updated to 2.2...may this be the source of error? – poeschlorn May 31 '10 at 12:32
  • This question is not for developers, it should be moved to http://superuser.com – rds Mar 30 '11 at 15:29
  • 1
    @rds: per the comment on [this answer](http://stackoverflow.com/questions/2942454/android-issue-with-acceptable-file-types-via-bluetooth/3085943#3085943), it is actually for developers. – Michael Myers Mar 31 '11 at 14:59

2 Answers2

3

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>
user651068
  • 174
  • 1
  • 4
  • 12
0

You could try to add intent filters for the file extensions you expect to receive, see Android intent filter for a particular file extension?

Community
  • 1
  • 1
Mithfindel
  • 4,553
  • 1
  • 23
  • 32