关于MediaRouter的理解

Android VirtualDisplay的用法和遇到的点击事件问题 前言 最近在看Android 多屏相关的问题,初步接触到了DisplayManager的一些东西,发现网上资料较少,自己学习到的总结一下。 阅读详情

The media router APIs enable a broad range of media output to playback equipment connected to A ndroid devices through wireless and wired means. To enable these connections, the media router framework abstracts the logical paths for audio and video output for an Android device. This architecture allows your app to quickly channel media content to connected playback devices such as home theaters and sound systems that provide Android media route support.

In order to use this framework within your app, you must get an instance of the MediaRouter framework object and attach a MediaRouter.Callback object to listen for events in available media routes. Content channelled through a media route passes through the route's associated MediaRouteProvider (except in a few special cases, such as a Bluetooth output device). The following diagram provides a high-level view of the classes your app can use to play content with the media router framework.

Figure 1. Overview of key media router classes used by apps.

Manufacturers of media playback hardware that is not supported by the media router framework can add support for their devices by implementing a MediaRouteProvider and distributing it as an application. For more information on implementing a media route provider, see the MediaRouteProvider reference documentation and the v7-mediarouter support library sample <sdk>/extras/android/compatibility/v7/mediarouter.

Media router packages

The media router APIs are provided as part of the Android Support Library version 18 and higher, in the v7-mediarouter support library. Specifically, you should use the classes in the android.support.v7.media package for media router functions. These APIs are compatible with devices running Android 2.1 (API level 7) and higher.

Caution: There is another set of media router APIs provided in the android.media that have been superseded by the v7-mediarouter support library. You should not use the android.media classes for media router functions.

In order to use the android.support.v7.media media router classes, you must add the v7-mediarouter support library package to your app development project. For more information on adding support libraries to your app development project, see Support Library Setup.

Cast User Interface


Android apps that implement the media router API should include a Cast button as part of their user interface, to allow users to select a media route to play media on a secondary output device. The media router framework provides a standard interface for the button, which you should use to help users recognize and use the feature in your app. Figure 2 illustrates how the Cast button should appear in an app.

Figure 2. A Cast button shown on the right side of the action bar.

Caution: When implementing an activity that provides a media router interface you must extend eitherActionBarActivity or FragmentActivity from the Android Support Library, even if your android:minSdkVersion is API 11 or higher.

Cast button

The recommended way to implement the Cast button user interface is to extend your activity fromActionBarActivity and use the onCreateOptionsMenu() method to add an options menu. The Cast button must use the MediaRouteActionProvider class as its action:

<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      >

    <item android:id="@+id/media_route_menu_item"
        android:title="@string/media_route_menu_title"
        app:actionProviderClass="android.support.v7.app.MediaRouteActionProvider"
        app:showAsAction="always"
    />
</menu>

For more information about implementing the action bar in your app, see the Action Bar developer guide.

Once you have added the Cast button to your user interface, you must attach a media route selector object. Building a selector is discussed in the next section.

If you do not want a menu in your action bar, you can also add a Cast button to your app using MediaRouteButton. If you choose this approach, you should add this button to your app's action bar according to the Google Cast Design Checklist. You must also attach a media route selector to the button using the setRouteSelector()method.

For guidelines on incorporating the Cast button into your application, review the Google Cast Design Checklist.

Media route selector

When a user presses the Cast button, the media router framework looks for available media routes and presents a list of choices to the user, as shown in figure 3.

Figure 3. A list of available media routes, shown after pressing the Cast button.

The types of media routes that appear on this list—Remote Playback, Secondary Output or others—are defined by your app.You define these type by creating a MediaRouteSelector, which accepts MediaControlIntent objects provided by the framework and other media route providers created by you or other developers. The framework-provided route categories are as follows:

  • CATEGORY_LIVE_AUDIO — Output of audio to a secondary output device, such as a wireless-enabled music system.
  • CATEGORY_LIVE_VIDEO &mdash ; Output of video to a secondary output device, such as Wireless Display devices.
  • CATEGORY_REMOTE_PLAYBACK — Play video or audio on a separate device that handles media retrieval, decoding, and playback, such as Chromecast devices.

