• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Opening Url via intent

 
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I am trying to open a link in my app using following piece of code

Now the problem is that I have added this functionalities to two buttons in my app.In which it redirects. to different url's.For one button the code works fine but for the other button code also works fine but it have some disturbance in between while loading the url in the browser.The process is slow.Any idea how to eliminate this.If any one ever faced the same issue.I just want the code to work fine just like the other button.
 
Saloon Keeper
Posts: 5718
144
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

 some disturbance in between while loading the url .


What does that mean, exactly?
 
priyanshi bhardwaj
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Moores wrote:

 some disturbance in between while loading the url .


What does that mean, exactly?


Over here disturbance means the following process happens:
1.I click the respective button via my app
2.then for 1 sec chrome get's open
3.then again my app get's opened for one sec then a loader appears it closes the application
4.finally my link get's loaded in chrome
but whereas in the case of other button :
1.I click the respective button via app.
2.Links directly gets opened in the chrome(without showing any sort of disturbance).
I want my first button to also work like my second button.
It would be a great help if anyone can help how this is possible.And Can anyone tell how the line in my code which I have written works.I mean how does intent opens the url.
 
Ranch Foreman
Posts: 376
4
Android Tomcat Server Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

3.then again my app get's opened for one sec then a loader appears it closes the application


Your app crashed?
 
Tim Moores
Saloon Keeper
Posts: 5718
144
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

priyanshi bhardwaj wrote:3.then again my app get's opened for one sec then a loader appears it closes the application


You can track what's happening in the app by logging from every event handler (onCreate, onPause, onStop etc.) as well as your on methods. That might give you some insight into what happens. Also check the logcat whether there is anything unusual in it.

Randy Tong wrote:Your app crashed?


And if it did, then a stack trace of the exception would be in the logcat - checking that is the first step in diagnosing any app crash (or unexpected behavior).
 
priyanshi bhardwaj
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Randy Tong wrote:

3.then again my app get's opened for one sec then a loader appears it closes the application


Your app crashed?


No it never got crashed just my app went into background chrome came into foreground then again app came into foreground and then app opened the link.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!