Coder Social home page Coder Social logo

opentripplanner-for-android's Introduction

OpenTripPlanner for Android Build Status Join the chat at https://gitter.im/CUTR-at-USF/OpenTripPlanner-for-Android

NOTE: This application isn't being actively maintained. Please check out OneBusAway instead, which uses OpenTripPlanner to plan trips. See the OneBusAway Android System Architecture docs for details.

An Android app for multi-modal trip planning and navigation using any OpenTripPlanner server.

See more details on the wiki.

Like hacking things? See our Developer Guide to get started.

Build Setup

Prerequisites for both Android Studio and Gradle

  1. Download and install the Android SDK. Make sure to install the Google APIs for your API level (e.g., 17), the Android SDK Build-tools version for your buildToolsVersion version, and the Android Support Repository and Google Repository.
  2. Set the "ANDROID_HOME" environmental variable to your Android SDK location.
  3. Set the "JAVA_HOME" environmental variables to point to your JDK folder (e.g., "C:\Program Files\Java\jdk1.6.0_27")

Building in Android Studio

  1. Download and install the latest version of Android Studio.
  2. In Android Studio, choose "Import Project" at the welcome screen.
  3. Browse to the location of the project, and double-click on the project directory.
  4. If prompted with options, check "Use auto-import", and select "Use default gradle wrapper (recommended)". Click "Ok".
  5. Click the green play button (or 'Shift->F10') to run the project!

Building from the command line using Gradle

  1. To build and push the app to the device, run gradlew installDebug from the command line at the root of the project
  2. To start the app, run adb shell am start -n edu.usf.cutr.opentripplanner.android/.MyActivity (alternately, you can manually start the app)

Release builds

To build a release build, you need to create a "gradle.properties" file that points to a "secure.properties" file, and a "secure.properties" file that points to your keystore and alias. The gradlew assembleRelease command will prompt for your keystore passphrase.

The "gradle.properties" file is located in the opentripplanner-android directory and has the contents:

secure.properties=<full_path_to_secure_properties_file>

The "secure.properties" file (in the location specified in gradle.properties) has the contents:

key.store=<full_path_to_keystore_file>
key.alias=<key_alias_name>

Note that the paths in these files always use the Unix path separator /, even on Windows. If you use the Windows path separator \ you will get the error No value has been specified for property 'signingConfig.keyAlias'.

Contributing

We welcome contributions to the project! Please see our Contributing Guide for details, including Code Style Guidelines and Template.

Troubleshooting

When importing to Android Studio, I get an error "You are using an old, unsupported version of Gradle..."

If you're using Android Studio v0.4.2 or lower, when importing, please be sure to select the "settings.gradle" file in the root, NOT the project directory. You will get the above error if you select the project directory / name of the project.

I get build errors for the Android Support libraries or Google APIs

Open Android SDK Manager, and under the "Extras" category make sure you've installed both the "Android Support Repository" (in addition to the "Android Support library") as well as the "Google Repository". Also, make sure you have the Google API installed for the API level that you're working with in the "/build.gradle" file, including the "Android SDK Build-tools" version (at the top of the "Tools" category in the Android SDK Manager) that matches the compileSdkVersion and buildToolsVersion numbers in /opentripplanner-android/build.gradle.

I get the import gradle project error - “Cause: unexpected end of block data”

Make sure you have the Google API installed for the API level that you're working with in the /build.gradle file, including the "Android SDK Build-tools" version (at the top of the "Tools" category in the Android SDK Manager) that matches the compileSdkVersion and buildToolsVersion numbers in /opentripplanner-android/build.gradle.

Android Studio or Gradle can't find my Android SDK, or the API Levels that I have installed

Make sure that you're consistently using the same Android SDK throughout Android Studio and your environmental variables. Android Studio comes bundled with an Android SDK, and can get confused if you're pointing to this SDK within Android Studio but have your environmental variables pointed elsewhere. Click "File->Project Structure", and then under "Android SDK" make sure you "Android SDK Location" is the correct location of your Android SDK.

Also, make sure you've set the "ANDROID_HOME" environmental variable to your Android SDK location and the "JAVA_HOME" environmental variables to point to your JDK folder.

OpenTripPlanner Project

Want to learn more about the main OpenTripPlanner project? Read up here:

http://opentripplanner.org

opentripplanner-for-android's People

Contributors

appoll avatar barbeau avatar bitdeli-chef avatar diegoguidotti avatar gitter-badger avatar hbruch avatar kalon33 avatar ktran9 avatar laurentg avatar marchica avatar rjvitorino avatar shyamsunder007 avatar vreixo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opentripplanner-for-android's Issues

App crashes when Settings activity is opened on non U.S. locales

Hi guys,
I download this app from Google play store and play it, but i can not open this app again when i first closed this app and the error is opentripplanner unexpected closed. Another problem is unexpected closed when i click on the menu of Settings and i cannot open this app again when it has unexpected closed, so i must uninstall the app and Reinstall the app again. Should anyone know what is the problem? thank you very much.

Support versioning for the REST API

Currently, this app can only support a single REST API version, based on POJOs defined in the opentripplanner-pojos-unversioned project. If there are many OTP server installations, they will most likely have different versions of the server REST API as changes are made to the OTP server REST API.

This project should be able to detect and communicate with OTP servers running multiple versions of the OTP server REST API.

The OpenTripPlanner opentripplanner-api-webapp project now supports a new serverInfo REST API method that can be used to determine the OTP server Maven version:
http://www.opentripplanner.org/apidoc/el_ns0_serverInfo.html

Here's an example using the URL from TriMet's server:
http://rtp.trimet.org/opentripplanner-api-webapp/ws/serverinfo

Example response:


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<serverInfo>
    <serverVersion>
        <version>0.9.1-SNAPSHOT</version>
        <major>0</major><minor>9</minor>
        <incremental>1</incremental>
        <qualifier>SNAPSHOT</qualifier>
        <commit>de91d05ef4bff7d22ef0b3bec8991625b3b2c797</commit>
    </serverVersion>
    <cpuName>Intel(R) Xeon(R) CPU           X5660  @ 2.80GHz</cpuName>
    <nCores>24</nCores>
