DroidForums.net is the original Verizon Android Forum! Registered Users do not see these ads. Please Register - It's Free!
Results 1 to 2 of 2

Thread: Force close Need help

  1. Droid Newbie
    Bigmos's Avatar
    Member #
    169183
    Join Date
    Feb 2011
    Posts
    4
    Phone
    Enter Current Phone Model Here
    #1

    Force close Need help

    Here is my code why on button 2 it forces closes

    public class qtmmobile extends Activity {
    /** private String currentSponsorUrl;

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    }

    /**
    * Create a browser Intent and go to the URI of the displayed
    * sponsor.
    */
    public void clickAdButtonHandler( View view )
    {
    if( view.getId() != R.id.button1 )
    return;

    String url = "http://www.mysite.com/" ;

    if( url != null )

    {
    Intent intent = new Intent( Intent.ACTION_VIEW );
    intent.setData( Uri.parse( url ) );
    startActivity( intent );
    }
    }
    public void clickAdButtonHandler1( View view )
    {
    if( view.getId() != R.id.button2 )
    return;
    String url ="//google.com" ;

    if( url != null )

    {
    Intent intent = new Intent( Intent.ACTION_VIEW );
    intent.setData( Uri.parse( url ) );
    startActivity( intent );

    }





    }
    }
    Last edited by Bigmos; 02-11-2011 at 08:52 AM.
  2. Droid Newbie
    Bigmos's Avatar
    Member #
    169183
    Join Date
    Feb 2011
    Posts
    4
    Phone
    Enter Current Phone Model Here
    #2
    I got it i had a type-o

Links

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Similar Threads

  1. First all Google stock apps force close, now Market keeps force closing
    By brooks70 in forum Droid Incredible Tech Support
    Replies: 3
    Last Post: 03-01-2011, 03:22 PM
  2. What exactly is a force close?
    By heath223 in forum Android General Discussions
    Replies: 5
    Last Post: 04-12-2010, 03:54 PM
  3. Force Close
    By Nickmast in forum Android Hacks and Help
    Replies: 3
    Last Post: 02-18-2010, 02:42 PM
  4. Force Close
    By Roadking96 in forum Motorola Droid
    Replies: 3
    Last Post: 01-12-2010, 09:51 AM
  5. Force close on sms
    By phillyphill39 in forum Motorola Droid
    Replies: 20
    Last Post: 12-01-2009, 08:39 PM

Search tags for this page

activity force close

,

android force close previous intent

,

android intent action view force close previous activities

,

android tab intent return force close

,

blink force close droid

,

droid help and force close

,

force close startactivity

,

how to overide force closes on android

,

how to override the force close android

,

intent force close in android

,

new intent force close

,

setcontentview(r.layout.main) force close

Click on a term to search our site for related topics.
Find us on Google+