2

I am creating a mobile app which connects to some jive based community using childbrowser. I can easily open the community, login and do stuff.

But I also need to fetch session details in my app, so that I could use these to fetch JSON strings to show user image/info on my app showing that user is logged in.

I tried working on childbrowser, but couldn't investigate much. It seems it won't work with my community URL. While using google url it shows popups on location changes, but not for my url.

Can any one help me in fetching the data I want ?

Here is the sample code I am using to detect location change:

 function openURL() {
          window.plugins.childBrowser.onLocationChange= function(loc){ 
             alert('In index.html new loc = ' + loc);
          };
  window.plugins.childBrowser.showWebPage("https://communityName.jive-mobile.com/#jive-login", { showLocationBar: false });       
  }

I am getting my login page, but after login I can't see any alert coming !! I need to get proof of user login and user session details.

Thanks

Abhinav Tyagi
  • 5,158
  • 3
  • 30
  • 60

1 Answers1

0

I have just updated the ChildBrowser plugin for my own use, following code given here: How do I get the web page contents from a WebView?

I am using this to log in on Google API oAuth2, watching for the right page to load. I am using the onPageLoaded(html) event that has the (computed) html source. You might want to use this to get the html that was loaded and check for "stuff". I don't use jive so I wouldn't know where to start, but I'll put up a sample Google oAuth2 project for you to try.

HTH

EDIT:

the code is at: https://code.google.com/p/filechunkreader/

Don't let yourself get fooled by the name, this project is the repo for my Java plugins experiments. It contains so far 2 plugins, FileChunkReader and a custom version of ChildBrowser.

Community
  • 1
  • 1
dda
  • 6,030
  • 2
  • 25
  • 34