• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java MediaRouteDiscoveryRequest类的典型用法和代码示例

java 2次浏览

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

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

示例1: onDiscoveryRequestChanged

点赞 3

import android.support.v7.media.MediaRouteDiscoveryRequest; //导入依赖的package包/类
@Override
public void onDiscoveryRequestChanged(@Nullable MediaRouteDiscoveryRequest request) {
    if(request != null) {
        if(mCurrentRequest == null) {
            mContext.registerReceiver(mWifiMonitorReceiver, mWifiMonitorIntentFilter);
        }
        Log.d(TAG, "onDiscoveryRequest "+request.toString());
        NetworkInfo activeNetwork = mConnectivityManager.getActiveNetworkInfo();
        boolean isConnected = activeNetwork != null &&
                activeNetwork.isConnectedOrConnecting();
        boolean isWiFi = isConnected && activeNetwork.getType() == ConnectivityManager.TYPE_WIFI;
        if(isWiFi || isEmulator()) {
            startDiscovery(request);
        }
    } else {
        mContext.unregisterReceiver(mWifiMonitorReceiver);
        stopDiscovery();
    }
    mCurrentRequest = request;
}
 

开发者ID:Orange-OpenSource,
项目名称:OCast-Java,
代码行数:21,
代码来源:OCastMediaRouteProvider.java

示例2: startDiscovery

点赞 3

import android.support.v7.media.MediaRouteDiscoveryRequest; //导入依赖的package包/类
private void startDiscovery(MediaRouteDiscoveryRequest request) {
    if (request.isActiveScan()) {
        mProcessDiscovery.stop();
        mActiveDiscovery.start();
    } else {
        mActiveDiscovery.stop();
        mProcessDiscovery.start();

    }
}
 

开发者ID:Orange-OpenSource,
项目名称:OCast-Java,
代码行数:11,
代码来源:OCastMediaRouteProvider.java

示例3: type

点赞 2

import android.support.v7.media.MediaRouteDiscoveryRequest; //导入依赖的package包/类
public static SubjectFactory<MediaRouteDiscoveryRequestSubject, MediaRouteDiscoveryRequest> type() {
  return new SubjectFactory<MediaRouteDiscoveryRequestSubject, MediaRouteDiscoveryRequest>() {
    @Override
    public MediaRouteDiscoveryRequestSubject getSubject(FailureStrategy fs, MediaRouteDiscoveryRequest that) {
      return new MediaRouteDiscoveryRequestSubject(fs, that);
    }
  };
}
 

开发者ID:pkware,
项目名称:truth-android,
代码行数:9,
代码来源:MediaRouteDiscoveryRequestSubject.java

示例4: onDiscoveryRequestChanged

点赞 2

import android.support.v7.media.MediaRouteDiscoveryRequest; //导入依赖的package包/类
@Override
public void onDiscoveryRequestChanged(MediaRouteDiscoveryRequest request) {
	if (request != null && request.isActiveScan()) {
		if(dlnaService != null) {
			dlnaService.getControlPoint().search();
		} else {
			searchOnConnect = true;
		}
	}
}
 

开发者ID:popeen,
项目名称:Popeens-DSub,
代码行数:11,
代码来源:DLNARouteProvider.java

示例5: onDiscoveryRequestChanged

点赞 2

import android.support.v7.media.MediaRouteDiscoveryRequest; //导入依赖的package包/类
@Override
public void onDiscoveryRequestChanged(MediaRouteDiscoveryRequest request) {
	try {
		if (request != null && request.isActiveScan() && mIRemotePlayService != null) {
			mIRemotePlayService.startSearch(mListener);
		}
	}
	catch (RemoteException e) {
		e.printStackTrace();
	}
}
 

开发者ID:Nutomic,
项目名称:controldlna,
代码行数:12,
代码来源:Provider.java

示例6: MediaRouteDiscoveryRequestSubject

点赞 2

import android.support.v7.media.MediaRouteDiscoveryRequest; //导入依赖的package包/类
protected MediaRouteDiscoveryRequestSubject(FailureStrategy failureStrategy, MediaRouteDiscoveryRequest subject) {
  super(failureStrategy, subject);
}
 

开发者ID:pkware,
项目名称:truth-android,
代码行数:4,
代码来源:MediaRouteDiscoveryRequestSubject.java

示例7: MediaRouteDiscoveryRequestAssert

点赞 2

import android.support.v7.media.MediaRouteDiscoveryRequest; //导入依赖的package包/类
public MediaRouteDiscoveryRequestAssert(MediaRouteDiscoveryRequest actual) {
  super(actual, MediaRouteDiscoveryRequestAssert.class);
}
 

开发者ID:square,
项目名称:assertj-android,
代码行数:4,
代码来源:MediaRouteDiscoveryRequestAssert.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)