Stillwater Embedded Engineering

Hardware, Software, Firmware, and Everything

Jata App and WRTA changes

The WRTA is changing schedules, routes, and fares, and this may affect the operation of just another transit app.  In fact I got a request from a user to update jata, and I replied:

Hi Ginny,
 
 Thank you for using jata.  And for your work summarizing the WRTA changes.
 
 A main strategy used when I wrote jata is that it uses live data from the internet, and schedule changes should not affect it.  There ARE some steps you can do to make sure that any schedule changes are  reflected in the app.  
 This describes the current (v1.3.8) jata.   Some older versions do not have a settings button on the main screen,  but have a different method to access the settings.
  • In the Jata main screen tap the "Settings" button (lower right)
  • In the "Caching" section, there is a button "Clear Cache".  Tap this.  Another Screen "Cache Options" should appear.  Select WRTA, and tap "Clear Selected"
  • Use the back button to return to main screen.  Route numbers, names, and stops should be updates per the new schedules.  Arrival times are not cached, and should agree with the WRTA bustracker web site.
 Caveat 1:  Any Favorites which have changed (route or stop has been removed) will not be updated.  You will have to check these.  
 
 Caveat 2:  WRTA route descriptions come from a separate web site, and are incorporated into jata using a tool at my own web site.  So getting route descriptions on the route screen will depend on the WRTA updating their gtfs file at  http://www.eot.state.ma.us/developers/  This site seems down right now and I may need to work on this.  Note that this complication arises due to WRTA's implementation of the Clever Devices tracking system.  Route descriptions could be available on the WRTA tracker site (Chicago Transit Authority includes them), but they are (or were) not.
 
 Please report any problems to me.  I will be checking how it behaves on Monday.
 
 Thanks again,
 Joe

Regarding the above Caveat 2, I have contacted WRTA about the location of the gtfs file and with luck I can update jata and/or jata-glue to obtain route descriptions.

Keep on tripping!

Joe

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

Hacked by The People of God?

I was looking into some glue code that supports my jata android app because some bus routes had been added at the WRTA.   I immediately saw some foreign PHP code pre-pended to my own code.   The rogue code contains a function “live_stats()” which fiddles with a bunch of $_SERVER variables and either ships data to, or  receives data from the People of God web site.   The actual URL in the rogue code is http://www.pogpgh.org/session.php?id  This rogue code has been attached to more than one index.php files on my site.

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

Using Tropo SMS gateway with BusTracker

SMS Bustracker works with “Obama Phone”

TropoBustracker

A pinch of Tropo, a dash of Bustracker, fold in a pound of jata with PHP, bake for an hour and you have jata-sms.

My Android smartphone suffered a breakdown last week.    New parts should arrive soon.  But in the meantime, I was at a loss without my favorite Android app jata.  I use it to get bus arrival times with the local WRTA Bustracker.  Bustracker has a text message interface, and I thought I would try that with the backup TracFone (Safelink Obamaphone[1]).  That didn’t work.  The TracFone Terms and Conditions states that “TracFone does not generally participate in Premium SMS services or campaigns.”  The Bustracker SMS number is 41411, a shortcode for Textmarks, and I guess Textmarks is a premium service.  Then, I remembered Tropo, a gateway for voice and SMS.  It offers a free developer account and phone number, and now I had a motivation to work with it.

Read More

  1. [1]There could be a whole other discussion about giving away the razors (phones) to sell the blades (20 ¢ / min airtime), but I’ll leave that for another day.

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

LibreOffice: Problem exporting as PDF with PDF/A option

AdobeReaderFontProblem

What Adobe Reader users saw when viewing my resume. The font for the position title displayed as blobs.

 

 

 

 

I should blame my own frugality, because I use mostly free tools for Office tasks.  I’m using LibreOffice for tasks that most PC users would use Microsoft Office to accomplish.  LibreOffice Writer serves as my Microsoft Word.  Frugality also entered into my decision to use Foxit rather than Adobe Reader for viewing PDF file.  You see, Adobe tends to bog down slower machines and I’ve had my share of slow machines over the years.

Read More

HTML Frame Titles

frametitledemoI had a job where the PCs were locked down such that only approved applications and web sites are allowed.  The company maintains a web page of reference documents.  Let’s call it “Genius”. 

Read More

Optimizing MySQL tables “on the fly” for gtfs data

I’ve been importing gtfs files into MySQL tables. There is a wide variation between data types for different agencies, as there is no standard for data types. For instance, GTFS trips.txt has a trip_id column, where a typical value is  “94108050”, but PSTA has “973379-JUN13-HQ-Weekday-02-0000100”!

Read More

WordPress Blog Spam Control with ReCAPTCHA and Akismet

First of all, even though it’s been almost a year since I started using WordPress blogging software I still feel like a newcomer.  And that’s OK, as I;m focusing on other things like Android programming, and some web programming, including HTML, JavaScript, PHP, MySQL and even database design.  Those are the current tasks,  Wordpress is a tool to record some of my experiences, as well as a vehicle to deliver my profound insights to my spellbound  readers.

Read More

Page 1 of 3

Powered by WordPress & Theme by Anders Norén