Created
April 12, 2017 08:21
-
-
Save ssx/442f5ab472cfe58439870c9e6b2e99d4 to your computer and use it in GitHub Desktop.
test.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.sendViaBluetooth = function(file, title) { | |
var intent = Ti.Android.createIntent({ | |
action: Ti.Android.ACTION_SEND | |
}); | |
// File contains a tifileobject.nativePath | |
intent.putExtraUri(Ti.Android.EXTRA_STREAM, file); | |
var share = Ti.Android.createIntentChooser(intent, title); | |
Ti.Android.currentActivity.startActivityForResult(share, function(e) { | |
// This never fires | |
Ti.API.info("Finished intent:"); | |
Ti.API.info(JSON.stringify(e, 0, 2)); | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment