As a developer I don't care wether the user wants to use an Android app or webapp.
Cheng Zheng <czhe...@gmail.com> wrote:
>Hi everyone,
>
>I tested some methods and now the following one to call web apps from and
>Android app seems best feasible.
>
>A new class named org.openintents.wiagent.WebIntentsHelperActivity is added
>and exported. So any android app which needs to invoke web intents can send
>an *explicit* intent object to start this activity. The values of action,
>type, data should be put into the extra fields.
>
>For example, if you want to invoke share action from an Android app, the
>following snippet can do it.
>
>Intent intent = new Intent();
>intent.putExtra("action", android.content.Intent.ACTION_SEND);
>intent.putExtra("type", "text/uri-list");
>intent.putExtra("data", "http://paul.kinlan.me");
>intent.setComponent(new
>ComponentName("org.openintents.wiagent","org.openintents.wiagent.WebIntentsHelperActivity"));
>
>startActivity(intent);
>
>I've created a simple app which works according to this way (under the
>directory of *android app samples*) and upload it to github. Please let me
In this particular intent you would probably use SEND_MULTIPLE, and avoid the list mime types.
The approach looks good! Will check the code on Tuesday. Continue in high speed :-)
Friedger
Cheng Zheng <czhe...@gmail.com> wrote:
>Hi Friedger,
>
>I've changed the interface. Now the procedure of invoking web apps or
>android apps is as follows:
>
>Intent intent = new Intent(android.content.Intent.ACTION_SEND);
>
>intent.setType("text/uri-list");
>intent.putExtra(android.content.Intent.EXTRA_TEXT, "
>http://www.openintents.org");
>
>WebIntentsHelper helper = new
>WebIntentsHelper(OIWebIntentsAndroidSampleAppActivity.this);
>
>helper.applicationChooser(intent);
>
>Any android developers who would like to invoke web intents just do what
>they usually do in Android development and send the intents to our *
>WebIntentsHelper.applicationChooser()* method.
>--
>You received this message because you are subscribed to the Google Groups "OpenIntents" group.
>To post to this group, send email to openi...@googlegroups.com.
>To unsubscribe from this group, send email to openintents...@googlegroups.com.
>For more options, visit this group at http://groups.google.com/group/openintents?hl=en.
>
Hi
Regarding naming in the helper class , i would use createChooserWithWebActivities.
In this particular intent you would probably use SEND_MULTIPLE, and avoid the list mime types.
The Android intent SEND is just for one piece of data. So a mime type of text/* does not make sense here, but something like text/uri if that exists or am I wrong with the assumption that uri-list is for more than one uri.
The Helper should do the mime type conversion/adoption where necessary /possible.
Cheers
Friedger
Yes, the spec says something like that. Hopefully, it does not create too much difficulties as the understanding for sharing of web URLs in the sense of recovery is not really present in Android world. Well, it is used as data and the mime type describes the type of the resolved data and not the type of the data itself.... if that makes sense at all or did I got this wrong?
Do you know an Android app that allows to share bookmarks, e.g.openintents.org?
Friedger
They use text/plain in the intents filter :-(
So, I'd suggest to do some kind of mime type translation...
Friedger