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);
}