ACTION_SEND with Uri in data
Posted: Sat May 05, 2012 8:20 am
Hello,
in my application users can specify an FTP URI to upload a data file. Currently I handle the upload internally and that works well. But since only a tiny percentage of users need this feature, I plan to remove the ftp code, and call an external intent. I would like my users to be able to choose between potentially more than one app able to handle ftp uploads. Apps would need to react to ACTION_SEND with an ftp URI as data:
Currently AndFTP does not react to such an intent. Would it make sense for you to implement such a generic way of specifying an ftp upload intent?
Best regards,
Michael
in my application users can specify an FTP URI to upload a data file. Currently I handle the upload internally and that works well. But since only a tiny percentage of users need this feature, I plan to remove the ftp code, and call an external intent. I would like my users to be able to choose between potentially more than one app able to handle ftp uploads. Apps would need to react to ACTION_SEND with an ftp URI as data:
Code: Select all
intent = new Intent(android.content.Intent.ACTION_SEND);
intent.setDataAndType(android.net.Uri.parse("ftp://user:pass@192.168.42.90"),"text/qif");
intent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(file));
context.startActivity(intent);
Best regards,
Michael