All Things R&D
Monthly Archives: August 2012
August 20, 2012Posted by on
This blog presents a summary of user interface for current OI WebIntents. Now the app supports both tablets and handsets.
This is the main page with an introduction section, a service registration section, a service invocation section and a link to home page of webintents.org.
There are five action items in the action bar: backward, forward, reload, goHome and applicaiton management.
When a new application is found, a notification message is shown. The user can enter into application management interface by click on the notification or the menu item.
There are three tabs in the Web application management interface: New Found, My App and Trash, each with its own menu items. The sign “+” here means add the checked Web apps in New Found tab to My App, while “-” means removing them to trash. Since in current version, the agent no longer marked visited applications and ignore them in future visits, I put a trash tab here for recycling instead of deleting unused applications forever.
When entering the simple share web page on webintents.org and click on the share button, a chooser dialog appears (with or without web apps).
Now you can use Web application like Twitter or Android application like Gmail to complete your action.
When running the share sample app now, the chooser dialog appears in its own context now.
The interface for handsets is similar.
The biggest difference is displaying Web applications and their web intents. Still, in the intents detail interface, a user can make same menu operations as its parent. Since back button shows different results from in tablets, I added a navigation up support for the application icon to return to the home page.
August 20, 2012Posted by on
This is the last report for GSoC 2012.
Now OI WebIntents can do three major tasks as specified in the application proposal:
- Invoke both Web applications and Android Applications from a Web page
- Invoke both Web applications and Android Applications from an external Android application
- Web application management
Now OI WebIntents can work well on both handsets and tablets with different screen design.
Another blog post describe the user guidelines to use OI WebIntents Agent with screenshots.
Data Structure and Class Implementation
1. Main activities
There are two activity classes which are important for this part:
WebIntentsAgentActivity is the main activity for this application and launched when the app takes off. It creates the navigation menu items and if necessary starts off the WebAppManagementActivity for Web application management.
2. Data Storage and Content Provider
Two classes are important for this part:
Each database table is represented by an internal class of WebIntentsProvider with its column fields and CONTENT_URI. For example, the database table ‘web_intents’ is represented by WebIntentsProvider.WebIntents.
3. Web page parsing, revising and loading
4. Web application Registration
Since most available Web applications for Web Intents are implemented as Chrome Extensions. I modified four sample applications and included them in this application. They are:
- Web Intents Debugger
- Share Link to Twitter
- Shorten with Goo.gl
- Chromerly URL-shortener
As a result, a procedure (FileReaderThread) for registering and loading local applications was also developed. However, this application also support online app registration. webintents.org now supports some online applications. Our project is applicable for the following online application:
They can be discovered by browsing the following Web pages:
5. Web application management
The following classes are important for this part:
WebAppListFragment is for displaying a list of Web application and WebIntentsByAppListFragment shows web intents for a specific web application. For a tablet, both WebAppListFragment and WebIntentsByAppListFragment will be added into WebAppManagementActivity. However, for a handset, WebAppListFragment is contained in WebAppManagementActivity while WebIntentsByAppListFragment is loaded into WebIntentsByAppActivity. The purpose is for supporting multiple screens.
6. Invoke Web applications from external Android apps
A helper class named WebIntentsHelper is for this requirement. Any external Android application can invoke Web applications by the following step:
Install OI WebIntents Agent -> Import webintents-helper.jar into libs -> Create a application chooser by invoke WebIntentsHelper.createChooserWithWebActivities()
This method will create a chooser dialog in the context of the calling application now.
Failure method to report
August 14, 2012Posted by on
Last week I designed a new logo for OI WebIntents Agent together with Friedger, as in Fig 1.
It will appear in the following versions.
In the former versions, the external Android application which calls the createChooserWithWebActivities method will let the system start an empty Activity which creates a dialog for application selection. Now the dialog will be created in the context of the activity which calls the method, as in Fig 2.
The dialog layout is created from Java code and I tried to use Android internal layout resources, so now the invoking methods is still the same as the former version.
Now when new applications are found, a notification message on the status bar will appear. It may refer the user to the application management UI directly, like in Fig 3.
For the application management UI, the selection mode is enabled when the user enters the activity. I also added checkboxes for item selection instead of the former long click action, as in Fig 4.
Last week, I also added handset supports. Now the application management UI also looks better on small screen devices, like in Fig 5 and 6.
This week is the last week before hard ‘pencil down’. A lot of document work and revisions are waiting for me so it will be very busy.
Any feedback is welcome.
August 6, 2012Posted by on
Happy Civic Day!
This week I added some comments to the code. Hope that they are helpful. If any part of the code is obscure to you, please leave a message and I will add more comments specific for you.
It’s a pleasure that webintent.org made some online services available besides those in Chrome. Now when you use our app to browse some online pages you can find new applications from them. Those applications include Kinlan’s Image Share, Kinlan’s Link Share and Kinlan’s Link Shortener. Up to now, our app is totally compatible with these apps except a small flaw for image sharing. But this problem also exists when you use Android’s default browser so I think it might be generic to Android Webkit.
Now the app is working better on tablet with large screens. Next step I will test it on normal devices like phones and add necessary revisions.
Since the pencil down date is approaching, I have many small function revisions to make in the next few days and I think it must be very busy.
Work done last week
- Add online service registration
- Add an address bar
- Format the code according to openintents developer’s code style instructions like use tab instead of spaces for indentation