小编Ame*_*dke的帖子

如何定期扫描android上的蓝牙设备

嗨,这可能听起来像一个愚蠢的问题.但我无法找到任何答案,因此发布在这里.

我正在构建一个室内应用程序,它不断扫描位于商场或图书馆等地方不同位置的蓝牙加密狗.当我手里拿着安卓手机进入商场时,我应该可以得到最近的加密狗,我可以连接to(愚蠢的想法,但我想用此做其他事情).为此,我应该能够连续扫描蓝牙设备.

请有人告诉我如何让android定期扫描可用的蓝牙设备.

android bluetooth discovery

31
推荐指数
3
解决办法
4万
查看次数

在显示列表视图的同时在后台下载图像

我有一个数组的所有URI的数组,我在列表中显示.现在我想在后台运行一个线程,从web获取这些图像并将它们存储在SD卡上.因此,当我单击列表中的特定元素而不是从Web获取时,它应该从新活动中的SD卡中获取.

我该怎么做呢?

android listview image

6
推荐指数
1
解决办法
7204
查看次数

室内定制地图应用

我目前正处于Android项目的研究阶段.我有兴趣开发室内自定义地图应用程序.我目前面临的问题有两个:

  1. 我无法使用GPS,因为它无法在建筑物或商场等室内环境中使用
  2. I can't use Google Maps API as I need to show my location on a indoor custom map(like a floor-plan of a building). I'm assuming here that I have the custom map of the building or mall.

Now my goal is to find location of the Android phone using some methods and display it on the custom map.To find the location I have following options,

  1. Use of Bluetooth dongles or transmitters, I am assuming that Bluetooth dongles or …

android google-maps dictionary bluetooth wifi

5
推荐指数
1
解决办法
3382
查看次数

无法将Android客户端与本地XMPP服务器连接

这是关于发布在这里

我能够将我的PC连接到本地的本地tigase服务器设置(我正在使用Smack API).现在,当我想通过Wi-Fi将Android Phone连接到该服务器时,我遇到了问题.我能够通过使用客户端Beem连接到本地服务器android.My XMPP服务器的域名是我的PC名称"mwbn43-1",IP地址是"192.168.0.221"(我能够ping这个服务器从Android终端模拟器).在Beem设置中有一个高级选项,我可以指定我要连接的服务器(我已经将其作为IP地址).如果我没有设置此选项,我无法conect.Now这里是的片段代码我用于我的Android客户端.

    XMPPConnection.DEBUG_ENABLED = true;
    ConnectionConfiguration config = new ConnectionConfiguration("mwbn43-1",5222);

    //ConnectionConfiguration config = new ConnectionConfiguration("192.168.0.221",5222);             
    config.setSASLAuthenticationEnabled(false);
    config.setCompressionEnabled(false);

    XMPPConnection xmpp = new XMPPConnection(config);

    try {

            xmpp.connect(); 

            xmpp.login("admin@mwbn43-1", "tigase");
            String host = xmpp.getHost();
            String id = xmpp.getConnectionID();
            int port = xmpp.getPort();
            boolean i = false;
            i = xmpp.isConnected();
            if(i)
            {answer = "Connected to " + host + " via port " + port + " with ID " + id;
            answerfield.setText(answer);}

          }//end try 
    catch (XMPPException e) {  
     answerfield.setText("Failed …
Run Code Online (Sandbox Code Playgroud)

android xmpp client-server smack tigase

3
推荐指数
1
解决办法
8149
查看次数

使用Smack从2个不同的Android设备登录相同的jabber帐户

我在Android上开发了一个应用程序,它利用Smack API连接到XMPP服务器.在这个应用程序中,我硬编码用户登录信息,即用户名和密码.

xmpp.login("admin","tigase");

我收到来自不同用户的数据包

PacketFilter filter = new AndFilter(new PacketTypeFilter(Message.class),new FromContainsFilter("ameya @ mwbn43-1"));

现在我面临的问题是,当我在2个不同的Android设备上运行相同的应用程序时,一个设备会覆盖其他设备凭据,因​​此当我尝试发送数据时,只有其中一个获得它.AFAIK在普通的Google聊天中,用户可以从两个不同的地方登录同一个帐户,并且可以同时在这两个地方接收消息.

谁能告诉我可能是什么问题?它与Smack API有什么关系?

谢谢,

Ameya

gmail android xmpp smack

3
推荐指数
2
解决办法
2722
查看次数