Final Project – Clemson Physical Therapy

Final Project – Clemson Physical Therapy

device-2014-04-28-215835

The Online User Manual is at http://people.cs.clemson.edu/~jburto2/PhysicalTherapy/UserGuide.html

The Promotional Video is at http://people.cs.clemson.edu/~jburto2/PhysicalTherapy/Clemson%20Physical%20Therapy%20App%20Video.m4v

The Code is at GitHub: https://github.com/everetw/Clemson-Physical

Note: You will need to download the Apache Commons IO library and add it to your buildpath to be able to compile this program.

The Project zipfile, including the full user manual, technical manual, source code, and promotional video can be found on Dropbox https://www.dropbox.com/s/mug6tfdi6fd3grf/4.PhysicalTherapy.P8.zip

Advertisements
Posted in Android Development, Final Project

Progress Report P6

Progress Report P6

 

The progress report P6, including the APK, source code, and all documents can be found on Google Drive.

https://drive.google.com/file/d/0B__6alncWRpeMUFjZXJVellWWTQ/

Posted in Final Project, Progress Updates

Android Emulator Running Slowly?

Android emulator running slowly?

This is normal. The Android emulator works by using qemu to emulate an ARM processor on your Intel machine. What this means is that all processor instructions must be translated from Intel->ARM before your Android can execute them. Even with an i7 processor and plenty of RAM, this is S-L-O-W.

Solution? Android x86!

This Stackoverflow thread has several solutions to the performance problem. http://stackoverflow.com/questions/1554099/why-is-the-android-emulator-so-slow Basically, you install the Intel x86 Android images and run them through your hardware’s virtualization support, instead of an emulator. This thread from Intel tells you how to do it. http://software.intel.com/en-us/articles/installing-the-intel-atom-x86-system-image-for-android-emulator-add-on-from-the-android-sdk

Basically, you install the x86 images through Eclipse, then the appropriate virtualization software for your OS (this is discussed in the comments). Images for Windows and Mac can be found here: http://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager (Linux uses kvm, which is part of the kernel.) Then, when you build an Android image, you set the CPU/ABI to Intel Atom (x86).

Note: If you are running Windows 8.1 or Mac OS X Mavericks, be sure to download the hotfix from Intel’s website. The “regular” version will crash your machine.

Does it work?

There seem to be some problems with the Kit-Kat (4.4.2) image, but the JellyBean (4.2.2) image works just fine. Under ARM emulation, videos were unplayable, even on the smallest screens. Under Intel x86, I am able to get smooth, fluid video on an emulated Nexus 10, a HUGE improvement.

 

Tagged with: , ,
Posted in Uncategorized

Camera Example

Camera Example

By: James Burton

If anyone is looking for some help with the Android Camera API, I have created a small demonstration program that does the following:

  • Select Image from Gallery
  • Take Picture and Store in External Storage
  • Select Video from Gallery (and display thumbnail)
  • Take Video (3gp) and Store in External Storage
  • Take HD Video (mp4) and Store in External Storage

Screen Shot 2014-04-09 at 3.57.11 PM

Actions are menu items.

Code is at https://github.com/jdburton/Camera-Example

Doxygen Documentation is at http://jdburton.github.io/Camera-Example/files.html

This project is (c) 2014 and licensed under the MIT license.

Posted in Uncategorized

Physical Therapy Project – Final Proposal

The final proposal is available on Google Docs.

https://drive.google.com/file/d/0B__6alncWRpeYXdZdXFTdWpLRlE/edit?usp=sharing

Posted in Uncategorized

Assignment 4 – Car Maintenance 0.2

Car Maintenance

Version: 0.2

By: James Burton

This program implements a database that keeps track of maintenance for your various vehicles. It can be used by an individual, a family, or a fleet/motor pool.

Add information into the tables on the screen. Each screen corresponds to a table in the schema.

This is an updated and enhanced version of Car Maintenance 0.1.

Database Schema

Assignment4

Vehicle: Vehicle (e.g. Batmobile)

Item: Maintenance Item (e.g. Change the oil every 5000 miles or 6 months.)

Location: Service shop. (e.g. Jiffy Lube)

Receipt: All work done at a location, and date (e.g. Service at Jiffy Lube on 2/22/2014)

Work: Work performed (e.g. Change the oil as part of service done at Jiffy Lube on 2/22/2014 for Batmobile).

(Note: The menu option Create Data on the main screen creates a sample database for testing purposes.)

MySQL database schema:

SQLite database schema:

Changes for 0.2:
Timestamps were added, but not used. Also mileage was moved from Receipt table to Work table because of it’s association with a Vehicle.

