Transfer the files via Bluetooth

86 views
Skip to first unread message

rajesh sam

unread,
Jul 12, 2018, 4:20:03 AM7/12/18
to Blockly
Hi guys,
I am making an application in that i have created a .hex file and made my Bluetooth connection with my microbit and now i am having a problem to transfer the .hex file to the microbit via bluetooth. 
I tried in this way but i cant able to find the solution. Can you help me in fixing in this problem or give me an idea to solve this????


Thanks in advance!!!!

 
public void sendfile(String filename) {
// TODO Auto-generated method stub
File file = new File(filename);
Intent intent = new Intent();
intent.setAction(Intent.ACTION_SEND);
intent.setType("image/*");
intent.setPackage("com.android.bluetooth");
Uri outputFileUri = FileProvider.getUriForFile(this, BuildConfig.APPLICATION_ID, file);
intent.putExtra(Intent.EXTRA_STREAM,outputFileUri);
startActivity(intent);
} 
Message has been deleted

Timo Herngreen

unread,
Aug 14, 2018, 5:17:19 AM8/14/18
to Blockly
Blockly can't send it, bet there are 2 options:
Use USB by copying the file OR using the microbit app in the Microsoft store: https://www.microsoft.com/store/productId/9PJC7SV48LCX


Use the mobile Android app by Samsung (or the IOS port)
IOS: https://itunes.apple.com/nl/app/micro-bit/id1092687276?mt=8

Op donderdag 12 juli 2018 10:20:03 UTC+2 schreef rajesh sam:
Reply all
Reply to author
Forward
0 new messages