Vaandroid Implementation Issues

A description of various implementation issues.

Intent Serialization

In Android, intents are used the messages between activities. The intents payload must be serializable, and this is a double edged sword.

This is good because the intent can be saved to disk or marshaled to another process.

This is bad because plain-old objects cannot be directly sent to or from an activity, service, etc.

Activity Results From Fragments

Not possible (without ActivityHelper workaround) to start an activity from a fragment and get the result.

Resource IDs

Resolving IDs

System IDs versus Plugin IDs

Menu item IDs from super class in another bundle

ID References

There are 3 ways we can referer to an ID.

Number

An ID specific to a scope. ^resource://server/plugin/12^

Alias

A string that is used as an identifier ^resource://server/plugin/photo^

Path

A path that referers to the location of a resource. ^resource://server/plugin/images/photo.png^

Availability

In Vaandroid, resources referer to URLs that might be cached by the client. That means they are possibly available to a client even if the providing plugin is not available.

Drawable

  • Vector Resources
    • When to convert to SVG
    • Cache SVG
  • Client can cache
  • Resources in ZIP files
  • Caching on server
  • Expiration Time

    Overriden API Methods

Java 8

Streams and lambdas were not implemented until API-24.

Menu Item State

Showing and enabling menu items based on the selection state of activity views.

Android Studio

Pointing the source to either the Android API or the Vaandroid API.

Complaining about unsupported Java 8 Stream API

WAB Bundle Build Issue

WAB Bundle refresh Issue

Multiple Tabs / Single Session

Shared session on browser creates issues. Application is per Vaadin UI, so we put a hash map in the session.

Cycles In Bundles

seeing package not found: javax.microedition.khronos.egl when installing core means there is a cyclic dependency (e.g. an api package used in core and depending on core)

Click Issues

In Vaadin, radio buttons do not get checkChanged or click events. All events go to the radio group. This creates a compatibility issue with Android. We need to extend Vaadin to get the Radio Button clicks.

Background Refreshing

Widgetset in plugins

Resource Sharing

Making files and endpoints accessible from outside. Caching. Security issues.

Conforming To Android API

Moving Activities Between Browsers

Client State

getClientState() and setClientState() need to be added to synchronize browser state. This needs to be asyncronous.

JavaScripts and CSS

Web browser resources need to be installed on the target browser

Browser Back / Escape

Integration of browser back and escape (closing popup windows, canceling prompts, and exiting from activities)

Other Issues

Since beginning this project, we have encountered several issues.

  • Zip File Already Opened
  • Resource ID Delegation
  • Android applications use integers to indicate resources.
    • The resource IDs are defined as strings, and are converted to integers at compile time.
  • An Android application can use an ID defined by the application, a library (also at compile time), or from the SDK.
  • Android applications cannot ‘share’ or ‘export’ their resources at runtime.
  • Vaandroid applications use integer IDs too, but the developer must specify if the ID should be resolved by the containing plugin, the parent plugin, or the system.
  • Rebuilding the core requires rebuilding the plugins when the core ids change.
  • UI Threading
  • Feature Tracking
  • Tracking what Android features have been Implemented and not Implemented.
  • Dropped Database Connections
  • Database Connection Leaks
  • Bad Karaf Documentation