</serverInfo>

The ServerInfo method is not supported in OTP Server versions 0.8.0 and lower.

Starting in 0.9.0 it is available.

So, we can have one REST format for 0.8.0 and lower, and then start versioning support with 0.9.0 and higher.

Going forward, we should suggest that all OTP server instances that want to interface with the Android app should upgrade to 0.9.0 or higher, so ensure the Android app can communicate with the server.

Here's an example of a legacy URL (unknown version) is:
http://opentripplanner.usf.edu/opentripplanner-api-webapp/ws/plan?fromPlace=28.066788,-82.410104&toPlace=28.059324,-82.415394&mode=TRANSIT,WALK&min=QUICK&maxWalkDistance=840&time=2:49%20pm&date=10/24/2012&arr=Depart&itinID=1&wheelchair=false

One possible implement for supporting different versions of OTP server project classes internally in Android (for XML/JSON data binding) is to implement our own classloader. Apparently this is possible in Android, see this post:
http://stackoverflow.com/questions/3022454/how-to-load-a-java-class-dynamically-on-android-dalvik

Here's the link to the DexClassLoader example they discuss in the Android source (the link on Stackoverflow post is currently broken - I've submitted an edit to fix it):
https://github.com/android/platform_dalvik/blob/master/tests/071-dexfile/src/Main.java

Using this strategy, we can have multiple JAR files that contain OTP server library container classes (with the same OTP package/class names) in the Android app, one for each REST API version:
opentripplanner-legacy.jar
opentripplanner-0.9.0.jar
opentripplanner-0.9.1.jar
opentripplanner-0.9.2-SNAPSHOT.jar (most recent version as of Oct. 25, 2012)
... (future releases to be added)

Then we implement our own class loader to pull the package/class from the JAR version we want, based on the REST API version, with something like:

