Send a file through bluetooth using Tasker or intent?

608 views
Skip to first unread message

jie155...@gmail.com

unread,
Apr 23, 2015, 6:24:25 AM4/23/15
to tas...@googlegroups.com
this is mine ,search from google,but i do not know how to do in tasker-send intent:
Intent intent = new Intent(); intent.setAction(Intent.ACTION_SEND); intent.setType("image/*"); intent.setClassName("com.android.bluetooth", "com.android.bluetooth.opp.BluetoothOppLauncherActivity"); intent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(new File("/sdcard/yanyojun.png"))); startActivity(intent);
 
Pent said FolderSync could do this,but it just through wifi.
 
i want to send a file just by bluetooth,thanks very much!

Gilles P

unread,
Feb 10, 2018, 10:14:21 AM2/10/18
to Tasker
Sorry for upping that old thread, but I've the same question.
I haven't be able to make it work, as well with Tasker built Send Intent action than with IntentTask

Gilles P

unread,
Feb 10, 2018, 10:26:33 AM2/10/18
to Tasker

Just found a way to have it work using IntentTask

I was putting the file in the "data" field instead of using an extra

Rich D

unread,
Feb 10, 2018, 10:39:43 AM2/10/18
to Tasker Google Groups Post
Could you post the exported description of the working task? 



To post your profile or task here...  Long press on the profile or task name / ( 3 dot menu with 4.0+ ) export / export "DESCRIPTION" to clipboard (not XML)

Any linked tasks will be exported with the profile they are linked to..

To be able to export, The beginner mode needs to be off and the profile needs to be named by you (Not the Tasker listed name.  Tasker will list your profile with the context name if you have not given it one).


Gilles P

unread,
Feb 10, 2018, 11:03:58 AM2/10/18
to Tasker
 
No need tro explain, I know how to export, but unfortunately for IntentTask  based actions export do not contains all the parameters.
Here's what I get:
Send intent [
   
Configuration:Send android.intent.action.SEND to
   
Activity Timeout (Seconds):30
]

So I've no other option that giving this screenshot


Rich D

unread,
Feb 10, 2018, 11:33:40 AM2/10/18
to Tasker Google Groups Post

 
No need tro explain, I know how to export, but unfortunately for IntentTask  based actions export do not contains all the parameters.


Ahh, sorry missed that you were using intent task. Thanks for the screen shot.

Just a FYI.   You could most likely do this in  native Tasker by using the java function action. 


Gilles P

unread,
Feb 10, 2018, 11:50:40 AM2/10/18
to Tasker

Just a FYI.   You could most likely do this in  native Tasker by using the java function action. 



Could be useful for actions not supported by intentTask, but meanwhile, as long as I've a working solution and which is requiring only one step in my Tasker Task action I'll stick with that.

Gilles P

unread,
Feb 10, 2018, 12:07:52 PM2/10/18
to Tasker
I've found how to to this using Tasker built-in "Send Intent" action too. 
No plugin needed.

A17: Send Intent [
   
Action:android.intent.action.SEND
   
Cat:None
   
Mime Type:image/*
    Data:
    Extra:android.intent.extra.STREAM: (Uri) file:///%prefix%subdir/capture.png
    Package:com.android.bluetooth
   
Class:com.android.bluetooth.opp.BluetoothOppLauncherActivity
    Target:Activity
]


Note the "extra" field contents have to be specified exactly like this,, the "file:..." part being replaced with the full path of the file to send

Rich D

unread,
Feb 11, 2018, 11:22:43 AM2/11/18
to Tasker Google Groups Post
Nice.. thanks for the post. 
Reply all
Reply to author
Forward
0 new messages