Copying back to the list.
This looks like an emulator issue. Can you access the site with the
emulator's web browser? I would guess not.
And looking at the last line in the log:
Address family not supported by protocol
I would guess that it's IPv6 related.
PS - Don't use hardcoded strings for intent actions, there are constants
like Intent.ACTION_VIEW.
-- Kostya
05.05.2011 10:37, beginer пишет:
thanks Kostya
I put
lblTitulo.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
//TextView tv = (TextView)findViewById(
R.id.link2_view );
Intent browserIntent = new
Intent("android.intent.action.VIEW",
Uri.parse("http://www.google.es"));
startActivity(browserIntent);
//tv.setText(la_dire);
// Linkify.addLinks( tv, Linkify.WEB_URLS );
}
});
and it go good!!!!
BUt when I put my url, dosen't work, the code is this:
final String la_dire = miLista.get(position).getLink();
//System.out.println(la_dire);
lblTitulo.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
//TextView tv = (TextView)findViewById(
R.id.link2_view );
Intent browserIntent = new
Intent("android.intent.action.VIEW",
Uri.parse(la_dire));
startActivity(browserIntent);
//tv.setText(la_dire);
// Linkify.addLinks( tv, Linkify.WEB_URLS );
}
});
The emulator said this:
05-05 06:27:10.256: INFO/System.out(391):
[net.sgoliver.Evento@44ef34c8, net.sgoliver.Evento@44ef42e8,
net.sgoliver.Evento@44ef45f8, net.sgoliver.Evento@44ef48c0,
net.sgoliver.Evento@44ef5560, net.sgoliver.Evento@44ef65f8,
net.sgoliver.Evento@44ef6848, net.sgoliver.Evento@44ef6cb0,
net.sgoliver.Evento@44ef7010, net.sgoliver.Evento@44ef7428]
05-05 06:27:10.465: INFO/System.out(391):
http://www.donostiakultura.com
05-05 06:27:10.545: INFO/System.out(391): http://www.google.es
05-05 06:27:10.577: INFO/System.out(391): http://www.adimedia.net
05-05 06:27:10.817: INFO/ActivityManager(59): Displayed activity
net.sgoliver/.AndroidXml: 2073 ms (total 2073 ms)
05-05 06:27:16.046: DEBUG/dalvikvm(119): GC_EXPLICIT freed 658
objects / 36880 bytes in 129ms
05-05 06:27:21.136: DEBUG/dalvikvm(214): GC_EXPLICIT freed 156
objects / 11168 bytes in 165ms
05-05 06:27:26.156: DEBUG/dalvikvm(261): GC_EXPLICIT freed 250
objects / 11856 bytes in 138ms
05-05 06:27:26.440: DEBUG/SntpClient(59): request time failed:
java.net.SocketException: Address family not supported by protocol
05-05 06:32:02.775: INFO/ActivityManager(59): Starting activity:
Intent { act=android.intent.action.VIEW dat=
05-05 06:32:02.775: INFO/ActivityManager(59):
http://www.donostiakultura.com }
05-05 06:32:02.775: DEBUG/AndroidRuntime(391): Shutting down VM
05-05 06:32:02.786: WARN/dalvikvm(391): threadid=1: thread exiting
with uncaught exception (group=0x4001d800)
05-05 06:32:02.796: ERROR/AndroidRuntime(391): FATAL EXCEPTION: main
05-05 06:32:02.796: ERROR/AndroidRuntime(391):
android.content.ActivityNotFoundException: No Activity found to handle
Intent { act=android.intent.action.VIEW dat=
05-05 06:32:02.796: ERROR/AndroidRuntime(391):
http://www.donostiakultura.com }
05-05 06:32:02.796: ERROR/AndroidRuntime(391): at
android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:
1408)
05-05 06:32:02.796: ERROR/AndroidRuntime(391): at
android.app.Instrumentation.execStartActivity(Instrumentation.java:
1378)
05-05 06:32:02.796: ERROR/AndroidRuntime(391): at
android.app.Activity.startActivityForResult(Activity.java:2817)
05-05 06:32:02.796: ERROR/AndroidRuntime(391): at
android.app.Activity.startActivity(Activity.java:2923)
05-05 06:32:02.796: ERROR/AndroidRuntime(391): at
net.sgoliver.AndroidXml$EventoAdapter$1.onClick(AndroidXml.java:162)
05-05 06:32:02.796: ERROR/AndroidRuntime(391): at
android.view.View.performClick(View.java:2408)
05-05 06:32:02.796: ERROR/AndroidRuntime(391): at android.view.View
$PerformClick.run(View.java:8816)
05-05 06:32:02.796: ERROR/AndroidRuntime(391): at
android.os.Handler.handleCallback(Handler.java:587)
05-05 06:32:02.796: ERROR/AndroidRuntime(391): at
android.os.Handler.dispatchMessage(Handler.java:92)
05-05 06:32:02.796: ERROR/AndroidRuntime(391): at
android.os.Looper.loop(Looper.java:123)
05-05 06:32:02.796: ERROR/AndroidRuntime(391): at
android.app.ActivityThread.main(ActivityThread.java:4627)
05-05 06:32:02.796: ERROR/AndroidRuntime(391): at
java.lang.reflect.Method.invokeNative(Native Method)
05-05 06:32:02.796: ERROR/AndroidRuntime(391): at
java.lang.reflect.Method.invoke(Method.java:521)
05-05 06:32:02.796: ERROR/AndroidRuntime(391): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:868)
05-05 06:32:02.796: ERROR/AndroidRuntime(391): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
05-05 06:32:02.796: ERROR/AndroidRuntime(391): at
dalvik.system.NativeStart.main(Native Method)
05-05 06:32:02.816: WARN/ActivityManager(59): Force finishing
activity net.sgoliver/.AndroidXml
05-05 06:32:03.327: WARN/ActivityManager(59): Activity pause timeout
for HistoryRecord{44fccd28 net.sgoliver/.AndroidXml}
05-05 06:32:04.965: INFO/Process(391): Sending signal. PID: 391 SIG: 9
05-05 06:32:04.987: INFO/ActivityManager(59): Process net.sgoliver
(pid 391) has died.
05-05 06:32:04.987: INFO/WindowManager(59): WIN DEATH: Window{44feca10
net.sgoliver/net.sgoliver.AndroidXml paused=false}
05-05 06:32:05.046: WARN/InputManagerService(59): Got RemoteException
sending setActive(false) notification to pid 391 uid 10037
05-05 06:32:14.146: WARN/ActivityManager(59): Activity destroy timeout
for HistoryRecord{44fccd28 net.sgoliver/.AndroidXml}
05-05 06:32:26.485: DEBUG/SntpClient(59): request time failed:
java.net.SocketException: Address family not supported by protocol
What is the problem?
Thank you
On May 4, 11:20 am, Kostya Vasilyev<[email protected]> wrote:
You can set an onClickListener for the view, and use ACTION_VIEW for
your "http://..." URI.
http://stackoverflow.com/questions/2201917/android-open-url-from-code
-- Kostya
04.05.2011 12:44, beginer пишет:
When I click labelTitle, the link appeared, and you can click there
and open the url . BUt What I want isn´t this, I want when I click in
the labelTitle to open the url directly, I don´t want to have to click
in the url.
How can I do this?
thank you very much, excuse my english.
--
Kostya Vasilyev --http://kmansoft.wordpress.com
--
Kostya Vasilyev -- http://kmansoft.wordpress.com
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en