本文整理汇总了Java中com.o3dr.services.android.lib.drone.connection.ConnectionResult类的典型用法代码示例。如果您正苦于以下问题:Java ConnectionResult类的具体用法?Java ConnectionResult怎么用?Java ConnectionResult使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ConnectionResult类属于com.o3dr.services.android.lib.drone.connection包,在下文中一共展示了ConnectionResult类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: connect
import com.o3dr.services.android.lib.drone.connection.ConnectionResult; //导入依赖的package包/类
@Override
public void connect(ConnectionParameter connParams) throws RemoteException {
if (connParams == null || !connParams.equals(droneMgr.getConnectionParameter()))
droneMgr.setConnectionParameter(connParams);
try {
// Do a quick scan to see if we need any droneshare uploads
if (connParams != null) {
this.droneMgr.connect();
getService().kickStartDroneShareUploader(connParams.getDroneSharePrefs());
}
} catch (ConnectionException e) {
notifyConnectionFailed(new ConnectionResult(0, e.getMessage()));
disconnect();
}
}
示例2: onDroneConnectionFailed
import com.o3dr.services.android.lib.drone.connection.ConnectionResult; //导入依赖的package包/类
@Override
public void onDroneConnectionFailed(ConnectionResult result){
String errorMsg = result.getErrorMessage();
Toast.makeText(getApplicationContext(), "Connection failed: " + errorMsg,
Toast.LENGTH_LONG).show();
lbm.sendBroadcast(new Intent(ACTION_DRONE_CONNECTION_FAILED)
.putExtra(EXTRA_CONNECTION_FAILED_ERROR_CODE, result.getErrorCode())
.putExtra(EXTRA_CONNECTION_FAILED_ERROR_MESSAGE, result.getErrorMessage()));
}
示例3: disconnect
import com.o3dr.services.android.lib.drone.connection.ConnectionResult; //导入依赖的package包/类
@Override
public void disconnect() throws RemoteException {
try {
droneMgr.disconnect();
} catch (ConnectionException e) {
notifyConnectionFailed(new ConnectionResult(0, e.getMessage()));
}
}
示例4: notifyDroneConnectionFailed
import com.o3dr.services.android.lib.drone.connection.ConnectionResult; //导入依赖的package包/类
void notifyDroneConnectionFailed(final ConnectionResult result) {
if (droneListeners.isEmpty())
return;
handler.post(new Runnable() {
@Override
public void run() {
for (DroneListener listener : droneListeners)
listener.onDroneConnectionFailed(result);
}
});
}
示例5: onDroneConnectionFailed
import com.o3dr.services.android.lib.drone.connection.ConnectionResult; //导入依赖的package包/类
@Override
public void onDroneConnectionFailed(ConnectionResult result) {
String errorMsg = result.getErrorMessage();
Toast.makeText(getApplicationContext(), "Connection failed: " + errorMsg,
Toast.LENGTH_LONG).show();
lbm.sendBroadcast(new Intent(ACTION_DRONE_CONNECTION_FAILED)
.putExtra(EXTRA_CONNECTION_FAILED_ERROR_CODE, result.getErrorCode())
.putExtra(EXTRA_CONNECTION_FAILED_ERROR_MESSAGE, result.getErrorMessage()));
}
示例6: onGoogleApiConnectionError
import com.o3dr.services.android.lib.drone.connection.ConnectionResult; //导入依赖的package包/类
@Override
public void onGoogleApiConnectionError(com.google.android.gms.common.ConnectionResult connectionResult) {
if (connectionResult.getErrorCode() == com.google.android.gms.common.ConnectionResult.API_UNAVAILABLE) {
//The android wear app is not installed.
startActivity(new Intent(getApplicationContext(), InstallAndroidWearApp.class)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
stopSelf();
}
}
示例7: onConnectionFailed
import com.o3dr.services.android.lib.drone.connection.ConnectionResult; //导入依赖的package包/类
@Override
public void onConnectionFailed(String error) {
notifyConnectionFailed(new ConnectionResult(0, error));
}
示例8: onConnectionFailed
import com.o3dr.services.android.lib.drone.connection.ConnectionResult; //导入依赖的package包/类
@Override
public void onConnectionFailed(ConnectionResult result) throws RemoteException {}
示例9: onConnectionFailed
import com.o3dr.services.android.lib.drone.connection.ConnectionResult; //导入依赖的package包/类
@Override
public void onConnectionFailed(ConnectionResult connectionResult) throws RemoteException {
drone.notifyDroneConnectionFailed(connectionResult);
}
示例10: onDroneConnectionFailed
import com.o3dr.services.android.lib.drone.connection.ConnectionResult; //导入依赖的package包/类
@Override
public void onDroneConnectionFailed(ConnectionResult result) {
alertUser("Connection Failed:" + result.getErrorMessage());
}
示例11: onDroneConnectionFailed
import com.o3dr.services.android.lib.drone.connection.ConnectionResult; //导入依赖的package包/类
@Override
public void onDroneConnectionFailed(ConnectionResult result) {
}
示例12: onDroneConnectionFailed
import com.o3dr.services.android.lib.drone.connection.ConnectionResult; //导入依赖的package包/类
@Override
public void onDroneConnectionFailed(ConnectionResult connectionResult) {
}
示例13: onDroneConnectionFailed
import com.o3dr.services.android.lib.drone.connection.ConnectionResult; //导入依赖的package包/类
void onDroneConnectionFailed(ConnectionResult result);