当前位置: 首页>>代码示例>>Java>>正文


Java ConnectionResult类代码示例

本文整理汇总了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();
    }
}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:17,代码来源:DroneApi.java

示例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()));
}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:11,代码来源:DroidPlannerApp.java

示例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()));
    }
}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:9,代码来源:DroneApi.java

示例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);
        }
    });
}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:13,代码来源:Drone.java

示例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()));
}
 
开发者ID:sommishra,项目名称:DroidPlanner-Tower,代码行数:11,代码来源:DroidPlannerApp.java

示例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();
    }
}
 
开发者ID:DroidPlanner,项目名称:tower-wear,代码行数:10,代码来源:DroneService.java

示例7: onConnectionFailed

import com.o3dr.services.android.lib.drone.connection.ConnectionResult; //导入依赖的package包/类
@Override
public void onConnectionFailed(String error) {
    notifyConnectionFailed(new ConnectionResult(0, error));
}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:5,代码来源:DroneApi.java

示例8: onConnectionFailed

import com.o3dr.services.android.lib.drone.connection.ConnectionResult; //导入依赖的package包/类
@Override
public void onConnectionFailed(ConnectionResult result) throws RemoteException {}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:3,代码来源:DroneObserver.java

示例9: onConnectionFailed

import com.o3dr.services.android.lib.drone.connection.ConnectionResult; //导入依赖的package包/类
@Override
public void onConnectionFailed(ConnectionResult connectionResult) throws RemoteException {
    drone.notifyDroneConnectionFailed(connectionResult);
}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:5,代码来源:DroneApiListener.java

示例10: onDroneConnectionFailed

import com.o3dr.services.android.lib.drone.connection.ConnectionResult; //导入依赖的package包/类
@Override
public void onDroneConnectionFailed(ConnectionResult result) {
    alertUser("Connection Failed:" + result.getErrorMessage());
}
 
开发者ID:3drobotics,项目名称:DroneKit-Android-Starter,代码行数:5,代码来源:MainActivity.java

示例11: onDroneConnectionFailed

import com.o3dr.services.android.lib.drone.connection.ConnectionResult; //导入依赖的package包/类
@Override
public void onDroneConnectionFailed(ConnectionResult result) {

}
 
开发者ID:Project-Helin,项目名称:drone-onboard-app,代码行数:5,代码来源:DroneConnectionService.java

示例12: onDroneConnectionFailed

import com.o3dr.services.android.lib.drone.connection.ConnectionResult; //导入依赖的package包/类
@Override
public void onDroneConnectionFailed(ConnectionResult connectionResult) {

}
 
开发者ID:DroidPlanner,项目名称:tower-pebble,代码行数:5,代码来源:PebbleCommunicatorService.java

示例13: onDroneConnectionFailed

import com.o3dr.services.android.lib.drone.connection.ConnectionResult; //导入依赖的package包/类
void onDroneConnectionFailed(ConnectionResult result); 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:2,代码来源:DroneListener.java


注:本文中的com.o3dr.services.android.lib.drone.connection.ConnectionResult类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。