In fact - it works with internal WebView! Here's caveat -  on the
emulator I cannot click in the field but I can use arrow keys to gain
the focus. Once I'm able to type the information in - redirect works
just fine. Unfortunately, right now I don't have G1 to check how this
will manifest itself in the real device. Well - I'll check it on
Monday

Bo

On Aug 1, 5:09 pm, "droidin.net" <[email protected]> wrote:
> Been there, done that. It's simple. I use OAuth since that gives me
> ability to mark each of messages posted with my app as "from DroidIn"
> not with "from API". It's my app, I want my glory :) Plus it's much
> more user friendly since I don't have to keep or even know user name/
> password. I actually have a working implementation (see my write-up 
> onhttp://is.gd/1Yhh7)
>
> The trick is - when OAuth is done, browser will execute the callback
> which will call my activity through intent-filter (works like a charm
> in the standalone browser)
>
> Now - back to my problem. I tried to load auth URL into desktop
> browser on which JS is disabled. It works. So my problem is that when
> page comes up in WebView view buttons are clickable but form fields
> are not. I click on user name and it behaves as disabled field. What
> gives?
>
> Regards,
>
> Bo
>
> On Aug 1, 3:51 pm, Mark Murphy <[email protected]> wrote:
>
> > droidin.net wrote:
> > > I'm trying various ways of Twitter authorization which requires
> > > roundtrip to the browser.
>
> > Why not use their API?
>
> > > 1. Execute intent with
> > > startActivity(new Intent("auth", Uri.parse(authUrl), this,
> > > Browser.class));
>
> > On a side note, since Intent actions are device-global in scope, you may
> > wish to use something a bit more unique than "auth". I usually namespace
> > mine (com.commonsware.android.app.MY_ACTION), just to be safe.
>
> > > 2. Init browser
> > >     private void initBrowser() {
> > >         this.browser = (WebView) findViewById(R.id.browser);
> > >         this.browser.getSettings().setJavaScriptEnabled(true);
> > >         this.browser.getSettings
> > > ().setJavaScriptCanOpenWindowsAutomatically(true);
> > >         this.browser.getSettings().setPluginsEnabled(true);
> > >         this.browser.getSettings().setLoadsImagesAutomatically(true);
> > >         this.browser.addJavascriptInterface(this, "MainScreen");
> > >     }
>
> > > 3. Load url
> > > this.browser.loadUrl(getIntent().getData().toString());
>
> > I suspect you don't want to go down this path.
>
> > Let's suppose the form worked. The result will be...a new Browser
> > window. Links and such from within a WebView do not stay in the WebView
> > by default.
>
> > OK, so you add a WebViewClient and implement shouldOverrideUrlLoading().
> > Then what?
>
> > And, of course, your first problem would be to get the form working.
>
> > So, I'll go back to the beginning: why not use their API? I've used
> > JTwitter in a handful of book examples, and it works swimmingly, or at
> > least as swimmingly as Twitter's API lets you (it seems to be the first
> > to fail, before any whale sightings).
>
> > --
> > Mark Murphy (a Commons 
> > Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> > Android App Developer Books:http://commonsware.com/books.html
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to