When creating a MediaRouteSelector object, use the MediaRouteSelector.Builder class to create the object and set the media playback categories (control categories), as shown in the following code sample:

public class MediaRouterPlaybackActivity extends ActionBarActivity {
    private MediaRouteSelector mSelector;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        // Create a route selector for the type of routes your app supports.
        mSelector = new MediaRouteSelector.Builder()
                // These are the framework-supported intents
                .addControlCategory(MediaControlIntent.CATEGORY_LIVE_AUDIO)
                .addControlCategory(MediaControlIntent.CATEGORY_LIVE_VIDEO)
                .addControlCategory(MediaControlIntent.CATEGORY_REMOTE_PLAYBACK)
                .build();
    }
}

The media router framework uses this selector object to provide an interface for selecting media routes that your app supports, as shown in figure 3. Once you have defined this selector, you attach it to theMediaRouteActionProvider object associated with the Cast menu item, as shown in the following code sample:

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    super.onCreateOptionsMenu(menu);

    // Inflate the menu and configure the media router action provider.
    getMenuInflater().inflate(R.menu.sample_media_router_menu, menu);

    // Attach the MediaRouteSelector to the menu item
    MenuItem mediaRouteMenuItem = menu.findItem(R.id.media_route_menu_item);
    MediaRouteActionProvider mediaRouteActionProvider =
            (MediaRouteActionProvider)MenuItemCompat.getActionProvider(
            mediaRouteMenuItem);
    mediaRouteActionProvider.setRouteSelector(mSelector);

    // Return true to show the menu.
    return true;
}

Once you have made these changes to your app, you might expect the Cast button to appear in your activity. Alas, it does not (unless your device is already paired with a Wireless Display). In most cases, you must also connect with the media route framework, which is discussed in the next section.

Connecting to Media Routes


In order to connect to a media route selected by the user, your app must obtain the MediaRouter framework object and then attach a MediaRouter.Callback object. The callback object receives messages from the media router framework when a route is selected, changed, or disconnected by the user.

To obtain an instance of the MediaRouter framework object, call MediaRouter.getInstance() from the onCreate()method of an activity that supports the media router API.

Note: The MediaRouter object is a singleton that is maintained by the framework. However, once your application obtains an instance of the object you must retain that instance until your application terminates to prevent it from being garbage collected.

Creating a MediaRouter callback

The media router framework communicates with an app through a callback object that you attach to theMediaRouter framework object. An app that uses the media router framework must extend theMediaRouter.Callback object in order to receive messages when a media route is connected.

There are several methods in the callback that you can override to receive information about media router events. At minimum, your implementation of the MediaRouter.Callback class should override the following methods:

The methods of your MediaRouter.Callback implementation are the first opportunity to determine if the connected route is a remote playback device, such as Chromecast, or a secondary output device, such as a Wireless Display device. If your app supports both device types, then your implementation should branch here, as shown in this sample code:

private final MediaRouter.Callback mMediaRouterCallback =
        new MediaRouter.Callback() {

    @Override
    public void onRouteSelected(MediaRouter router, RouteInfo route) {
        Log.d(TAG, "onRouteSelected: route=" + route);

        if (route.supportsControlCategory(
            MediaControlIntent.CATEGORY_REMOTE_PLAYBACK)){
            // remote playback device
            updateRemotePlayer(route);
        } else {
            // secondary output device
            updatePresentation(route);
        }
    }

    @Override
    public void onRouteUnselected(MediaRouter router, RouteInfo route) {
        Log.d(TAG, "onRouteUnselected: route=" + route);

        if (route.supportsControlCategory(
            MediaControlIntent.CATEGORY_REMOTE_PLAYBACK)){
            // remote playback device
            updateRemotePlayer(route);
        } else {
            // secondary output device
            updatePresentation(route);
        }
    }

    @Override
    public void onRoutePresentationDisplayChanged(
            MediaRouter router, RouteInfo route) {
        Log.d(TAG, "onRoutePresentationDisplayChanged: route=" + route);

        if (route.supportsControlCategory(
            MediaControlIntent.CATEGORY_REMOTE_PLAYBACK)){
            // remote playback device
            updateRemotePlayer(route);
        } else {
            // secondary output device
            updatePresentation(route);
        }
   
 }
}