This schema applies to both the internal and the external database. Data is stored on the external database and mirrored on the internal database for caching purposes. The only difference between the schemas is that are indices are only automatically generated on the external database.

Currently, the app assumes the external data is always right and the internal data is expendable. Data integrity is maintained by the internal SQLite database not being updated unless the external MySQL database has been successfully updated. A menu option on the main screen will force a refresh of the internal database from the external database.

Download

Source: https://github.com/jdburton/CarMaintenance

Latest Binary: https://github.com/jdburton/CarMaintenance/blob/master/bin/CarMaintenance.apk

Screenshots

New Functionality:

Home screen with Preferences button and Menus

Home screen with Preferences button and menus

Screen Shot 2014-03-09 at 1.01.59 PM

Preferences screen

Work Screen with Autosave enabled. Notice Detail Icon and no Save icon.

Work Screen with Autosave enabled. Notice Detail Icon and no Save icon.

Work detail screen with receipt image.

Work detail screen with receipt image.

Receipt screen with image

Receipt screen with image

Receipt Detail screen with image and camera icon.

Receipt Detail screen with image and camera icon.

Image capture screen to take pictures of receipt images. Receipts are automatically removed on receipt delete.

Image capture screen to take pictures of receipt images. Receipts are automatically removed on receipt delete.

Select with green color theme.
Select with green color theme.

Preferences

Autosave

  • Should App automatically save changes or require you to press save button?

Color Theme

  • Color for table selection highlighting. Default is Blue.

BaseURL

  • URL location of scripts to access external database. Be sure to include trailing /

Cool Stuff

Version 0.2

  • Multiple color select on table screens.
  • Detail screens for Work and Receipt tables.
  • Image capture.
  • File I/O. Receipt images are saved in Application directory on the external SD card.
  • Database synchronization.

Version 0.1

  • Date Picker Dialog
  • Image Selection from Android gallery
  • Dynamically generated spinners
  • Dynamic table generation
  • HTML about page
  • Multiple action bars

Acknowledgements

In addition to all the help I received from Car Maintenance 0.1.

Images

Started with this http://developer.android.com/training/camera/photobasics.html BUT, the tutorial has an error. See http://stackoverflow.com/questions/13912095/java-lang-nullpointerexception-on-bundle-extras-data-getextras

Android Hive working with Camera API: http://www.androidhive.info/2013/09/android-working-with-camera-api/

Rotating images from http://www.higherpass.com/Android/Tutorials/Working-With-Images-In-Android/3/

Dialog to pick image from camera: http://stackoverflow.com/questions/10165302/dialog-to-pick-image-from-gallery-or-from-camera

How to delete a file: http://www.mkyong.com/java/how-to-delete-file-in-java/

Detail Screens

Passing an object in an intent: http://www.tutorialspoint.com/java/java_serialization.htm

Preferences

Preferences from http://developer.android.com/guide/topics/data/data-storage.html

Settings dialog derived from information at http://developer.android.com/guide/topics/ui/settings.html

Radio button in preferences: http://stackoverflow.com/questions/6148952/how-to-get-selected-text-and-value-android-listpreference and http://stackoverflow.com/questions/4966816/how-to-create-radiobutton-group-in-preference-xml-window

Database

Everything you need to know about connecting an Android application to a MySQL database via PHP. BEST. TUTORIAL. EVER. http://www.androidhive.info/2012/05/how-to-connect-android-with-php-mysql/

Testing http POST/GET with curl http://stackoverflow.com/questions/1087185/http-testing-tool-easily-send-post-get-put

Workaround for truncating table that is a foreign key in MySQL: http://stackoverflow.com/questions/5452760/truncate-foreign-key-constrained-table

Other

Eclipse PTI-PHP Tool integration plugin. Available in the Eclipse Marketplace. Update site is at http://www.phpsrc.org/eclipse/pti/

MacOS Mavericks built-in Apache server. Great for development testing.

Tagged with:
Posted in Android Development

Final Project – Initial Proposal

Clemson Therapy and Rehab Physical Therapy App

For my final project, I will be working with Everett Williams to develop the Clemson Therapy and Rehab Physical Therapy App.

This app is intended to help Physical Therapists and their patients. Physical therapy patients will use the video recording feature to record the patient doing their exercises, analyze the video, and notify them about whether they are doing them correctly.

You can read the official proposal on Google Docs.

https://docs.google.com/document/d/1wRnmibHciHJ13vG_AjDC6nsGCdE1Z64REL_MZ9EDhpY/edit?usp=sharing

 

Posted in Final Project