如何自动接受Android的无线直接连接请求 [英] How to auto accept Wifi Direct connection request in android

查看:319
本文介绍了如何自动接受Android的无线直接连接请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有使用WiFi直接2 Android设备。在一个设备I可以得到有关使用WifiP2pManager类的其他设备的信息,并请求至其它设备的连接。然而,当我请求连接,其他设备弹出一个小窗口,询问用户是否要接受连接请求。

I have 2 android devices using WiFi Direct. On one device I can get information about the other device using the WifiP2pManager class, and request a connection to the other device. However when I request a connection, the other device pops up a little window and asks the user if they want to accept the connection request.

是否有可能自动接受这些连接请求? IE浏览器能够连接到其他设备与用户进行确认?

Is it possible to auto accept these connection request? I.E to be able to connect to the other device with out user confirmation?

推荐答案

根据的评论,你真的需要连接到这些设备,如果你只是想跟踪和记录你周围的车辆?

Based on the comments, do you really need to connect to the devices if you just want to track and log the vehicles around you ?

我不知道这个项目的范围,但你可以简单地使用的 WifiP2pDeviceList 请在WifiP2pManager 中的同龄人。你可以得到你周围的设备(〜=车辆)的名单,可以登录本。

I don't know the scope of the project, but you could simply use the WifiP2pDeviceList that you get when you request the peers in the WifiP2pManager. You could get the list of the devices (~= vehicles) around you and could log this.

如果你想送我想更详细的信息连接是非常有用的。

Connection is useful if you want to send more detailed information I guess.

这篇关于如何自动接受Android的无线直接连接请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