After defining your callback object for the media router, you still need to attach it to the main media router framework object. The next section discusses the appropriate way to attach your callbacks for media routes.

Attaching a callback to MediaRouter

Since media routes are a shared interface, your app must attach and detach your MediaRouter.Callback object as your app starts up and shuts down. To accomplish this, you must add and remove your app's callback object from the media router framework as part of your app's activity lifecycle. This approach allows other apps to make use of media route outputs while your app is in the background or not running.

Note: If you are writing a music playback app and want to allow music to play while your app is in the background, you must build a Service for playback and connect that service and it's lifecycle to the media router framework.

The following code sample demonstrates how to use the lifecycle methods to appropriately add and remove your app's media router callback object:

public class MediaRouterPlaybackActivity extends ActionBarActivity {
    private MediaRouter mMediaRouter;
    private MediaRouteSelector mSelector;
    private Callback mMediaRouterCallback;

    // your app works with so the framework can discover them.
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        // Get the media router service.
        mMediaRouter = MediaRouter.getInstance(this);
        ...
    }

    // Add the callback on start to tell the media router what kinds of routes
    // your app works with so the framework can discover them.
    @Override
    public void onStart() {
        mMediaRouter.addCallback(mSelector, mMediaRouterCallback,
                MediaRouter.CALLBACK_FLAG_REQUEST_DISCOVERY);
        super.onStart();
    }

    // Remove the selector on stop to tell the media router that it no longer
    // needs to discover routes for your app.
    @Override
    public void onStop() {
        mMediaRouter.removeCallback(mMediaRouterCallback);
        super.onStop();
    }
    ...
}

You should add and remove the media router callback only in the onStart() and onStop() lifecycle methods. Do not include these calls in the onResume() or onPause() methods.

Note: The media route framework also provides a MediaRouteDiscoveryFragment class, which takes care of adding and removing the callback for an activity.

Now when you run your application, you should see a Cast button appear in your activity. When you touch the button, a route selection dialog appears as shown in figure 3, allowing your user to select an available media route. Make sure you have a supported device available on your local network when testing this interface.

Note: In order for Wireless Display routes to show up in the media route selection dialog, users must enable this option in the Settings app. The option is under the Display category and is called Cast screen on Android 4.4 (KitKat) and higher devices and Wireless Display on Android 4.2.x (Jelly Bean) devices. For more information on enabling this feature see this Wireless display support page.

Remote Playback


The remote playback approach sends control commands to a secondary device to initiate playback and to control playback that is in progress (pause, rewind, fast-forward, volume up and down). Using this approach, the receiving device (such as a Chromecast) is responsible for retrieving and rendering content.

When your app supports this type of media route, you must create a RemotePlaybackClient object using a remote playback MediaRouter.RouteInfo object received through your app's MediaRouter.Callback object. The following sample code demonstrates a controller method that creates a new remote playback client and sends it a video for playback:

private void updateRemotePlayer(RouteInfo route) {
    // Changed route: tear down previous client
    if (mRoute != null && mRemotePlaybackClient != null) {
        mRemotePlaybackClient.release();
        mRemotePlaybackClient = null;
    }

    // Save new route
    mRoute = route;

    // Attach new playback client
    mRemotePlaybackClient = new RemotePlaybackClient(this, mRoute);

    // Send file for playback
    mRemotePlaybackClient.play(Uri.parse(
            "http://archive.org/download/Sintel/sintel-2048-stereo_512kb.mp4"),
            "video/mp4", null, 0, null, new ItemActionCallback() {

            @Override
            public void onResult(Bundle data, String sessionId,
                    MediaSessionStatus sessionStatus,
                    String itemId, MediaItemStatus itemStatus) {
                logStatus("play: succeeded for item " + itemId);
            }

            @Override
            public void onError(String error, int code, Bundle data) {
                logStatus("play: failed - error:"+ code +" - "+ error);
            }
        });
    }
}

The RemotePlaybackClient class provides additional methods for managing content playback. Here are a few of the key playback methods from the RemotePlaybackClient class:

  • play() — Play a specific media file, specified by a Uri.
  • pause() — Pause the currently playing media track.
  • resume() — Continue playing the current track after a pause command.
  • seek() — Move to a specific position in the current track.
  • release() — Tear down the connection from your app to the remote playback device.

