Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - startActivity on "file://" links crashes

startActivity on "file://" links crashes

Put your problem here if it does not fit any of the other categories.

startActivity on "file://" links crashes

Postby POMATu » Tue Apr 12, 2011 5:45 pm

Hi. I am trying to create program that simply opens file on sdcard. I tried opening mp3, mp4, and apk - the code bellow always crashes unexpectedly.

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.          String _path = "file:///sdcard/1.apk";
  2.        
  3.          Uri outputFileUri = Uri.parse(_path);
  4.         Intent intent = new Intent();
  5.         intent.setAction(Intent.ACTION_VIEW);
  6.         intent.setData(outputFileUri);  
  7.        
  8.           startActivity(intent);
Parsed in 0.010 seconds, using GeSHi 1.0.8.4


Market links also crashes. But when I set _path="http://google.com" - browser opens normally. How can I make this code work?
POMATu
Freshman
Freshman
 
Posts: 2
Joined: Tue Apr 12, 2011 5:39 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 36 guests