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 - ActivityInfo is null in Intrumentation class

ActivityInfo is null in Intrumentation class

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

ActivityInfo is null in Intrumentation class

Postby andy@lg » Tue Apr 28, 2009 12:03 pm

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. @Override
  2.     public void onStart() {
  3.         super.onStart();    
  4. _intent = new Intent(Intent.ACTION_MAIN);
  5. _intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
  6. _intent = _intent.setClass(getTargetContext(), ClassUnderTest.class);
  7. ActivityInfo ai = _intent.resolveActivityInfo(getTargetContext().getPackageManager(), 0);
  8.         if (ai != null) {
  9.                    ClassUnderTest activity = (ClassUnderTest)startActivitySync(_intent);
  10.         }      
  11. }
Parsed in 0.010 seconds, using GeSHi 1.0.8.4


This a part of my code in my Instrumentation class. Earlier, i got a run time Exception,
java.lang.RuntimeException: Unable to resolve activity for: Intent { flags=0x10000000 comp={com.android.test.ui/com.android.test.ui.ClassUnderTest} }
. Later on, i checked the activity info which is always null. How to set the ActivityInfo..? What is required to update in the code?

Thanks,
Android Developer
andy@lg
Freshman
Freshman
 
Posts: 8
Joined: Thu Feb 26, 2009 8:52 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 21 guests