You can use these methods to attach actions to playback controls you provide in your app. Most of these methods also allow you to include a callback object so you can monitor the progress of the playback task or control request.

The RemotePlaybackClient class also supports queueing of multiple media items for playback and management of the media queue. For a comprehensive sample implementation of these features, seeSampleMediaRouterActivity and its associated classes in the v7 mediarouter support library sample<sdk>/extras/android/compatibility/v7/mediarouter.

For additional information on using the Google Cast API for Chromecast devices, see the Google Cast developer documentation.

Secondary Output


The secondary output approach sends prepared media content to a connected secondary device for playback. Secondary devices can include televisions or wireless sound systems and can be attached through wireless protocols or wires, such as an HDMI cable. With this approach, your app is responsible for processing media content for playback (downloading, decoding, synchronization of audio and video tracks), while the secondary device only outputs the content in its final form.

Note: Using the secondary output display routes with the media router framework requires classes that are available only in Android 4.2 (API level 17) and higher, specifically the Presentation class. If you are building an app that supports both remote playback and secondary output devices, you must include checks that disable this code below the supported Android version level.

Creating a Presentation object

When using a secondary output display with the media router framework, you create a Presentation object that contains the content you want to show on that display. The Presentation is extended from the Dialog class, so can add layouts and views to a Presentation.

You should be aware that the Presentation object has its own Context and Resources, separate from the app activity that created the object. Having a secondary context is required, because the content of the Presentationis drawn on a display that is separate from your app's display on the local Android device. Specifically, the secondary display needs a separate context because it may need to load resources based on its specific screen metrics.

The following code sample shows a minimal implementation of a Presentation object, including a GLSurfaceViewobject.

public class SamplePresentation extends Presentation {
    public SamplePresentation(Context outerContext, Display display) {
        super(outerContext, display);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // Notice that we get resources from the context of the Presentation
        Resources resources = getContext().getResources();

        // Inflate a layout.
        setContentView(R.layout.presentation_with_media_router_content);

        // Add presentation content here:
        // Set up a surface view for visual interest
        mSurfaceView = (GLSurfaceView)findViewById(R.id.surface_view);
        mSurfaceView.setRenderer(new CubeRenderer(false));
    }
}

Creating a Presentation controller

In order to display a Presentation object, you should write a controller layer that handles responses to the messages received by the MediaRouter.Callback object and manages the creation and removal of thePresentation object. The controller layer should also handle attaching presentations to a selected Display object, which represents the separate physical display device chosen by the user. The controller layer can simply be a method in the activity that supports a secondary display.

The following code sample shows a controller layer for a Presentation implemented as a single method. This method handles dismissing invalid presentations when a Display is unselected or disconnected, and creates thePresentation object when a display device is connected.

private void updatePresentation(RouteInfo route) {
    // Get its Display if a valid route has been selected
    Display selectedDisplay = null;
    if (route != null) {
        selectedDisplay = route.getPresentationDisplay();
    }

    // Dismiss the current presentation if the display has changed or no new
    // route has been selected
    if (mPresentation != null && mPresentation.getDisplay() != selectedDisplay) {
        mPresentation.dismiss();
            mPresentation = null;
    }

    // Show a new presentation if the previous one has been dismissed and a
    // route has been selected.
    if (mPresentation == null && selectedDisplay != null) {
        // Initialize a new Presentation for the Display
        mPresentation = new SamplePresentation(this, selectedDisplay);
        mPresentation.setOnDismissListener(
                new DialogInterface.OnDismissListener() {
                    // Listen for presentation dismissal and then remove it
                    @Override
                    public void onDismiss(DialogInterface dialog) {
                        if (dialog == mPresentation) {
                            mPresentation = null;
                        }
                    }
                });

        // Try to show the presentation, this might fail if the display has
        // gone away in the meantime
        try {
            mPresentation.show();
        } catch (WindowManager.InvalidDisplayException ex) {
            // Couldn't show presentation - display was already removed
            mPresentation = null;
        }
    }
}

Note: When the a user connects to a Wireless Display, the media router framework automatically provides a notification that it is displaying screen content on a connected device.

