send coordinates points stocked in CSV via bluetooth using android studio

المشرف العام

Administrator
طاقم الإدارة
i am developping a mobile android application , i want to send csv file wich contains coordinates points via bluetooth to another android device

i figured out how to interconnect the two devices but when i want to send the file it shows me a error .... here is part of the code that aloows me to send the file here is part of the code that aloows me to send the file

protected void onActivityResult(int requestCode, int resultCode, Intent data) { if(resultCode == DISCOVER_DURATION && requestCode == REQUEST_BLU) { Intent intent = new Intent(); intent.setAction(Intent.ACTION_SEND); intent.setType("text/csv"); File f = new File(Environment.getExternalStorageDirectory(), "test.csv"); intent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(f)); PackageManager pm = getPackageManager(); List appsList = pm.queryIntentActivities(intent, 0); when i run the application all works fine but when i want to send the file i shows a error "file not found"



أكثر...
 
أعلى