use of com.genonbeta.TrebleShot.dialog.ConnectionChooserDialog in project TrebleShot by genonbeta.
the class TransactionActivity method changeConnection.
private void changeConnection() {
new ConnectionChooserDialog(this, mDatabase, mDevice, new ConnectionChooserDialog.OnDeviceSelectedListener() {
@Override
public void onDeviceSelected(NetworkDevice.Connection connection, ArrayList<NetworkDevice.Connection> connectionList) {
mGroup.connectionAdapter = connection.adapterName;
mDatabase.publish(mGroup);
createSnackbar(R.string.mesg_connectionUpdated, getString(TextUtils.getAdapterName(connection))).show();
}
}, false).show();
}
use of com.genonbeta.TrebleShot.dialog.ConnectionChooserDialog in project TrebleShot by genonbeta.
the class ShareActivity method showChooserDialog.
protected void showChooserDialog(final NetworkDevice device) {
device.isRestricted = false;
mDatabase.publish(device);
new ConnectionChooserDialog(ShareActivity.this, mDatabase, device, new ConnectionChooserDialog.OnDeviceSelectedListener() {
@Override
public void onDeviceSelected(final NetworkDevice.Connection connection, ArrayList<NetworkDevice.Connection> availableInterfaces) {
doCommunicate(device, connection);
}
}, true).show();
}
Aggregations