为什么使用蓝牙OBEX对象推送配置文件(OPP)发送文件是特定于设备的

时间:2013-04-02 19:37:51

标签: android

为什么此代码是特定于设备的?

ContentValues values = new ContentValues();
values.put(BluetoothShare.URI, Uri.fromFile(new File(uri.getPath())).toString());

//values.put(BluetoothShare.URI, uri.toString());
values.put(BluetoothShare.MIMETYPE, "image/jpeg");
values.put(BluetoothShare.DESTINATION,device.getAddress());
values.put(BluetoothShare.DIRECTION,BluetoothShare.DIRECTION_OUTBOUND);

Long ts = System.currentTimeMillis();
values.put(BluetoothShare.TIMESTAMP, ts);
final Uri contentUri =  getApplicationContext().getContentResolver().
                               insert(BluetoothShare.CONTENT_URI, values);

0 个答案:

没有答案