use of android.media.MediaScannerConnection in project android_frameworks_base by AOSPA.
the class ObjectViewer method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mClient = ((CameraBrowserApplication) getApplication()).getMtpClient();
setContentView(R.layout.object_info);
mImportButton = (Button) findViewById(R.id.import_button);
mImportButton.setOnClickListener(this);
mDeleteButton = (Button) findViewById(R.id.delete_button);
mDeleteButton.setOnClickListener(this);
mDeviceName = getIntent().getStringExtra("device");
mStorageID = getIntent().getIntExtra("storage", 0);
mObjectID = getIntent().getIntExtra("object", 0);
mDisconnectedReceiver = new DeviceDisconnectedReceiver(this, mDeviceName);
mScannerClient = new ScannerClient(this);
mScannerConnection = new MediaScannerConnection(this, mScannerClient);
}
use of android.media.MediaScannerConnection in project Shuttle by timusus.
the class CustomMediaScanner method scanFiles.
public static void scanFiles(List<String> paths, @Nullable ScanCompletionListener listener) {
CustomMediaScanner client = new CustomMediaScanner(paths, listener);
MediaScannerConnection connection = new MediaScannerConnection(ShuttleApplication.getInstance(), client);
client.connection = connection;
connection.connect();
}
use of android.media.MediaScannerConnection in project android_frameworks_base by ParanoidAndroid.
the class ObjectViewer method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mClient = ((CameraBrowserApplication) getApplication()).getMtpClient();
setContentView(R.layout.object_info);
mImportButton = (Button) findViewById(R.id.import_button);
mImportButton.setOnClickListener(this);
mDeleteButton = (Button) findViewById(R.id.delete_button);
mDeleteButton.setOnClickListener(this);
mDeviceName = getIntent().getStringExtra("device");
mStorageID = getIntent().getIntExtra("storage", 0);
mObjectID = getIntent().getIntExtra("object", 0);
mDisconnectedReceiver = new DeviceDisconnectedReceiver(this, mDeviceName);
mScannerClient = new ScannerClient(this);
mScannerConnection = new MediaScannerConnection(this, mScannerClient);
}
use of android.media.MediaScannerConnection in project platform_frameworks_base by android.
the class ObjectViewer method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mClient = ((CameraBrowserApplication) getApplication()).getMtpClient();
setContentView(R.layout.object_info);
mImportButton = (Button) findViewById(R.id.import_button);
mImportButton.setOnClickListener(this);
mDeleteButton = (Button) findViewById(R.id.delete_button);
mDeleteButton.setOnClickListener(this);
mDeviceName = getIntent().getStringExtra("device");
mStorageID = getIntent().getIntExtra("storage", 0);
mObjectID = getIntent().getIntExtra("object", 0);
mDisconnectedReceiver = new DeviceDisconnectedReceiver(this, mDeviceName);
mScannerClient = new ScannerClient(this);
mScannerConnection = new MediaScannerConnection(this, mScannerClient);
}
use of android.media.MediaScannerConnection in project android_frameworks_base by crdroidandroid.
the class ObjectViewer method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mClient = ((CameraBrowserApplication) getApplication()).getMtpClient();
setContentView(R.layout.object_info);
mImportButton = (Button) findViewById(R.id.import_button);
mImportButton.setOnClickListener(this);
mDeleteButton = (Button) findViewById(R.id.delete_button);
mDeleteButton.setOnClickListener(this);
mDeviceName = getIntent().getStringExtra("device");
mStorageID = getIntent().getIntExtra("storage", 0);
mObjectID = getIntent().getIntExtra("object", 0);
mDisconnectedReceiver = new DeviceDisconnectedReceiver(this, mDeviceName);
mScannerClient = new ScannerClient(this);
mScannerConnection = new MediaScannerConnection(this, mScannerClient);
}
Aggregations