java - launching a test project from another application -


i have created test project 1 of android app. test project creates excel file content. now, every time have run app, have connect device , run through eclipse. however, need generate excel whenever want (on go).

but test app doesn't show in launcher(obviously). can see test project installed at, settings-->apps-->all. , hence cannot tap , launch. (first problem)

my approach : thought of creating separate android app 1 or 2 buttons , invoking test app onclicklistner event. again, new app unable find test class.

this code :

private onclicklistener launchlistener = new onclicklistener() {         public void onclick(view v) {             intent intent = new intent(intent.action_main);             intent.setcomponent(new componentname("com.org.search.test","com.org.search.test.mytestclassname"));             startactivity(intent);         }      }; 

and below exception log:

03-10 17:05:44.185: e/androidruntime(22195): fatal exception: main android.content.activitynotfoundexception: unable find explicit activity class      {com.org.search.test/com.org.search.test.mytestclassname}; have declared activity in androidmanifest.xml? @ android.app.instrumentation.checkstartactivityresult(instrumentation.java:1628) @ android.app.instrumentation.execstartactivity(instrumentation.java:1424) @ android.app.activity.startactivityforresult(activity.java:3390) @ android.app.activity.startactivityforresult(activity.java:3351) @ android.app.activity.startactivity(activity.java:3587) @ android.app.activity.startactivity(activity.java:3555) @ com.expedia.pb.activity.scrapeactivity$2.onclick(scrapeactivity.java:49) 

adding android manifest file:

   <?xml version="1.0" encoding="utf-8"?>    <manifest xmlns:android="http://schemas.android.com/apk/res/android"     package="com.pb.activity"     android:versioncode="1"     android:versionname="1.0" >      <uses-sdk         android:minsdkversion="14"         android:targetsdkversion="17" />     <uses-permission android:name="android.permission.write_external_storage" />      <application         android:allowbackup="true"         android:icon="@drawable/ic_launcher"         android:label="@string/pb_app"         android:theme="@style/apptheme" >         <activity             android:name="com.pb.activity.scrapeactivity"             android:label="@string/pb_app" >             <intent-filter>                 <action android:name="android.intent.action.main" />                  <category android:name="android.intent.category.launcher" />             </intent-filter>         </activity>         <activity               android:name="com.org.search.test.mytestclassname">         </activity>     </application>  </manifest> 

can please me out solve problem?

it shows forget declare com.org.search.test.mytestclassname in manifest file.

make sure have regiestered mytestclassname activity in manifest file below:

     <activity         android:name=".mytestclassname"         android:label="@string/basic_map" /> 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -