[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orekit Developers] [SOCIS 2011] Status of the Android application



Alexis ROBERT <alexis.robert@gmail.com> a écrit :

Hi,

Hello Alexis,


I've begun the actual programming of the Android application and it
should now be able to do time scale conversions.

You're fast!


If you want to test, there is a snapshot apk here :
http://dl.dropbox.com/u/6734910/orekit/orekit-20110806.apk (btw, do
you want me to use the forge to publish snapshots ?)

Yes, it would help preserving them for later reference in a controlled location. There is a tab for this on the forge (named "fichiers" in the French configured interface).

I have tried to install the apk on my tablet (it's a Malata Zpad, very similar to viewsonic G-tablet, running VEGan-TAB 7.0.0-RC1-Harmony rom on Android 2.3.3). It failed to install with a single message "application non installée". I don't known where to find further informations about the reason for this failure. I have already set up the tablet to accept installing applications that do not come from Android market, so it is probably not the reason. I tried the installation directly using a file explorer after having put the .apk in the sdcard, and choosing "install" when prompted for.

I'll look at the rest of your message later on (perhaps this evening, but I can't promise).

You have done a pretty good work, congratulations.
Luc


As there is only basic support for datasets (and by basic, I mean
*very* basic, like System.setProperty("orekit.data.path", "/sdcard/");
) for the moment, you'll need to drop orekit-data.zip on the root of
your sdcard so that this application doesn't crash.

Just some random notes :

* If you select a time scale or if you select a date for the first
time, you might notice that it takes some seconds where the UI is not
responsive. That's because Orekit is loading the dataset in the UI
thread. After this, it should be in cache and it would run faster. In
the future I might move calls which require reading from a dataset for
the first time in a separate thread with a progress dialog but ...
that would be in the future :)

* By the way if you select GMST time scale it crashes and I don't
currently understand why (also I didn't try to figure out why it
crashes).

* There is a class in the source code named SelectorActivity. Its
purpose is to make programming parameters panels easier by acting like
a list of views (a View in Android is like a Widget in Qt or others).

I'm still very skeptic about its "hack" or "not hack" status, because
it has nearly the same status as all the PreferenceActivity stuff of
the Android SDK except that it doesn't seem to achieve the same
usecases. PreferenceActivity seems to better address cases where an
user wants to "set preferences" and go back and we're ok. Here we have
a more low-level approach where we sometimes need a list of elements,
and one should be able to trigger a specific return value (like a list
of time scales for instance) where as one other can (for instance)
launch an other activity for selecting recently used locations, or we
can want to have a list of radio buttons with a "Ok" button to
validate at the bottom, etc... You can even put a webkit view inside a
list item :) If you try the application, both date selector and time
scale selector could be made using SelectorActivity even if they seem
to have a different behaviors (except that I didn't use it for
selecting time scales because it was very simple to do it with a plain
ListActivity and it would result in a lighter code as SelectorActivity
itselfs uses ListActivity).

I don't know if I've made myself very clear, but it seems to me that
we have some usecases that would not match the Preferences API which
seems to be at a very higher level. There is maybe a way to do this
using official Preference API but I didn't figure how -- I checked in
the Android git repository and I didn't see such usecases to check how
they use the Preferences API in the Settings app but I didn't see
usecases like we could have -- so I continued with my
SelectorActivity.

* Also the OrekitActivity is only here to add some utility function so
that window can easily add an Actionbar. By the way, an actionbar is
the Android way to say a toolbar. If you want to add an actionbar,
just create an activity which extends OrekitActivity, put <include
layout="@layout/actionbar"/> in the layout, and you can do
addActionbarButton(), setActionbarText(), etc... :)

* There is also a DoubleDialog which is a wrapper around AlertDialog
to ask for a double value. It will also check if the user has put a
double value when he clicks on "Ok" and if the user didn't put a valid
double value, you get an error message. You must read the
documentation of DoubleDialog to use it because I only wrapped one
"setButton" method for the validation part so if you ignore that, it
will use standard AlertDialog methods and your code can crash.

* The "dashboard" (which is the menu when you launch the Android app),
is currently pretty hideous but that's because I didn't take the time
to draw some icons for the tasks (even if I don't think it would be
nicer with my icons :D ). Also I suspect the DashboardView to have a
bug when you remove the application title bar.

* I've re-used some code available on the Google I/O 2011 Android app
(mostly the DashboardView, some ideas for the actionbar, and some
drawables for the actionbar (actionbar_background_9.png,
actionbar_separator_9.png, actionbar_button.xml, btn_bg_pressed.9.png
and btn_bg_selected.9.png) ) and some code used in the Android
platform (just layout/selector_item.xml iirc), which are published
under the Apache 2.0 license. I took care to put all the original
copyrights info in all the files I re-used, and to drop a note in
NOTICE.txt. I hope that's ok for you.

If it's ok, I'll do the frame conversion part tomorrow, orbit
conversion should follow.

If you have any ideas or comments, just let me know :)

Have a nice day,

Alexis





----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.