×
免费HTML5在线教程 techbrood.com

3D在线虚拟试衣解决方案

HTML5云开发平台 wow.techbrood.com

Android 双屏异显 日常生活中,有时候会遇到 Android 设备连接两个屏幕进行显示的问题,比如酒店登记信息时,一个屏幕用于员工操作,一个屏幕显示相关信息供顾客查看。这里就涉及到 Android 的双屏异显的问题,实现 Android 的双屏异显,Google 也提供了相应的 API 方法 Presentation。...... 阅读详情

相关推荐

Android 的媒体路由功能应用与框架解析

功能描述      Android 的媒体路由API被设计用来允许多种媒体( 视频、音乐、图片)在与ANDROID设备连接( 无线或有线)的辅助设备(如电视、立体声、家庭戏院系统、音乐播放机)上显示和播放, 使用该框架和API,允许 Android用户立即在辅助设备上显示图片、播放音乐、共享视频等。 媒体路由框架提供两种播放输出类型:远端播放和辅助输

固弘的专栏 9705

Android之在设备之间传输--MediaRouter、Google Cast、Amazon Fling介绍

Google Cast 专为电视、电影、音乐等而设计。将最好的视频内容放在家里最大的屏幕上,或者将音频内容带到 Google Cast for Audio 设备和 Google Home 设备,包括新的 Google Home Hub。Google Cast SDK 使您能够扩展您的 Android、iOS 或 Web 应用程序,以将其流式视频和音频定向到电视或音响系统。应用程序成为播放、暂停、搜索、倒带、停止和以其他方式控制媒体的遥控器。使用Google Cast需要购买ChromeCast。

分享技术与经验的博客 3746

Android多屏开发入门:5分钟学会用DisplayManager和MediaRouter检测并连接第二块屏幕

本文深入解析Android多屏开发技术,重点介绍DisplayManager和MediaRouter的使用方法,帮助开发者快速实现双屏异显功能。通过实战代码演示如何检测并连接第二块屏幕,优化副屏显示效果,适用于车载娱乐、移动办公等场景。

weixin_30263073的博客 255

MediaRouter的使用

这东西有点意思, 首先,它不是创建出来的,MediaRouter有一个service,每个app进程是通过给getSystemService(Context.MEDIA_ROUTER_SERVICE); 拿到的一个MediaRouter,说白了就是一个跟MediaRouterService 交互的接口。什么bp, stub之类,不知道现在android这块改进到什么情况了。 其次, 通过Media...

Neo_Zhang888的博客 3544

Android多屏开发避坑指南:从MediaRouter到DisplayManager,选对API让你的Presentation更稳定

本文深入探讨Android多屏开发中MediaRouter与DisplayManager的API选型策略,帮助开发者避免常见陷阱。通过车载双屏等实战案例,解析如何根据用户交互需求、系统版本和设备类型选择最佳方案,确保Presentation在副屏显示稳定可靠,特别适合双屏异显场景的开发优化。

weixin_42525369的博客 224

不止于Demo:用RK3588四屏异显打造你的多屏应用(Activity启动与Display管理详解)

本文深入探讨了RK3588在Android12系统下的四屏异显技术,详细解析了Activity启动与Display管理的核心机制。通过实战案例和代码示例,指导开发者如何从Demo进阶到实际应用开发,涵盖智能商显、车载系统等多屏场景,助力实现高效的多屏协同解决方案。

weixin_31682031的博客 366

【Audio&Video】MediaRouter概述(17)

原 为了在您的应用程序中使用MediaRouter框架,您必须获取MediaRouter对象的实例并附加一个 MediaRouter.Callback对象来侦听路由事件。通过媒体路由发送的内容通过路由关联MediaRouteProvider(除少数特殊情况外,如蓝牙输出设备)。图1提供了用于在设备之间路由内容的类的高级视图。 图1.应用程序使用的关键媒体路由器类的概述。 注意:如果您希望您的应用支...

weixin_33935505的博客 647

uniapp项目中videoplayer模块缺失的快速解决方案

本文针对uniapp项目打包时提示“未添加videoplayer模块”的常见问题,提供了快速解决方案。核心步骤包括在manifest.json中正确启用VideoPlayer模块,并将所需的weex_videoplayer-release.aar和media-release.aar文件放置于项目/libs/android/目录下,最后重启HBuilderX并重新打包即可解决。

