Controlling an Android device via additional UIs

by kenpark » Fri, 29 May 2009 17:49:23 GMT


Sponsored Links
 I want Android (or Android devices) to become able to be controlled
via additional, external user interfaces. like a kind of remote
interface. In other words, i want to design a software-interface which
enables Android devices to make use of a second system's UIs. I
imagine it like that:
For example you have your Android device (let's call it the first
system) and a regular PC (let's call this the second system). So in
this case the second system has much more comfortable user interfaces
(like it's hardware keyboard) for performing tasks like writing a text
message. Now I want the first device -- the Android phone -- to
connect (e.g. via wireless lan) with the second system. Now the second
system provides representation (views and so on) that are able to
delegate the user's interaction to the Android device where this is
than computed by the current running activity (displayed on the
external UIs). The representation, provided by the second system could
be optimized to the second system's UI's. That is, e.g. the views are
presented bigger because the bigger screen of the PC makes it possible
to enlarge the presentation of a view.

But I wonder on which level of the framework stack one has to make
changes to remote the user interface also to an external system's UI?!
So far I was thinking of two possible solutions:

A.
The second system (e.g. the PC) has a proxy presentation. This is, for
example if a button is presented on the Android device, than there is
also a proxy for this button, presented on the PC's screen. If the
user activates the proxy-button on the PC, than this event is making a
Remote Procedure Call to the android device, activating the android
device's button. This could be implemented for example by using RMI
techniques. (I know RMI is currently not supported in the stack, but I
guess these libs could be added to the stack.)

B.
On his Google I/O talk titled "Anatomy & Physiology of an Android",
Patrick Brady was talking of the "Surface Manager" on Android's native
libraries level. I thought that editing this functionality could also
be an approach. But first, I haven't found any documentation on this
so called "Surface Manager", and second, I am not sure if this is the
right point if you want to offer external UIs which are optimized on
things like size and layout.

Since I am a total newbie on Android, I am interested in the framework-
developers thoughts about my idea.
Any hint, help and critic is welcome.

Regards,
Patrick
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. ScrollView with EditText - Scrolling in EditText Issue

HI there,
Our app (WordPress for Android) uses a ScrollView for the new blog
post view.  The issue is that if a user writes a lengthy blog post in
the EditText, they are unable to scroll inside of the EditText because
the ScrollView seems to be taking over the scrolling action, even when
you are in the EditText.

Here's the layout XML (the EditText in question is @id/content), any
help would be greatly appreciated:

<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/main"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:scrollbars="none"
    android:background="#FFF5F5F5">

<RelativeLayout android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:padding="10dip"
                >
    <RelativeLayout android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:background="@drawable/content_bg"
                android:id="@+id/section1">
    <TextView android:id="@+id/l_section1"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:text="Post Content"
              style="@style/WordPressSectionHeader"/>
    <TextView android:id="@+id/l_title"
                  android:layout_below="@id/l_section1"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:text="@string/post_title"/>

    <EditText android:id="@+id/title"
                  android:minHeight="40dip"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:background="@android:drawable/
editbox_background"
              android:autoText="true"
              android:capitalize="sentences"
              android:layout_below="@id/l_title"/>

    <TextView android:id="@+id/l_content"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:text="@string/post_content"
              android:layout_below="@id/title"/>

    <EditText android:id="@+id/content"
                  android:gravity="top"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:background="@android:drawable/
editbox_background"
              android:minLines="5"
              android:maxLines="5"
              android:autoText="true"
              android:capitalize="sentences"
              android:layout_below="@id/l_content"/>

<Button
                        android:id="@+id/bold"
                        android:background="@drawable/wp_button_small"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/content"
            android:textStyle="bold"
            android:textSize="22dip"
            android:text="B" />
<Button
                        android:id="@+id/em"
                        android:background="@drawable/wp_button_small"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignTop="@id/bold"
            android:layout_toRightOf="@id/bold"
            android:textStyle="italic"
            android:textSize="22dip"
            android:text="I " />

<Button
                         android:id="@+id/link"
                         android:background="@drawable/wp_button_small"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignTop="@id/em"
            android:layout_toRightOf="@id/em"
            android:textSize="22dip"
            android:textColor="#006699"
            android:text="link" />

<Button
                        android:id="@+id/bquote"
                        android:background="@drawable/wp_button_small"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignTop="@id/link"
            android:layout_toRightOf="@id/link"
            android:textSize="22dip"
            android:text="b-quote" />
              </RelativeLayout>
<RelativeLayout android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:background="@drawable/content_bg"
                android:id="@+id/section2"
                android:layout_marginTop="10dip"
                android:layout_below="@id/section1">
    <TextView android:id="@+id/l_media"
                  android:layout_marginBottom="6dip"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:text="Media"
              style="@style/WordPressSectionHeader"/>
<Button
                        android:id="@+id/addPictureButton"
                        android:layout_marginTop="4dip"
                        android:background="@drawable/wp_button_small"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/l_media"
            android:textSize="18dip"
            android:text="@string/add"/>

<Button
                        android:id="@+id/clearPicture"
                        android:background="@drawable/wp_button_small"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:visibility="gone"
            android:textSize="18dip"
            android:layout_alignBottom="@id/addPictureButton"
            android:layout_toRightOf="@id/addPictureButton"
            android:text="@string/clear" />

            <GridView
                        android:id="@+id/gridView"
                    android:layout_width="wrap_content"
                    android:layout_height="fill_parent"
                    android:gravity="fill_vertical"
                    android:numColumns="3"
                    android:visibility="gone"
                    android:layout_below="@id/
addPictureButton">
               </GridView>
</RelativeLayout>
<RelativeLayout android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:background="@drawable/content_bg"
                android:id="@+id/section3"
                android:layout_marginTop="10dip"
                android:layout_marginBottom="10dip"
                android:layout_below="@id/section2">
                <TextView android:id="@+id/l_tags_categories"
                  android:layout_marginBottom="6dip"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:text="Tags &amp; Categories"
              style="@style/WordPressSectionHeader"/>
                   <TextView android:id="@+id/l_tags"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:layout_below="@id/l_tags_categories"
              android:text="@string/tags_separate_with_commas"/>

    <EditText android:id="@+id/tags"
                  android:minHeight="40dip"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:background="@android:drawable/
editbox_background"
              android:autoText="true"
              android:layout_below="@id/l_tags"/>

    <TextView android:id="@+id/l_category"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:text="@string/categories"
              android:layout_below="@id/tags"
              android:layout_marginTop="10dip"/>

  <Button
                        android:id="@+id/selectCategories"
                        android:background="@drawable/wp_button_small"
            android:layout_below="@id/l_category"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textSize="18dip"
            android:text="@string/select_categories" />

     <TextView android:id="@+id/selectedCategories"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="@string/selected_categories"
              android:layout_below="@id/selectCategories"/>
 </RelativeLayout>
  <RelativeLayout android:id="@+id/location_wrapper"
                           android:layout_width="fill_parent"
                           android:layout_height="wrap_content"
                android:layout_below="@id/section3"
                android:layout_marginTop="-10dip">
  <RelativeLayout android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:background="@drawable/content_bg"
                android:id="@+id/section4"
                android:layout_marginTop="10dip"
                android:layout_marginBottom="10dip"
                android:layout_below="@id/section3"
                android:visibility="gone">
                <TextView android:id="@+id/l_location"
                  android:layout_marginBottom="6dip"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:text="@string/location"
              style="@style/WordPressSectionHeader"/>
              <TextView android:id="@+id/locationText"
                  android:layout_marginBottom="6dip"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:text="@string/loading"
              android:layout_below="@id/l_location"/>
              <Button
                        android:id="@+id/viewMap"
                        android:background="@drawable/wp_button_small"
            android:layout_below="@id/locationText"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textSize="18dip"
            android:text="View Map" /
 </RelativeLayout>
 </RelativeLayout>
 <RelativeLayout android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:background="@drawable/content_bg"
                android:id="@+id/section5"
                android:layout_marginTop="10dip"
                android:layout_marginBottom="10dip"
                android:layout_below="@id/location_wrapper">
                <TextView android:id="@+id/l_status"
                  android:layout_marginBottom="6dip"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:text="@string/status"
              style="@style/WordPressSectionHeader"/
    <CheckBox android:id="@+id/publish"
                android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/l_status"
            android:text="@string/publish"
            android:button="@drawable/wp_checkbox"
            />
 </RelativeLayout>
<Button
                        android:id="@+id/post"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/section5"
            android:layout_alignParentRight="true"
            android:textSize="18dip"
            android:background="@drawable/wp_button"
            android:text="@string/save" />
<Button
                        android:id="@+id/upload"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignBottom="@id/post"
            android:layout_toLeftOf="@id/post"
            android:textSize="18dip"
            android:background="@drawable/wp_button"
            android:text="@string/upload_now" />
</RelativeLayout>
</ScrollView>

-- 

2. The application has stopped unexpectedly. Please try again.





Print out the values of the strings just before you try to convert them,
then the value of what you get.
Why are you using Float to get a double value?

-------------------------------------------------------------------------------------------------
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

-- 

3. Android Market woes... the press finally catch on

4. WebView Horizontal Scroll Not Working

5. Android Emulator - Eclipse cannot see it

6. which android dev phone to buy? (preferably with keyboard)

7. ASK: Download manager utk android?