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

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

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 - Auto-Call

Auto-Call

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

Auto-Call

Postby PI9 » Tue May 19, 2009 8:54 am

Hello,

I tried to add a function to a small app I did few times ago: dial and call a predefined phone number.

So here is the code I used:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2.  
  3.  
  4. private Intent CallIntent,DialIntent;
  5.  
  6. private String num_op = "0561812124";
  7.  
  8.  
  9.  
  10. DialIntent = new Intent (Intent.ACTION_DIAL, Uri.parse("tel:"+ num_op));
  11.  
  12. DialIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
  13.  
  14. CallIntent = new Intent (Intent.ACTION_CALL, Uri.parse("tel:"+ num_op));
  15.  
  16. CallIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
  17.  
  18.  
  19.  
  20. startActivity(DialIntent);
  21.  
  22. startActivity(CallIntent);
  23.  
  24.  
Parsed in 0.012 seconds, using GeSHi 1.0.8.4


Of course, I used the right permission (CALL_PHONE) in my AndroidManifest..

Then, the app run on the emulator but it crashes when I try to make it run on the DevPhone.
Does anyone know why?
What is the problem with this code?

Thanks
PI9
Junior Developer
Junior Developer
 
Posts: 11
Joined: Mon Apr 06, 2009 8:40 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 11 guests