weixin_28358083的博客 302

Android -- Support包特性

干货 每一个 Support 包版本后缀 vX 所代表的含义是他能够被使用的最低版本等级。之所以无法在更低版本进行使用的原因,是因为随着版本的升级,在新版本中有很多之前不支持的特性或者 API,因此如果你在老版本中使用了这...

dibe49481448的博客 94

移动端DLNA投屏技术解析:从协议原理到网络视频URL投屏实践

在流媒体传输与设备互联领域,DLNA(数字生活网络联盟)协议作为一项基于UPnP(通用即插即放)的成熟标准,其核心价值在于实现局域网内设备的自动发现与媒体内容推送。其工作原理依托于SSDP协议进行设备发现,并通过SOAP协议发送控制指令,技术优势在于跨品牌设备的广泛兼容性与低实现门槛。这使得DLNA在智能电视、网络播放器等大屏设备的**网络视频url**投屏场景中,成为一种务实的技术选型。开发者通过实现DLNA控制器,可将移动端的在线视频流直接推送至大屏播放,无需电视端安装特定应用。本文聚焦于该协议栈的工程

weixin_33404102的博客 253

android-support-v7-mediarouter

在android开发中,引入android-support-v7-mediarouter.jar,可以实现不同于V4的功能。

理解安卓支持库(Android Support Library)

安卓平台其中一个很牛逼的地方在于它支持各种不同的设备。从你的平板电脑,到你的手机,电视等,安卓无处不在。安卓想成为一个全领域的移动计算平台。光从它的数量上来说,已经算是很成功了。 支持所有这些设备是有一些挑战的。不管硬件还是软件上的不同,用户希望应用程序可以在每一台设备上用样的运行;同样,对于开发者来说,你不能总指望用户已经升级到最近的安卓版本。事实上,开发者遇到的用户大多使用18个月前或者更老...

weixin_33850015的博客 251

RK3568 解决MIPI屏幕开机只显示uboot logo的问题

之前写过一篇文章介绍了RK3568驱动MIPI屏幕的方法,这次产品迭代,硬件改版,选型的新的屏幕了。所以再次开启调试屏幕的过程。本以为会和上次一样会轻车熟路,事情总是事与愿违,同样的路,遇到新的坑。

fhqlongteng的博客 5425

eclipse中添加Support7Demos

个人理解学习安卓看谷歌官方的Demo是个不错的选择。sdk更新到最新以后发现按照网上的教程添加v7各种错误,折腾了半天终于搞定了,所以自己就写个教程记录一下。如下是最终的效果。 1.引入相关的资源apk,最好将projects都copy到当前workspace 这里为了管理方便我对部分project进行了重命名,引入后会有错误提示,如下图 首先解决android-sup...

catcher92的博客 164

一文吃透 BMS:动力电池与储能共用的电池管控全架构详解

BMS作为电池系统的核心控制器,其技术深度和系统复杂性不容小觑。动力电池与储能系统虽然应用场景不同,但在核心架构上共享大量基础技术。成功的BMS设计需要在精度、可靠性、成本、功耗之间找到最佳平衡点。未来,随着电池技术的进步和智能化需求的提升,BMS将向着更高集成度、更强智能化、更优经济性的方向发展。无论是汽车工程师还是储能系统设计师,深入理解BMS的全栈架构,掌握其核心技术原理,都将是应对未来能源存储挑战的关键能力。核心要点回顾BMS采用分层分布式架构,硬件是基础,算法是灵魂。

小帽子的博客 340

Trae+Playwright MCP自动化测试全流程指南:从环境搭建到智能体运行

本文提供了一份详细的Trae与Playwright MCP集成指南,涵盖从Node.js、Python环境搭建到智能体创建的全流程。通过结合MCP协议,AI智能体能够理解任务并驱动Playwright执行复杂的浏览器自动化操作,实现从网页数据抓取到端到端测试的智能工作流。

banana的博客 531

Support库依赖关系

熟悉Support库依赖关系可以让我们清楚的知道依赖情况,更好地选择依赖。

