Force close Need help
This is a discussion on Force close Need help within the Droid Development forums, part of the Droid Hacking category; Here is my code why on button 2 it forces closes
public class qtmmobile extends Activity {
/** private String currentSponsorUrl;
/** Called when the ...
-
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.
-
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
Similar Threads
-
By brooks70 in forum Droid Incredible Tech Support
Replies: 3
Last Post: 03-01-2011, 03:22 PM
-
By heath223 in forum Droid General Discussions
Replies: 5
Last Post: 04-12-2010, 03:54 PM
-
By Nickmast in forum Hacking Help
Replies: 3
Last Post: 02-18-2010, 02:42 PM
-
By Roadking96 in forum Motorola Droid
Replies: 3
Last Post: 01-12-2010, 09:51 AM
-
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 development force close
,
android force close previous intent
,
android gallery intent returning null motorola
,
android how to view log on force close development
,
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 force close on droid incredible
,
how to override the force close android
,
new intent force close
,
setcontentview(r.layout.main) force close
Click on a term to search our site for related topics.