[android-developers] Re: How can we open browser in Android through code?
If I use this code, I get the following:
-- ===============
Multiple markers at this line
- Return type for the method is missing
- Syntax error on token "intent", VariableDeclaratorId expected after
this token
- intent cannot be resolved to a type
===============
I am specifically trying to link to a web site from a logo on my main activity. The image has the following properties:
<ImageView
android:id="@+id/imageView1"
android:layout_width="match_parent"
android:layout_height="120dp"
android:contentDescription="MyLogo"
android:src="@drawable/logo_bloodrun" />
On Wednesday, April 20, 2011 8:48:56 AM UTC-4, Steve wrote:
This will do:
Uri uri = Uri.parse("http://www.example.com ");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home