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


Java DroidPlannerApp类代码示例

本文整理汇总了Java中com.playuav.android.DroidPlannerApp的典型用法代码示例。如果您正苦于以下问题:Java DroidPlannerApp类的具体用法?Java DroidPlannerApp怎么用?Java DroidPlannerApp使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


DroidPlannerApp类属于com.playuav.android包,在下文中一共展示了DroidPlannerApp类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initGATracker

import com.playuav.android.DroidPlannerApp; //导入依赖的package包/类
public static void initGATracker(DroidPlannerApp app) {
	if (sAppTracker == null) {
		final Context context = app.getApplicationContext();

		final GoogleAnalytics analytics = GoogleAnalytics.getInstance(context);

		// Call is needed for now to allow dispatching of auto activity
		// reports
		// (http://stackoverflow.com/a/23256722/1088814)
		analytics.enableAutoActivityReports(app);

		analytics.setAppOptOut(!new DroidPlannerPrefs(context).isUsageStatisticsEnabled());

		// If we're in debug mode, set log level to verbose.
		if (BuildConfig.DEBUG) {
			analytics.getLogger().setLogLevel(Logger.LogLevel.VERBOSE);
		}

		sAppTracker = analytics.newTracker(R.xml.google_analytics_tracker);
	}
}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:22,代码来源:GAUtils.java

示例2: initGATracker

import com.playuav.android.DroidPlannerApp; //导入依赖的package包/类
public static void initGATracker(DroidPlannerApp app) {
    if (sAppTracker == null) {
        final Context context = app.getApplicationContext();

        final GoogleAnalytics analytics = GoogleAnalytics.getInstance(context);

        // Call is needed for now to allow dispatching of auto activity reports
        // (http://stackoverflow.com/a/23256722/1088814)
        analytics.enableAutoActivityReports(app);

        analytics.setAppOptOut(!new DroidPlannerPrefs(context).isUsageStatisticsEnabled());

        // If we're in debug mode, set log level to verbose.
        if (BuildConfig.DEBUG) {
            analytics.getLogger().setLogLevel(Logger.LogLevel.VERBOSE);
        }

        sAppTracker = analytics.newTracker(R.xml.google_analytics_tracker);
    }
}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:21,代码来源:GAUtils.java

示例3: onItemClick

import com.playuav.android.DroidPlannerApp; //导入依赖的package包/类
@Override
public void onItemClick(AdapterView<?> parent, View view, int position,	long id) {
	// Cancel discovery because it's costly, and we're about to connect
	mBtAdapter.cancelDiscovery();

	// Retrieve the selected bluetooth device
	final BluetoothDevice device = (BluetoothDevice) parent.getItemAtPosition(position);

	// Stores the mac address in the shared preferences,
	// so the bluetooth client can retrieve it on connection.
          final Context context = getApplicationContext();
	DroidPlannerPrefs mAppPrefs = new DroidPlannerPrefs(context);
	mAppPrefs.setBluetoothDeviceAddress(device.getAddress() + ";" + device.getName());


	// Toggle the drone connection
          DroidPlannerApp.connectToDrone(context);

	// Finish the activity
	finish();
}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:22,代码来源:BluetoothDevicesActivity.java

示例4: StatusBarNotificationProvider

import com.playuav.android.DroidPlannerApp; //导入依赖的package包/类
StatusBarNotificationProvider(Context context, Drone api) {
	mContext = context;
       this.drone = api;
	mAppPrefs = new DroidPlannerPrefs(context);

	mNotificationIntent = PendingIntent.getActivity(mContext, 0, new Intent(mContext,
			FlightActivity.class), 0);

	mToggleConnectionIntent = PendingIntent
               .getBroadcast(mContext, 0, new Intent(DroidPlannerApp.ACTION_TOGGLE_DRONE_CONNECTION), 0);

       LocalBroadcastManager.getInstance(context).registerReceiver(eventReceiver, eventFilter);
}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:14,代码来源:StatusBarNotificationProvider.java

示例5: onReceive

import com.playuav.android.DroidPlannerApp; //导入依赖的package包/类
@Override
public void onReceive(Context context, Intent intent) {
    final String action = intent.getAction();
    if(DroidPlannerApp.ACTION_DRONE_EVENT.equals(action)){
        onInfoUpdate();
    }
}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:8,代码来源:ChecklistFragment.java

示例6: onCreate

import com.playuav.android.DroidPlannerApp; //导入依赖的package包/类
@Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);

      final Context context = getApplicationContext();
      dpApp = (DroidPlannerApp) getApplication();
      lbm = LocalBroadcastManager.getInstance(context);

      ActionBar actionBar = getSupportActionBar();
      if (actionBar != null) {
          actionBar.setDisplayHomeAsUpEnabled(true);
          actionBar.setHomeButtonEnabled(true);
      }

      mAppPrefs = new DroidPlannerPrefs(context);

      PreferenceManager.setDefaultValues(this, R.xml.preferences, false);

/*
       * Used to supplant wake lock acquisition (previously in
 * com.playuav.android.service .MAVLinkService) as suggested by the
 * android android.os.PowerManager#newWakeLock documentation.
 */
      if (mAppPrefs.keepScreenOn()) {
          getWindow().addFlags(android.view.WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
      }

      setVolumeControlStream(AudioManager.STREAM_MUSIC);

      screenOrientation.unlock();
      Utils.updateUILanguage(context);
  }
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:33,代码来源:SuperUI.java

示例7: doSysConnect

import com.playuav.android.DroidPlannerApp; //导入依赖的package包/类
private void doSysConnect(CheckListItem checkListItem) {
	boolean activated = checkListItem.isSys_activated();
	boolean connected = drone.isConnected();
	if (activated != connected) {
		if (connected)
			DroidPlannerApp.disconnectFromDrone(context);
		else
			DroidPlannerApp.connectToDrone(context);
	}
}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:11,代码来源:CheckListSysLink.java

示例8: onAttach

import com.playuav.android.DroidPlannerApp; //导入依赖的package包/类
@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    dpApp = (DroidPlannerApp) activity.getApplication();
}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:6,代码来源:SettingsFragment.java

示例9: onAttach

import com.playuav.android.DroidPlannerApp; //导入依赖的package包/类
@Override
public void onAttach(Activity activity){
    super.onAttach(activity);
    dpApp = (DroidPlannerApp) activity.getApplication();
    broadcastManager = LocalBroadcastManager.getInstance(activity.getApplicationContext());
}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:7,代码来源:ApiListenerDialogFragment.java

示例10: onAttach

import com.playuav.android.DroidPlannerApp; //导入依赖的package包/类
@Override
public void onAttach(Activity activity) {
	super.onAttach(activity);
	dpApp = (DroidPlannerApp) activity.getApplication();
	broadcastManager = LocalBroadcastManager.getInstance(activity.getApplicationContext());
}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:7,代码来源:ApiListenerFragment.java


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