`
folksy
  • 浏览: 160235 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

How to use Sensor Simulator in Android SDK Emulator

阅读更多

How to use Sensor Simulator in Android SDK Emulator

http://www.botskool.com/geeks/how-use-sensor-simulator-android-sdk-emulator

In this post we will simulate various sensors such as accelerometer, compass, orientation and temperature sensor using SensorSimulator in Android SDK Emulator.

The OpenIntents SensorSimulator lets you simulate sensor data with the mouse in real time, where the behavior can be customized through various settings. It currently supports four sensors only but more are being developed by their team.

First you need to download the latest stable version of SensorSimulator. Go to their download page and then search for the latest sensorsimulator-x.x.x.zip file and download it. Right now the they have released the beta version and you can download it from here

 

Note:

§         Here we will be working on Android Platform 1.5.

§         We have assumed that Android SDK's location in Windows is "E:\android-sdk-windows\". If you have installed/unzipped your SDK somewhere else, you can change this base-path accordingly in the rest of the tutorial.

Once you have downloaded the latest version of SensorSimulator uncompress it and go inside the bin folder. Here you will find two files sensorsimulator.jar and SensorSimulatorSettings.apk. Copy the sensorsimulator.jar file inside the tools directory of the Android SDK folder i.e. E:\android-sdk-windows\tools\

Now we need to install the SensorSimulatorSettings.apk in Android SDK Emulator. You can read this tutorial if you need help with the installation of SensorSimulatorSettings.apk file. Follow the steps given in that tutorial and once you have installed we can proceed further.

 

Note: The above mentioned tutorial is for Android Platform 1.5 but it will work for other Android Platforms also.

Once you have installed the SensorSimulatorSettings.apk in Android Emulator click on the Launcher icon (emulator must be running right now and if not boot/start it up) as shown below.

 

A list of applications will appear now and Sensor Simulator setting application will be present in it. Open it.

 

 

Now minimize the Android Emulator and open command terminal inside Windows by going to

Start>>Run>>cmd. Inside command terminal change your current working directory to E:\android-sdk-windows\ and execute the following command as shown below.

java -jar sensorsimulator.jar

 

The moment you execute the above mentioned command sensorsimulator.jar will be launched.

Now enter the IP address in the Android Emulator as shown in SensorSimulator window.

 

 

After this select the Testing tab and then click on Connect as shown below.

 

Once you click on Connect button the Android Emulator will connect itself with Sensor Simulator (in Windows). Now a list of sensors will appear below Connect button. You need to Enable these sensors by selecting the checkbox present before each sensor name. They are disabled by default.

 

Once you enable them the sensor data will synchronize itself as shown below.

And now if you try to change position and orientation of the figure in the Sensor Simulator (in Windows) the values of all sensors will change accordingly in the Android Emulator. Thats it! We are done.

分享到:
评论

相关推荐

    Android代码-Android-Bluetooth-Simulator

    What you need to do in order to use the simulator instead of the android API, is to change the import from android.bluetooth to dk.itu.android.bluetooth (and also add the INTERNET permission in the ...

    VCE Exame Simulator for android

    VCE Exame Simulator for android vce 模拟器安卓手机版破解 更新时间:2016-05-05 00:15:24 附件包含破解工具和说明文档 如有侵权麻烦告知会尽快删除 QQ/email:dydzdc@163.com

    android_simulator_web.rar_Help!_andriod simulator_android web_w

    _andriod simulator_android web_w"这个压缩包文件提供了关于如何使用Android模拟器访问本地Web应用的解决方案。下面将详细介绍这个主题,并围绕相关知识点进行展开。 首先,Android模拟器是Android Studio自带的...

    emus:从命令行启动Android Emulator和iOS Simulator

    us从命令行启动Android Emulator和iOS Simulator。此cli为您提供了计算机上可用的虚拟设备的列表,其中最近打开的(来自cli)位于顶部。安装yarn global add emus或者npm install -g emus用法$ emus --help Start ...

    wireless sensor netwokr simulator

    标题中的"Wireless Sensor Network Simulator"指的是一款这样的模拟软件,用于模拟无线传感器网络的操作和交互。这种模拟器通常包括节点的能源管理、数据收集、路由协议、网络拓扑变化等功能模块,可以帮助开发者和...

    iPhoneOS13.6.sdk

    iPhoneOS13.6.sdk 替换位置:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs

    Wireless Sensor Network Simulator v1

    Wireless Sensor Network Simulator v1提供了一个平台,使得用户可以在虚拟环境中进行这些实验,而无需实际部署硬件设备。 该模拟器可能包含的功能有: 1. **网络建模**:用户可以定义网络拓扑、节点位置、传感器...

    ns-2 extension to simulate localization system in wireless sensor networks.pdf

    根据提供的文件信息,本文将对“ns-2 extension to simulate localization system in wireless sensor networks”这一主题进行详细解读。文档主要介绍了如何在NS-2(Network Simulator version 2)网络仿真器中添加...

    CANopen 、DeviceNet Master Simulator

    The CANopen Master Simulator is an easy to use software for data exchange with CANopen slaves of many suppliers via CANopen. Input data can be read and output data can be written with the currently ...

    Spectre Circuit Simulator and Accelerated Parallel Simulator

    用户指南是针对特定版本15.1的Virtuoso® Spectre® Circuit Simulator和Accelerated Parallel Simulator。该仿真软件由Cadence Design Systems, Inc.开发,并在2015年10月发布了该版本。 在详细探讨知识点之前,...

    a micro processor simulator for educational purposes

    Installation goes in the following simple steps, and should be familiar since you have already installed Allegro: Start a console (e.g. a DOS-box in Windows) Make your Ellen directory to the ...

    NEURON Programming Tutorial

    In part A we start with the basics: how to create a single compartment neuron model with Hodgkin-Huxley conductances, how to run the simulator and how to display the simulation results. In part B we ...

    作者配合 Introduction to Network Simulator NS2 原书提供的课件

    《Introduction to Network Simulator NS2》是一本深入介绍网络模拟器NS2的专业书籍,配合该书提供的课件旨在帮助读者更全面地理解和掌握NS2的基本概念、编程技巧以及各种网络协议的实现。这些课件涵盖了从基础到...

    手机模拟器(MTK PC Simulator)

    使用MTK PC Simulator时,开发者通常需要具备一定的编程基础,熟悉Java、Android SDK等相关技术。安装和使用过程中,可能涉及到以下步骤: 1. **下载安装**:获取MTK PC Simulator的压缩包,解压后按照安装指南进行...

    Introduction To Network Simulator NS2

    NS2,全称Network Simulator Version 2,是一款广泛使用的开源网络模拟软件,它允许研究人员和工程师在不受实际网络限制的情况下,对各种网络协议和系统进行实验和性能评估。NS2以其灵活性和可扩展性著称,能够模拟...

    Wireless Network Simulator in Matlab

    Radio propagation: free space, two-ray, and lognormal shadowing Mobility: random waypoint model PHY: SNR-based packet capture, broadcast, dynamic transmission rate and power MAC: IEEE 802.11 (CSMA/CA,...

    Introduction to Network Simulator NS2

    《网络模拟器NS2入门指南》是一本专为想要学习NS2(Network Simulator 2)的读者准备的书籍。NS2是一款广泛应用于网络协议和系统设计、分析与教学的开源仿真工具。它允许用户在无需实际硬件的情况下,模拟各种网络...

    Pro OpenGL ES For Android

    In Pro OpenGL ES for Android, you'll find out how to harness the full power of OpenGL ES, and design your own 3D applications by building a fully-functional 3D solar system model using Open GL ES!...

Global site tag (gtag.js) - Google Analytics