if(serverVersion.getVersion().equalsIgnoresCase("0.9.1"){
    String jarFile = "path/to/opentripplanner-0.9.1.jar";
    DexClassLoader classLoader = new DexClassLoader(jarFile, "/tmp", null, getClass().getClassLoader());
    Class<?> myClass = classLoader.loadClass("MyClass");
}

Another option, probably simpler to implement once but harder to automated because it requires repackaging POJOs into new packages - we just define a common interface for the Response object, and put the different classes from different OTP server versions in their own versioned packages (e.g., org.opentripplanner.v9-0-1), see this post for details.

Note that OTP server classes are now using Project Lombak for generating setters/getters, so we need to modify the Android project to include this library:
http://projectlombok.org/setup/android.html

To make this update process easier it would be nice if we could automate the process of converting server-side OTP classes into classes compatible with Jackson. Check out this post for possible ant script to do this:
http://stackoverflow.com/questions/12302902/use-jaxb-xjc-generated-classes-in-android

Not possible to zoom further on certain tiles as it should be

If you set Google Normal tiles you can do a very high zoom, but if you set Google Terrain tiles and after Google Normal tiles again zoom is much more limited.

The limiter created to avoid custom tiles "black screen" error if zoom is too much for them is being triggered. The variable that control this is the maxZoomLevel which has incorrect values.

This bug is because the getMaxZoomLevel call does not work well (it return the value of the previous map set) if it's called just in the next line to setMapType when the map is not even visible. As this setting can only be used through settings menu a solution to this bug is to call getMaxZoomLevel in onResume, where always gets updated results.

This bug only affects Google Maps tiles, because for "custom tiles" there is no such call as getMaxZoomLevel and maxZoomLevel is stored per tile server in the XML integers file.

issues about save and display old trip

Dear all,
I want to save the trip and when i want to see this old trip, i can click a listview and show different old trip on the map. i want to ask which code on opentripplanner-android is used to get the information which used to draw trip path on maps(maybe is a jackson Config information but i am not sure). so anyone can help me if you know how to solve this issue.Thank you very much.

Problem with date & time spinners and ScrollView

If the screen is too small and the date and time spinners don't fit entirely in the screen is very difficult to move them (only good solution is to press on them and set with the popup keyboard the values) because the drags on the screen move all the layout instead of the spinner values.

My guess is that the ScrollView is talking all the touches instead of the ScrollSiew.

This problem is present in a Huawei G300 device with Android ICS, my other test device Sony Xperia P with Jelly Bean 4.1.2 moves correctly the spinner if it's clicked and moves the layout if what is pressed is the area outside of the spinner.

The screenshot is for the Jelly Bean device because I don't have access right now to the other mobile, but I think that would help to understand the situation.

screenshot_2013-09-25-18-04-37

Can't manually select server when "Auto-Detect OTP Server" option is de-selected

By default the app is set to auto-detect the OTP server to communicate with based on the OTP Directory in the Google Doc spreadsheet and the user's real-time location. So, the first time the app starts it picks a server to communicate with.

If you de-select the "Auto-Detect OTP Server" option in the Settings, the app continues to use and auto-select the server instead of prompting the user to manually pick the OTP server they want to use.

geocoder in Android app works less often than in web/server OTP

Entering "Lib" (without the quotation marks) in the destination box of the server version of OTP will return "LIB" (without quotation marks) and a destination pin on the USF library just east of Leroy Collins. Doing this in the Android version yields a message box "Geocoder Results Sorrty, the address returns no geographical location". While double-checking this in the server/web version, I noticed that sometimes it finds the LIB and sometimes says it can't but puts a pin there and routes correctly anyway. So it may be that there is some kind of server error as well.

Update to Android Maps API V2.0

We're currently using OSMDroid with map tiles from the MapQuest server. In V1 of the Android Maps API, there was a nearly 1-to-1 match between OSM map functionality and Android Maps API. Also, at the time Google's map tiles didn't have many walking path, and therefore to match pedestrian/bike paths with planned route path we chose OSMDroid. However, many new features have been added in V2 of the Android Maps API that make it more visually-appealing and feature-rich than OSMDroid:

https://developers.google.com/maps/documentation/android/

We should evaluate switching to the new V2 Android Maps API.

Strange behavior selecting servers

Selected server is changed after restart if autodetect is not selected.

Steps to reproduce the problem:

  1. Uncheck Autodetect OTP server.
  2. Set a custom server.
  3. Press on refresh server list and choose one random server.
  4. Exit.
  5. Open app.
  6. Custom server is selected.

Launcher icon is too small on xhdpi devices

On my Samsung Galaxy S3, the OTP app icon on both the launcher and my home screen appears very small:

image

It appears the incorrect image ic_launcher_opentripplanner.png is in the res/drawable-xhdpi folder.

We need to put the correct image size in that folder (see Android docs on icons).

We should probably check the icon sizes on other size screens to make sure they are correct (can be done in the emulator too).

@vreixo, could you take a look at this and see if you have the correct icon size somewhere?

Add javadoc to some functions

For some classes there are some important functions that will be more comfortable to use if they would have some documentation.

To fix this I'm creating javadoc documentation for them.

Other problems setting the custom server

I have found some unexpected behavior regarding this part:

  • When a custom server is selected some rare times the app crashes. This is because the server is changed with the method onSharedPreferenceChanged of the principal fragment, that is triggered directly when the app is in the settings activity. So, the fragment can be not attached to any activity, causing the calls to it to crash the app.
    There were some calls that tried to get the activity when the server was changed, so changing them to don't need the activity has solved the problem.
  • When the user inputs a custom server URL and it is correct the selected custom server gets unselected. This way the server meta data is updated only when the "selected custom server" preference change, was a more easy way.
    As this may result uncomfortable I have fixed this. Now if the server was selected it does not get uselected if the custom url changes, and the server information is updated in the map.
    This works because the returning intent from settings to the core activity tells to this to call a method of the principal fragment (this fragment is accessible from that activity) to update the map and the server.

Trip plan fails on non-U.S. locales

Reported by Ricardo Reis da Silver.

Steps to reproduce:

  1. Turn on OTP
  2. Plan a trip in Porto
  3. Disable automatic server detection
  4. Select Tampa
  5. Plan a trip

Result from Logcat:


05-22 19:59:44.239 I/DateUtils(25325): 07:59Depois do meio-dia didn't parse
05-22 19:59:44.239 I/DateUtils(25325): java.lang.NumberFormatException: unable to parse '59DEPOIS DO MEIO-DIA' as integer
05-22 19:59:44.239 I/DateUtils(25325):  at java.lang.Integer.parse(Integer.java:383)
05-22 19:59:44.239 I/DateUtils(25325):  at java.lang.Integer.parseInt(Integer.java:372)
05-22 19:59:44.239 I/DateUtils(25325):  at java.lang.Integer.parseInt(Integer.java:332)
05-22 19:59:44.239 I/DateUtils(25325):  at org.opentripplanner.util.DateUtils.secondsPastMidnight(DateUtils.java:179)
05-22 19:59:44.239 I/DateUtils(25325):  at org.opentripplanner.util.DateUtils.secPastMid(DateUtils.java:129)
05-22 19:59:44.239 I/DateUtils(25325):  at org.opentripplanner.util.DateUtils.toDate(DateUtils.java:45)
05-22 19:59:44.239 I/DateUtils(25325):  at org.opentripplanner.api.ws.Request.setDateTime(Request.java:242)
05-22 19:59:44.239 I/DateUtils(25325):  at edu.usf.cutr.opentripplanner.android.fragments.MainFragment$4.onClick(MainFragment.java:460)
05-22 19:59:44.239 I/DateUtils(25325):  at android.view.View.performClick(View.java:2485)
05-22 19:59:44.239 I/DateUtils(25325):  at android.view.View$PerformClick.run(View.java:9080)
05-22 19:59:44.239 I/DateUtils(25325):  at android.os.Handler.handleCallback(Handler.java:587)
05-22 19:59:44.239 I/DateUtils(25325):  at android.os.Handler.dispatchMessage(Handler.java:92)
05-22 19:59:44.239 I/DateUtils(25325):  at android.os.Looper.loop(Looper.java:130)
05-22 19:59:44.239 I/DateUtils(25325):  at android.app.ActivityThread.main(ActivityThread.java:3683)
05-22 19:59:44.239 I/DateUtils(25325):  at java.lang.reflect.Method.invokeNative(Native Method)
05-22 19:59:44.239 I/DateUtils(25325):  at java.lang.reflect.Method.invoke(Method.java:507)
05-22 19:59:44.239 I/DateUtils(25325):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:875)
05-22 19:59:44.239 I/DateUtils(25325):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:633)
05-22 19:59:44.239 I/DateUtils(25325):  at dalvik.system.NativeStart.main(Native Method)
05-22 19:59:44.299 D/OTP     (25325): URL: http://env-8084044.jelastic.servint.net/opentripplanner-api-webapp/ws/plan?optimize=QUICK&showIntermediateStops=true&time=07:59Depois do meio-dia&arriveBy=false&wheelchair=false&maxWalkDistance=1600.0&fromPlace=41.15376%2C+-8.673828&toPlace=41.157529%2C+-8.666871&date=05/22/13&mode=WALK
05-22 19:59:44.619 E/OTP     (25325): Error fetching JSON or XML: java.io.FileNotFoundException: http://env-8084044.jelastic.servint.net/opentripplanner-api-webapp/ws/plan?optimize=QUICK&showIntermediateStops=true&time=07:59Depois do meio-dia&arriveBy=false&wheelchair=false&maxWalkDistance=1600.0&fromPlace=41.15376%2C+-8.673828&toPlace=41.157529%2C+-8.666871&date=05/22/13&mode=WALK
05-22 19:59:44.619 W/System.err(25325): java.io.FileNotFoundException: http://env-8084044.jelastic.servint.net/opentripplanner-api-webapp/ws/plan?optimize=QUICK&showIntermediateStops=true&time=07:59Depois do meio-dia&arriveBy=false&wheelchair=false&maxWalkDistance=1600.0&fromPlace=41.15376%2C+-8.673828&toPlace=41.157529%2C+-8.666871&date=05/22/13&mode=WALK
05-22 19:59:44.639 W/System.err(25325):     at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:521)
05-22 19:59:44.639 W/System.err(25325):     at edu.usf.cutr.opentripplanner.android.tasks.TripRequest.requestPlan(TripRequest.java:200)
05-22 19:59:44.639 W/System.err(25325):     at edu.usf.cutr.opentripplanner.android.tasks.TripRequest.doInBackground(TripRequest.java:73)
05-22 19:59:44.639 W/System.err(25325):     at edu.usf.cutr.opentripplanner.android.tasks.TripRequest.doInBackground(TripRequest.java:1)
05-22 19:59:44.649 W/System.err(25325):     at android.os.AsyncTask$2.call(AsyncTask.java:185)
05-22 19:59:44.659 W/System.err(25325):     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
05-22 19:59:44.659 W/System.err(25325):     at java.util.concurrent.FutureTask.run(FutureTask.java:138)
05-22 19:59:44.669 W/System.err(25325):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
05-22 19:59:44.669 W/System.err(25325):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
05-22 19:59:44.669 W/System.err(25325):     at java.lang.Thread.run(Thread.java:1019)
05-22 19:59:44.679 E/OTP     (25325): No route to display!

