Stillwater Embedded Engineering

Hardware, Software, Firmware, and Everything

Category: Android Apps

Multiple Exit Points in Java

Good PAndroidStudioTipMultipleExitrogramming Practice?

I may date myself and/or expose some naivety about general good programming practice, but I have been under the impression that multiple exit points from a function or method is bad practice.  In my opinion, it is bad practice because there is more code to check in the event that the function or method has a signature change and returns a different type.  You need to check all return statements and verify that all return values are cast or declared to be the proper type.  On the other hand, when writing the method / function, it can be more work to structure the code to return different values under different conditions.

Read More

Android Studio Niceties

There was a bit of a learning curve to using Android Studio, but not as steep as it was to get the Android SDK running in Eclipse.  Android Studio is based on Jetbrains IntelliJ IDEA, which is a mouthful and a whole new IDE for an Eclipse user.

But here is an example  of the niceties that may or may not have been available in the former Eclipse based Android IDE.

Read More

Samsung phone repair. New screen, touchpad, case for $11

New phone cheaper than the parts it supplies.

My Samsung Intercept M910 has a slide-out keyboard, and over the years, a couple of screen repairs and many drop incidents finally caused the flex cable attaching the screen to the main board to give out.  A dis-assembly procedure on iFixit got me through the screen repairs, but there was no detail of a hidden part of the LCD flex cable, which wraps around itself and  a mounting board is mysteriously attached to the slider assembly.  I found replacement cables on eBay, and the pictures there gave me an idea what it looks like and how to detach it.

Read More

Use wget to debug remote XML feeds using XmlPullParser

I was working on an Android app, jata which depends on getting data from a web based server which uses XML  I tried using an Android Document object  org.w3c.dom.Document and it worked well, but I switched to using an XmlPullParserfor performance reasons

Read More

Recursively Clear Directory with PHP

I was working on a PHP program that reads  zipped files, extracts wanted files, stores the contents in a MySql database, and finally cleans up the contents of a local tmp directory.  I develop and debug the program on a local LAMP server, then upload and test it on a public web server.  I thought it was all finished, when I noticed that the public server printed out some PHP warnings that it was trying to unlink a directory, rather than a file.

Read More

jata development

jata development issues

Issues of general interest that do not reveal the secret sauce recipe of jata.

Read More

jata

jata – an Android transit app

The Predictions view is the main goal of jata. Getting you there is explained below.

Description

Jata is an Android application that displays arrival times for buses and trains.  It currently works with agencies that use the Clever Devices BusTime system.  Specifically:

  • CTA – Chicago Transit Authority
  • CCCTA – Central Contra Costa County
  • PSTA – Pinellas Suncoast Transit Transit Authority
  • WRTA – Worcester Regional Transit Authority

Version 1.2.2 makes it easier to select routes by adding a route description on the routes screen.

More BusTime agencies can be added; read more below.

Read More

Powered by WordPress & Theme by Anders Norén