zhangquanit的专栏 1990

Open Interpreter利用Code Interpreter实现本地化

作为一个可以在本地环境中运行的工具,Open Interpreter可以访问互联网,没有文件大小和运行时间的限制,并且可以利用任何包或库。去年7月,OpenAI发布了一个强大的插件,名为Code Interpreter(代码解释器),它可以根据用户的自然语言需求生成并执行代码解决方案,帮助完成各种任务,如数据分析、图表创建和文件编辑等。Open Interpreter不仅是一个编码解释器,它还是一个强大的工具,专注于处理复杂任务,将GPT-4代码解释器的强大功能与本地开发环境的灵活性完美结合在一起。

DigitalChina_DCG的博客 1794

EasyDemo*Android-support-v4 v7 v8 v13 v17 的区别和特性说明

随着 Android 5.0 Lollipop 的发布,Android 又为我们提供了更多的支持包,但是我相信大部分开发者都同我之前一样不知道这些包里究竟有些什么东西,我们应该在什么时候使用它。现在,我们就来逐个看看每一个版本的 Support 包中所拥有的东西,让用到他的时候不再迷茫。 首先,你需要了解每一个 Support 包版本后缀 vX 所代表的含义。当然我相信来看博客的诸位都一定知道 A...

waynesong 864

NVIDIA驱动装好了,Gazebo为啥还是卡?手把手教你用optirun搞定GPU加速

本文详细解析了NVIDIA驱动安装后Gazebo仍卡顿的原因,并提供三步精准诊断与GPU加速实战方案。通过optirun快速启用GPU加速,解决OpenGL与显示服务器的配置问题,显著提升仿真性能。适用于ROS、PX4等开发环境,帮助用户充分利用显卡性能。

weixin_30379531的博客 465

[特殊字符] 从零构建携程/飞猪机票价格爬虫:Python异步抓取与反爬对抗实战

在出行决策、竞品分析、价格预测模型训练等场景中,稳定获取携程(Ctrip)和飞猪(Fliggy)的实时机票价格波动数据是刚需。然而,这两大平台均部署了业界顶尖的反爬体系——包括但不限于:动态请求签名(SignToken设备指纹采集(UACanvasWebGL接口参数加密(X-Sign_abtestcookie混淆)频率限制与 IP 封禁(滑动窗口 + 行为检测)目录前言:为什么需要自建机票价格爬虫?一、技术选型与项目架构1.1 核心技术栈1.2 系统架构图(文字描述)1.3 法律与道德声明。

2201_76125261的博客 338

Android API官方文档 支持库

支持库功能Android 支持库软件包含可以添加至应用的多个库。每个库均支持特定范围的 Android 平台版本和功能。本指南介绍了各支持库提供的重要功能和版本支持,从而帮助您决定在应用中添加哪些支持库。

jingweinie的博客 782

【WRF工具】WRF 模型输出可视化工具 plotfmt

【WRF工具】WRF 模型输出可视化工具 plotfmt

WW、forever的博客 1292

support-v4拆分

网上对Android Support Library中各个依赖包介绍的中文资料太少了,结合官方文档和有限的参考资料做了一次总结,有描述得不对的地方还请指正。 一、主工程、依赖包、jar包、android.jar、Android Support Library的关系   一个Android工程通常包括主工程和依赖包,依赖包又有两种形式: 一种是单独的工程或者aar:在主工程的配置文件中

ljchlx的专栏 2934

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

汉书HE8,好用的汇编代码编写工具

汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大

Android Support Library的前世今生

原文链接:http://www.jianshu.com/p/f5f9a4fd22e8 在之前的开发经历中经常需要导入一些如v4、v7、v13等Android官方的支持包,遇到这些情况时都是网上搜索一下,按照前人给的示例添加依赖。这么稀里糊涂的使用后代码正常运行了,但心中不免会有一些疑问,如,Android官方为什么要提供支持包,都提供哪些支持包,这些支持包又提供了什么特性,开发者又应该如何选择

行云间 4587

IDEA的使用指南

IDEA基于java的使用手册,可以最快速的上手,在使用中不断的丰富自己的使用技巧.

上一篇: 关于Renderscript的理解
下一篇: 关于音频焦点的运用
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值