Support geocoding via local Nominatim instances

Currently geocoding is global, based on either global Nominatim or global Google Places directory. It would be nice to support local instances of Nominatim as well, so geocoding can be controlled based on the currently selected OTP server.

`String.isEmpty()` causing crash on Android 2.2 when side panel is opened

This happened on a Sanyo Zio with Android 2.2.

Open the app, and pull out the side panel where the trip options are located. The panel appears mostly black, hiding the contents, and then the app crashes.

The cause is that String.isEmpty() isn't available on Android 2.2, so we should use TextUtils.isEmpty() instead.

Here's the LogCat output:

09-25 12:30:19.932: V/OTP(1987): http://open.mapquestapi.com/nominatim/v1/search?format=json&q=27.97441%2C+-82.45354&viewbox=-82.8511308,27.6236434,-82.0559399,28.3251809&bounded=1
09-25 12:30:19.952: V/OTP(1987): http://open.mapquestapi.com/nominatim/v1/search?format=json&q=27.97441%2C+-82.45354&viewbox=-82.8511308,27.6236434,-82.0559399,28.3251809&bounded=1
09-25 12:30:21.090: I/global(1987): Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required.
09-25 12:30:21.150: I/global(1987): Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required.
09-25 12:30:21.150: V/OTP(1987): [{"place_id":"38888729","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. http:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"26537453","boundingbox":["27.9709726","27.97761","-82.4535548","-82.4533378"],"lat":"27.9735296","lon":"-82.4533586","display_name":"I 275, Tampa Heights, Tampa, Hillsborough County, Florida, 33603, United States of America","class":"highway","type":"motorway","importance":0.1}]
09-25 12:30:21.170: V/OTP(1987): [{"place_id":"38888729","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. http:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"26537453","boundingbox":["27.9709726","27.97761","-82.4535548","-82.4533378"],"lat":"27.9735296","lon":"-82.4533586","display_name":"I 275, Tampa Heights, Tampa, Hillsborough County, Florida, 33603, United States of America","class":"highway","type":"motorway","importance":0.1}]
09-25 12:30:21.300: V/OTP(1987): I 275, Tampa Heights, Tampa, Hillsborough County, Florida, 33603, United States of America 27.9735296,-82.4533586
09-25 12:30:21.311: V/OTP(1987): I 275, Tampa Heights, Tampa, Hillsborough County, Florida, 33603, United States of America 27.9735296,-82.4533586
09-25 12:30:43.380: W/dalvikvm(1987): threadid=1: thread exiting with uncaught exception (group=0x2aad47d8)
09-25 12:30:43.480: E/AndroidRuntime(1987): FATAL EXCEPTION: main
09-25 12:30:43.480: E/AndroidRuntime(1987): java.lang.NoSuchMethodError: java.lang.String.isEmpty
09-25 12:30:43.480: E/AndroidRuntime(1987):     at edu.usf.cutr.opentripplanner.android.fragments.MainFragment$5.onFocusChange(MainFragment.java:670)
09-25 12:30:43.480: E/AndroidRuntime(1987):     at android.view.View.onFocusChanged(View.java:2666)
09-25 12:30:43.480: E/AndroidRuntime(1987):     at android.widget.TextView.onFocusChanged(TextView.java:6469)
09-25 12:30:43.480: E/AndroidRuntime(1987):     at android.view.View.clearFocus(View.java:2563)
09-25 12:30:43.480: E/AndroidRuntime(1987):     at edu.usf.cutr.opentripplanner.android.fragments.MainFragment$1.onDrawerOpened(MainFragment.java:506)
09-25 12:30:43.480: E/AndroidRuntime(1987):     at android.support.v4.widget.DrawerLayout.dispatchOnDrawerOpened(DrawerLayout.java:488)
09-25 12:30:43.480: E/AndroidRuntime(1987):     at android.support.v4.widget.DrawerLayout.updateDrawerState(DrawerLayout.java:459)
09-25 12:30:43.480: E/AndroidRuntime(1987):     at android.support.v4.widget.DrawerLayout$ViewDragCallback.onViewDragStateChanged(DrawerLayout.java:1348)
09-25 12:30:43.480: E/AndroidRuntime(1987):     at android.support.v4.widget.ViewDragHelper.setDragState(ViewDragHelper.java:866)
09-25 12:30:43.480: E/AndroidRuntime(1987):     at android.support.v4.widget.ViewDragHelper$2.run(ViewDragHelper.java:335)
09-25 12:30:43.480: E/AndroidRuntime(1987):     at android.os.Handler.handleCallback(Handler.java:587)
09-25 12:30:43.480: E/AndroidRuntime(1987):     at android.os.Handler.dispatchMessage(Handler.java:92)
09-25 12:30:43.480: E/AndroidRuntime(1987):     at android.os.Looper.loop(Looper.java:123)
09-25 12:30:43.480: E/AndroidRuntime(1987):     at android.app.ActivityThread.main(ActivityThread.java:4627)
09-25 12:30:43.480: E/AndroidRuntime(1987):     at java.lang.reflect.Method.invokeNative(Native Method)
09-25 12:30:43.480: E/AndroidRuntime(1987):     at java.lang.reflect.Method.invoke(Method.java:521)
09-25 12:30:43.480: E/AndroidRuntime(1987):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:902)
09-25 12:30:43.480: E/AndroidRuntime(1987):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:660)
09-25 12:30:43.480: E/AndroidRuntime(1987):     at dalvik.system.NativeStart.main(Native Method)

Date and time settings are not used

The time and date set in the dialog that is shown after press on the "clock" button are ignored:

  • Retrieved trips don't respect them.
  • Next time the dialog is open the date and time are not the ones set before.

How to separate the trip plan panel in opentripplanner-for-android

I want to move the trip plan panel in Main.xml in opentripplanner-for-android and create a new xml and Activiy, then put the trip plan button editText and span in this new xml and Activity. I do this work for a long time but i find it difficult to transplant. Should anyone have idea or experience to help me. Thank you very much.

API update with option to move map UI elements

Yesterday was announced an update for Maps API V2, which solves this bug http://code.google.com/p/gmaps-api-issues/issues/detail?id=4670 that I have suffered during the development and forced me to do custom Compass and MyLocation buttons.

At least should be worth to check it and try to replace custom Compass button, as it provides useful heading information (that was not possible to add to a custom button as OnCameraChangeListener is not called instantly at all) and is better looking.

One challenge if we use all the stock buttons will be to match the appearance of date and search buttons with them.

http://googlegeodevelopers.blogspot.com.au/2013/09/full-screen-maps-and-new-marker.html

Change map interface to make panel icons/functionality more obvious

Current icons and icon placing for panels/directions screen (for origin/destination input at top of screen, and to display directions using logo in bottom left of screen) aren't clear to user for corresponding functionality.

We should, at a minimum, move the directions icon out of the bottom left corner of the screen and to the middle left of the screen.

Real-time location arrow should also be smaller.

Problems defining and using a "custom server"

If provided URL is not well formed app crashes sometimes on setting server (now I can't reproduce bug but it occurred to me before with the same version of app). Anyway, when server info is checked, once incorrect server is set, app always crash.

Another related problem is that if custom server URL is not changed could not be set again:

  1. Set a custom server.
  2. Select "Tampa" server.
  3. Set exactly the same custom server (either in options menu or in servers list).
  4. Server remains to be "Tampa"

For change again to "custom server" we should a put a different one, accept, and after if we set again the first one (as would be a change) it will work.

Refreshing the server list doesn't seem to work

If you open the app, and tap on Settings->Refresh server list, you get a message saying Can not retrieve actual location, and the "last downloaded" time on the Refresh server list preference doesn't change.

image

Fix default Portland location

From Portland user1:

First, I opened the app. It couldn't immediately detect my location, so it asked for a server. I selected Portland since that's where I am. The map showed a location in rural Clackamas County near Estacada. This was surprising; I was expecting to see an overview of central Portland at some reasonable zoom level (ie that that center of the map should be about the center of the Portland metro area).

From Portland user2:

Starting point is in deep SE by default. Why? Does it need a default start point? Starts with a "my location" but doesn't actually scan for my location.

Integrate real-time information

Real-time information could be retrieved from OneBusAway (OBA) instances, and be added to the mobile UI after a trip is planned.

More advanced integration of real-time info into the trip planning algorithm itself is also possible, but this requires server-side integration between OTP and OBA.

Trip planning for Portland OTP instance is broken

Looks like there were new additions to the API output in v0.9.2-SNAPSHOT that broke the client, discussed in https://groups.google.com/forum/#!topic/opentripplanner-dev/m4tKSXvfwjQ.

06-24 15:00:13.910: D/OTP(22325): startMaker:45.18857, 9.154958
06-24 15:00:13.910: D/OTP(22325): endMaker:45.188509, 9.144058
06-24 15:00:13.910: D/OTP(22325): Optimize:QUICK
06-24 15:00:13.915: D/OTP(22325): TravelMode:WALK,TRAM,SUBWAY,RAIL,BUS,FERRY,CABLE_CAR,GONDOLA,FUNICULAR,TRANSIT,TRAINISH,BUSISH
06-24 15:00:13.915: D/OTP(22325): tripRequest1
06-24 15:00:13.915: D/OTP(22325): tripRequest4
06-24 15:00:13.955: D/OTP(22325): tripRequest6
06-24 15:00:13.955: D/OTP(22325): tripRequest2
06-24 15:00:13.955: D/OTP(22325): tripRequest5
06-24 15:00:13.955: D/OTP(22325): u:http://192.168.0.134:8081/opentripplanner-api-webapp/ws/plan?optimize=QUICK&showIntermediateStops=true&time=03:00PM&arriveBy=false&wheelchair=false&maxWalkDistance=1600.0&fromPlace=45.18857%2C+9.154958&toPlace=45.188509%2C+9.144058&date=06/24/13&mode=WALK,TRAM,SUBWAY,RAIL,BUS,FERRY,CABLE_CAR,GONDOLA,FUNICULAR,TRANSIT,TRAINISH,BUSISH
06-24 15:00:13.955: D/OTP(22325): tripRequest3
06-24 15:00:13.955: D/OTP(22325): URL2: http://192.168.0.134:8081/opentripplanner-api-webapp/ws/plan?optimize=QUICK&showIntermediateStops=true&time=03:00PM&arriveBy=false&wheelchair=false&maxWalkDistance=1600.0&fromPlace=45.18857%2C+9.154958&toPlace=45.188509%2C+9.144058&date=06/24/13&mode=WALK,TRAM,SUBWAY,RAIL,BUS,FERRY,CABLE_CAR,GONDOLA,FUNICULAR,TRANSIT,TRAINISH,BUSISH
06-24 15:00:13.955: D/OTP(22325): url:http://192.168.0.134:8081/opentripplanner-api-webapp/ws/plan?optimize=QUICK&showIntermediateStops=true&time=03:00PM&arriveBy=false&wheelchair=false&maxWalkDistance=1600.0&fromPlace=45.18857%2C+9.154958&toPlace=45.188509%2C+9.144058&date=06/24/13&mode=WALK,TRAM,SUBWAY,RAIL,BUS,FERRY,CABLE_CAR,GONDOLA,FUNICULAR,TRANSIT,TRAINISH,BUSISH
06-24 15:00:14.415: E/OTP(22325): Error fetching JSON or XML: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "stopIndex" (class org.opentripplanner.v092snapshot.api.model.Place), not marked as ignorable (10 known properties: , "orig", "zoneId", "lon", "name", "stopCode", "geometry", "departure", "arrival", "stopId", "lat"])
06-24 15:00:14.415: E/OTP(22325):  at [Source: libcore.net.http.ChunkedInputStream@42964608; line: 1, column: 514] (through reference chain: org.opentripplanner.v092snapshot.api.ws.Response["plan"]->org.opentripplanner.v092snapshot.api.model.TripPlan["from"]->org.opentripplanner.v092snapshot.api.model.Place["stopIndex"])
06-24 15:00:14.425: D/OTP(22325): response:null
06-24 15:00:14.445: E/OTP(22325): No route to display!
06-24 15:00:29.535: D/OTP(22325): direction1:45.18857, 9.154958
06-24 15:00:29.535: D/OTP(22325): direction2:45.188509, 9.144058
06-24 15:00:29.535: D/OTP(22325): direction3:0
06-24 15:00:29.535: D/OTP(22325): direction4:0
06-24 15:00:29.535: D/OTP(22325): direction5:edu.usf.cutr.opentripplanner.android.model.OTPBundle@426c4578
06-24 15:00:29.535: D/OTP(22325): Menu25

We need to update the POJOs accordingly (CUTR-at-USF/opentripplanner-pojos#3).

Address numerous issues (usability, errors) with tests in Portland

The below comments were from several users tests in Portland. The below issues should be split out into separate tickets, we're just documenting here so we don't lose any feedback for now.


I have an original Motorola Droid (it's 2+ years old now) with Android 2.2.3.

I downloaded the app from the Play Store and tried planning two trips with it. Both ended in the same failure to get results of any kind, but the process was different for each and resulted in different errors along the way. Here is what I did:

First, I opened the app. It couldn't immediately detect my location, so it asked for a server. I selected Portland since that's where I am.
The map showed a location in rural Clackamas County near Estacada.
This was surprising; I was expecting to see an overview of central Portland at some reasonable zoom level (ie that that center of the map should be about the center of the Portland metro area).

I didn't/don't understand the significance of the guy with the flag that shows on the map at this point. The compass is a nice touch, but I wasn't able to test whether it does anything or whether I could rotate the map or whatnot.

1st try on planning a trip:

  1. Click on the first address text box since I don't want to use my location (I was inside so it wasn't surprising that this wasn't picked up right away). Immediately get popup box saying that there's no information for this location. This was annoying since I already knew that. I would suggest that this error not appear when you click into the box, but rather if you attempt to click out of it before changing it.
  2. Notice that the My Location text is not behaving the way uneditable placeholder text normally does, and discover that it is actually editable text that I have to delete. This was annoying. It should be uneditable text like the equivalent item in Google Maps.
  3. Enter my home address, "4047 NE 14th Ave".
  4. Click into second address text box. See "Geocoding..." popup. This was annoying because at this point I wanted to type in my next address, not wait for a box. It would be better if this could occur in the background while I'm typing in the next box (not ideal) or during typing in the first box (as Google Maps does, preferable).
  5. Select Portland 97212 as the city/zip when prompted.
  6. Type my work address into the 2nd box, "2525 SW 1st Ave". The geocoding popup doesn't appear when I click out of the 2nd address box...hm.
  7. Select Transit and Bicycle (this is actually a real problem I am trying to solve because we just moved to this office, so I have been trying different transit/bike routes).
  8. Notice lack of bike "custom" optimization. This means the app will rarely produce bike routes I want to take. I am in the middle in my preferences, so that "Safest" routes are too slow and "Quickest" are too dangerous/stressful. This is a feature without which that the app will not be very useful to me (since its main advantage over, say, Portland Transit would be the bike+transit planning).
  9. Click Plan Trip. Nothing actually happens for a long time even though it says "Generating trip".

At this point it was not clear what to do because I didn't see a trip, and I didn't see any way to plan a new trip in the menu. When I pressed back it exited the application instead of taking me back to the planner. There appears to be no way to get a new trip within the app. This was very annoying. I would expect both the back button to take me back, and there to be a menu item for "new trip".

I tried the same sequence again, except this time I entered the city/state for the second location (my work) since it didn't seem to have a chance to geocode it. This time it said I was trying to plan a trip outside the boundary, which I doubt is true because my work is located in the city center (there is a TriMet bus stop less than 300 ft from our front door). So something went wrong, but I don't know what it might be.

I again restarted the app since I couldn't work out how to get a new trip.
When restarted it returns to the middle of nowhere, Clackamas, instead of to the previously-selected location, or the center of Portland.
This was unexpected.

This time I used contact addresses since I figured that at least they would be fully qualified and not difficult to geocode. I took the following steps:

  1. Click on the bookmark next to the first address text box and select "Contact address".
  2. A black screen shows with no information about what is happening. I would expect a "Loading" dialog here while it loads the addresses.
    Eventually they appear.
  3. Select a contact address in Portland.
  4. Repeat the process with the second box.
  5. Leave trip type as Transit.
  6. Think "hm, what about walking distance?" and notice it's not listed in the planner boxes. Check the application settings. Note that walking distance is a setting but it's measured in meters. This is unexpected as the standard (even in OTP apps, on the user side) is fractions of a mile. Also, this is usually a per-trip setting. It's nice to have a default (although I would suggest 800m or 1/2 mile as the default) but it does need to be a per-trip setting as well since you also need to be able to set the bicycling distance, which will be quite different, and adjust based on expected route or mobility level on a given day.
  7. Click "Plan Trip". At this point the geocoded points were not shown on the map. It was still in rural Clackamas, or somewhere else weird.
    This was unexpected; I would have expected to see it show the two points at an appropriate zoom level. Not seeing this meant that at that point I had no idea if the geocoding was correct or how far apart the points are (I happen to know how far apart they are in this case since I am using contact addresses, but generally this would not be the case).
  8. A dialog shows "Generating trip" then "Processing geocoding" then "Generating trip" again. Then the boxes disappear but I cannot see the trip.
  9. Instead of clicking "Back" which I knew would not work, I select "My Location". Then I see my location (which I guess it eventually picked up) and the two points that it has geocoded (which seem correct), but I still don't see the trip.

  1. Some issues with the collapsing button (man with flag) for the to/from dialog at the top. After inputting a destination, I collapsed the dialog to pan the map and couldn't open the dialog again until I force-restarted the program.
  2. Slow tile loading, but understandable.

GPS not released on app exit

After exiting the app (either pressing the "Back" button or Menu->Exit), the GPS notification stays active, indicating that GPS is still turned on. The notification stays active until the phone is restarted or the app is uninstalled.

Confirmed to occur on:
-Samsung Galaxy S3 (U.S. Sprint)
-HTC EVO 4G (U.S. Sprint)

Request geocoding when pressing "plan trip" button

Would be good to improve user's interaction to add the following: if one of the text boxes is already filed, some text is just entered to the other and the search button is pressed (without changing focus or press done in the keyboard before) the geocoding will be processed for that text box and the trip will be requested if we are successful obtaining the address.

This way we will match the behavior if we press "done" in the keyboard and if we press the button in the UI. As it's already done for the keyboard button will be a very simple change, just copy the lines in the keyboard button listener to the listener of the UI.

Now if we press the "plan trip" button before we press the one on the keyboard or we change the focus, a message will be displayed saying that we should input origin and destination first.

screenshot_2013-09-22-22-28-04
screenshot_2013-09-22-22-25-24
screenshot_2013-09-22-22-25-30
screenshot_2013-09-22-22-26-27
screenshot_2013-09-22-22-26-34

App crashes when geocoding origin or destination based on current location

11-20 11:19:55.881: E/AndroidRuntime(22608): FATAL EXCEPTION: AsyncTask #2
11-20 11:19:55.881: E/AndroidRuntime(22608): java.lang.RuntimeException: An error occured while executing doInBackground()
11-20 11:19:55.881: E/AndroidRuntime(22608): at android.os.AsyncTask$3.done(AsyncTask.java:299)
11-20 11:19:55.881: E/AndroidRuntime(22608): at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
11-20 11:19:55.881: E/AndroidRuntime(22608): at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
11-20 11:19:55.881: E/AndroidRuntime(22608): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
11-20 11:19:55.881: E/AndroidRuntime(22608): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
11-20 11:19:55.881: E/AndroidRuntime(22608): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
11-20 11:19:55.881: E/AndroidRuntime(22608): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
11-20 11:19:55.881: E/AndroidRuntime(22608): at java.lang.Thread.run(Thread.java:856)
11-20 11:19:55.881: E/AndroidRuntime(22608): Caused by: java.lang.NullPointerException
11-20 11:19:55.881: E/AndroidRuntime(22608): at edu.usf.cutr.opentripplanner.android.tasks.OTPGeocoding.doInBackground(OTPGeocoding.java:106)
11-20 11:19:55.881: E/AndroidRuntime(22608): at edu.usf.cutr.opentripplanner.android.tasks.OTPGeocoding.doInBackground(OTPGeocoding.java:1)
11-20 11:19:55.881: E/AndroidRuntime(22608): at android.os.AsyncTask$2.call(AsyncTask.java:287)
11-20 11:19:55.881: E/AndroidRuntime(22608): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
11-20 11:19:55.881: E/AndroidRuntime(22608): ... 4 more
11-20 11:19:55.981: D/SensorManager(22608): unregisterListener:: Listener= org.osmdroid.SensorEventListenerProxy@428f 5638
11-20 11:19:55.981: D/Sensors(22608): Remain listener = Sending .. normal delay 200ms
11-20 11:19:55.981: I/Sensors(22608): sendDelay --- 200000000
11-20 11:19:55.981: D/SensorManager(22608): JNI - sendDelay
11-20 11:19:55.981: I/SensorManager(22608): Set normal delay = true
11-20 11:20:03.069: I/Choreographer(22608): Skipped 425 frames! The application may be doing too much work on its main thread.
11-20 11:20:03.639: D/OTP(22608): Released mainFragment with map in MyActivity.onDestroy()
11-20 11:20:03.649: D/OTP(22608): Released all map objects in MainFragment.onDestroy()
11-20 11:20:03.679: E/WindowManager(22608): Activity edu.usf.cutr.opentripplanner.android.MyActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@425 752f8 that was originally added here
11-20 11:20:03.679: E/WindowManager(22608): android.view.WindowLeaked: Activity edu.usf.cutr.opentripplanner.android.MyActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@4257 52f8 that was originally added here
11-20 11:20:03.679: E/WindowManager(22608): at android.view.ViewRootImpl.(ViewRootImpl.java:402)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:311)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:224)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.WindowManagerImpl$CompatModeWrapper.addView(WindowManagerImpl.java:149)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.Window$LocalWindowManager.addView(Window.java:547)
11-20 11:20:03.679: E/WindowManager(22608): at android.app.Dialog.show(Dialog.java:277)
11-20 11:20:03.679: E/WindowManager(22608): at android.app.ProgressDialog.show(ProgressDialog.java:116)
11-20 11:20:03.679: E/WindowManager(22608): at android.app.ProgressDialog.show(ProgressDialog.java:99)
11-20 11:20:03.679: E/WindowManager(22608): at edu.usf.cutr.opentripplanner.android.tasks.OTPGeocoding.onPreExecute(OTPGeocoding.java:72)
11-20 11:20:03.679: E/WindowManager(22608): at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:586)
11-20 11:20:03.679: E/WindowManager(22608): at android.os.AsyncTask.execute(AsyncTask.java:534)
11-20 11:20:03.679: E/WindowManager(22608): at edu.usf.cutr.opentripplanner.android.fragments.MainFragment.processAddress(MainFragment.java:545)
11-20 11:20:03.679: E/WindowManager(22608): at edu.usf.cutr.opentripplanner.android.fragments.MainFragment$3.onFocusChange(MainFragment.java:366)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.View.onFocusChanged(View.java:4566)
11-20 11:20:03.679: E/WindowManager(22608): at android.widget.TextView.onFocusChanged(TextView.java:7588)
11-20 11:20:03.679: E/WindowManager(22608): at android.widget.EditText.onFocusChanged(EditText.java:171)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.View.clearFocus(View.java:4456)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.ViewGroup.clearFocus(ViewGroup.java:775)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.ViewGroup.clearFocus(ViewGroup.java:775)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.View.setFlags(View.java:8485)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.View.setVisibility(View.java:5626)
11-20 11:20:03.679: E/WindowManager(22608): at org.miscwidgets.widget.Panel.onAnimationEnd(Panel.java:489)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.ViewGroup.finishAnimatingView(ViewGroup.java:4968)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.View.draw(View.java:13574)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.ViewGroup.drawChild(ViewGroup.java:2938)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2808)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.View.draw(View.java:13532)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.ViewGroup.drawChild(ViewGroup.java:2938)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2808)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.View.draw(View.java:13532)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.ViewGroup.drawChild(ViewGroup.java:2938)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2808)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.View.draw(View.java:13532)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.ViewGroup.drawChild(ViewGroup.java:2938)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2808)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.View.draw(View.java:13532)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.ViewGroup.drawChild(ViewGroup.java:2938)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2808)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.View.draw(View.java:13532)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.ViewGroup.drawChild(ViewGroup.java:2938)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2808)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.View.draw(View.java:13532)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.ViewGroup.drawChild(ViewGroup.java:2938)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2808)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.View.draw(View.java:13653)
11-20 11:20:03.679: E/WindowManager(22608): at android.widget.FrameLayout.draw(FrameLayout.java:467)
11-20 11:20:03.679: E/WindowManager(22608): at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2394)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.ViewRootImpl.drawSoftware(ViewRootImpl.java:2384)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.ViewRootImpl.draw(ViewRootImpl.java:2277)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2145)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1956)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1110)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4472)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.Choreographer.doCallbacks(Choreographer.java:555)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.Choreographer.doFrame(Choreographer.java:525)
11-20 11:20:03.679: E/WindowManager(22608): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
11-20 11:20:03.679: E/WindowManager(22608): at android.os.Handler.handleCallback(Handler.java:615)
11-20 11:20:03.679: E/WindowManager(22608): at android.os.Handler.dispatchMessage(Handler.java:92)

