Language - Android Java: Difference between revisions

From Phidgets Support
No edit summary
Line 52: Line 52:
==== Step Four: Close and Delete ====
==== Step Four: Close and Delete ====


==== More How-To's ====
== Futher Reading ==


'''<span style="color:#FF0000">Link to other common pages like polling vs. events</span>'''
[[Phidget Programming Basics]] - Here you can find the basic concepts to help you get started with making your own programs that use Phidgets.
 
[[Data Interval/Change Trigger]] - Learn about these two properties that control how much data comes in from your sensors.
 
[[Using Multiple Phidgets]] - It can be difficult to figure out how to use more than one Phidget in your program. This page will guide you through the steps.
 
[[Polling vs. Events]] - Your program can gather data in either a polling-driven or event-driven manner. Learn the difference to determine which is best for your application.
 
[[Logging, Exceptions, and Errors]] - Learn about all the tools you can use to debug your program.
 
[[Phidget Network Service]] - Phidgets can be controlled and communicated with over your network- either wirelessly or over ethernet.


== Common Problems and Solutions/Workarounds ==
== Common Problems and Solutions/Workarounds ==


'''<span style="color:#FF0000">If you know of common problems using this lanaguage (for example, having to create sub-VIs when using multiple phidgets in labview) put them here. </span>'''
'''<span style="color:#FF0000">If you know of common problems using this lanaguage (for example, having to create sub-VIs when using multiple phidgets in labview) put them here. </span>'''

Revision as of 16:56, 19 January 2017


Android Java is the main language used to program for the Android OS.


Introduction

If this is your first time working with a Phidget, we suggest starting with the Getting Started page for your specific device. This can be found in the user guide for your device. That page will walk you through installing drivers and libraries for your operating system, and will then bring you back here to use Android specifically. Android is capable of using the complete Phidget API, including events. We also provide example code in Android for all Phidget devices.

List all frameworks or IDEs supported in this version

Quick Downloads

List of download links, to be added once files are available

Documentation

Example Code

Libraries and Drivers

Getting Started with Android Java

If you are new to writing code for Phidgets, we recommend starting by running, then modifying existing examples. This will allow you to:

  • Make sure your libraries are properly linked
  • Go from source code to a test application as quickly as possible
  • Ensure your Phidget is hooked up properly

Android

Describe Phidget library includes, and detail a step-by-step guide to get examples running in each supported IDE

  • Eclipse (3.1+)
  • Eclipse (Older than 3.1)
  • Android Studio

Edit the Examples

By following the instructions for your operating system and compiler above, you probably now have a working example and want to understand it better so you can change it to do what you want. This teaching section has resources for you to learn from the examples and write your own. Your main reference for writing Android code will be the Phidget22 API Manual:

Link to API manual

Example Flow

Walk through "Hello world" example for this language

Code Snippets

Write blocks of code for each simple concept, using interfaceKit objects as example

Step One: Initialize and Open

Step Two: Wait for Attachment (plugging in) of the Phidget

Step Three: Do Things with the Phidget

Step Four: Close and Delete

Futher Reading

Phidget Programming Basics - Here you can find the basic concepts to help you get started with making your own programs that use Phidgets.

Data Interval/Change Trigger - Learn about these two properties that control how much data comes in from your sensors.

Using Multiple Phidgets - It can be difficult to figure out how to use more than one Phidget in your program. This page will guide you through the steps.

Polling vs. Events - Your program can gather data in either a polling-driven or event-driven manner. Learn the difference to determine which is best for your application.

Logging, Exceptions, and Errors - Learn about all the tools you can use to debug your program.

Phidget Network Service - Phidgets can be controlled and communicated with over your network- either wirelessly or over ethernet.

Common Problems and Solutions/Workarounds

If you know of common problems using this lanaguage (for example, having to create sub-VIs when using multiple phidgets in labview) put them here.