Remove "Processing geocoding. Please wait..." user dialog

We should remove the the “Processing geocoding. Please wait...” dialog that is shown when the app is trying to reverse geocode the location after the user taps on the map to set the start or end location.

Users have complained about it in the past (see user comments in #9), and I don’t see any reason to notify the user that this is happening. This task could happen completely in the background, with the textbox simply changing from the lat/long to the place description when the task finishes.

We'll leave the error message from geocoding so if it fails the user is still notified.

Android support library isn't correctly exported using new Android tools

When OTP Android is cloned from Github, by default the android-support-v4.jar file is not included in the export, and as a result you get this output when trying to run the app:

E/AndroidRuntime(862): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{edu.usf.cutr.opentripplanner.android/edu.usf.cutr.opentripplanner.android.MyActivity}: java.lang.ClassNotFoundException: Didn't find class "edu.usf.cutr.opentripplanner.android.MyActivity" on path: /data/app/edu.usf.cutr.opentripplanner.android-1.apk

See https://groups.google.com/forum/#!topic/opentripplanner-dev/a9b_bCYyBVs

OpenTripPlanner start/end icon is dropped at touch point, instead of X/Y offset

The app currently has a feature so that when a user drags the start or end trip marker on the screen, it adds an offset to the X,Y screen position so that your finger doesn’t hide the icon. This is good, but there is a problem when the user lifts their finger off the screen. The marker jumps back and positions itself at the location where your finger is touching the screen, not the offset location. This should be changed so that the marker is dropped at the last location the user sees the marker when they lift their finger (i.e., the offset location).

Setting a custom API URL doesn't work

If you perform these steps:

  1. Go to Settings and enter a custom API URL http://rtp.trimet.org/opentripplanner-api-webapp/ws
  2. Check the “Custom OTP Server” checkbox
  3. Hit back to go to the map
  4. Long press on the screen and try to set a origin or destination

You get the message Location outside of network boundaries. Marker not set.

I got this after the app auto-detected Tampa, and it seems to be retaining the bounding box info from the Tampa server and enforcing it on the custom API URL trip requests.

Problems with custom buttons in Gingerbread

In Gingerbread created buttons for Date, Plan Trip, My Location and Trip drop down selector have different types of problems, I show two examples from two devices. I think that the problem is with the shadow from Android package that is not available in earlier Android versions. Probably the best solution will be to go for some of the "stock" buttons.
Also there are two more problems with the layout:
* Solution for the panel and lack of light themes in earlier Android versions is not matching also with step-by-step screen background.
* There is a problem rendering the drawer layout, but when the panel is clicked it's ok, I suppose that it's a bug in the component.
* In horizontal if the screen is too small the list views overlap bike parameters.

All this problems (except the rendering) can be solved polishing the UI.

I'm sorry but I didn't have time to learn how to take screenshots in Gingerbread and I had this devices for a short period of time, so I took a photo of the screen. One is a Huawei U8650 and the other one is a Samsung Galaxy Ace II

dsc_2040
dsc_2041
dsc_2042
dsc_2043
dsc_2044
dsc_2045

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.