java - Adding Activity to Android in Adobe Air Extension -


i'm receiving following error when try start activity within native code of android application adobe air:

android.content.activitynotfoundexception: unable find explicit activity class {air.inapppurchases/com.industrycorp.androidinapppurchaselib.asyncactivity}; have declared activity in androidmanifest.xml?

i've been looking @ many tutorials , guides , unable solve problem.

my native androidmanifest.xml:

<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android"           package="com.industrycorp.androidinapppurchaselib"           android:versioncode="1"           android:versionname="1.0">     <uses-permission android:name="com.android.vending.billing" />     <application android:label="@string/app_name" android:icon="@drawable/ic_launcher">         <activity android:name="activity_entry_name"                   android:label="@string/app_name">             <intent-filter>                 <action android:name="android.intent.action.main"/>                 <category android:name="android.intent.category.launcher"/>             </intent-filter>         </activity>         <activity android:name=".iapview.iaplistactivity"/>         <activity android:name=".asyncactivity" android:label="async_activity"/>     </application> </manifest> 

my androidmanifest.xml on air side:

<?xml version="1.0" encoding="utf-8" ?>  <!-- adobe air application descriptor file template.      specifies parameters identifying, installing, , launching air applications.       xmlns - adobe air namespace: http://ns.adobe.com/air/application/3.7.      last segment of namespace specifies version of air runtime required application run.       minimumpatchlevel - minimum patch level of air runtime required run application. optional. -->  <application xmlns="http://ns.adobe.com/air/application/3.7">      <!-- universally unique application identifier. must unique across air applications.          using reverse dns-style name id recommended. (eg. com.example.exampleapplication.) required. -->     <id>inapppurchases</id>      <!-- used filename application. required. -->     <filename>inapppurchases</filename>      <!-- name displayed in air application installer. may have multiple values each language. see samples or xsd schema file. optional. -->     <name>inapppurchases</name>      <!-- string value of format <0-999>.<0-999>.<0-999> represents application version can used check application upgrade.          values can 1-part or 2-part. not necessary have 3-part value.          updated version of application must have versionnumber value higher previous version. required namespace >= 2.5. -->     <versionnumber>1.0.1</versionnumber>      <!-- string value (such "v1", "2.5", or "alpha 1") represents version of application, should shown users. optional. -->     <!--<versionlabel></versionlabel>-->      <!-- application version designator (such "v1", "2.5", or "alpha 1"). required namespace < 2.5. -->     <!--<version>0.0.0</version>-->      <!-- description, displayed in air application installer. may have multiple values each language. see samples or xsd schema file. optional. -->     <!--<description></description>-->      <!-- copyright information. optional -->     <!--<copyright></copyright>-->      <!-- publisher id. used if you're updating application created prior 1.5.3 -->     <!--<publisherid></publisherid>-->      <!-- identifies actionscript extensions used application. -->     <extensions>         <extensionid>com.industrycorp.extensions</extensionid>     </extensions>      <!-- settings application's initial window. required. -->     <initialwindow>         <!-- main swf or html file of application. required. -->         <content>inapppurchases.swf</content>          <!-- title of main window. optional. -->         <!--<title></title>-->          <!-- type of system chrome use (either "standard" or "none"). optional. default standard. -->         <!--<systemchrome></systemchrome>-->          <!-- whether window transparent. applicable when systemchrome none. optional. default false. -->         <!--<transparent></transparent>-->          <!-- whether window visible. optional. default false. -->         <visible>true</visible>          <!-- whether user can minimize window. optional. default true. -->         <!--<minimizable></minimizable>-->          <!-- whether user can maximize window. optional. default true. -->         <!--<maximizable></maximizable>-->          <!-- whether user can resize window. optional. default true. -->         <!--<resizable></resizable>-->          <!-- window's initial width in pixels. optional. -->         <!--<width></width>-->          <!-- window's initial height in pixels. optional. -->         <!--<height></height>-->          <!-- window's initial x position. optional. -->         <!--<x></x>-->          <!-- window's initial y position. optional. -->         <!--<y></y>-->          <!-- window's minimum size, specified width/height pair in pixels, such "400 200". optional. -->         <!--<minsize></minsize>-->          <!-- window's initial maximum size, specified width/height pair in pixels, such "1600 1200". optional. -->         <!--<maxsize></maxsize>-->          <!-- aspect ratio of app ("portrait" or "landscape" or "any"). optional. mobile only. default natural orientation of device -->         <!--<aspectratio></aspectratio>-->          <!-- whether app begin auto-orienting on launch. optional. mobile only. default false -->         <autoorients>true</autoorients>          <!-- whether app launches in full screen. optional. mobile only. default false -->         <fullscreen>true</fullscreen>          <!-- render mode app (either auto, cpu, gpu, or direct). optional. default auto -->         <!--<rendermode></rendermode>-->          <!-- whether default direct mode rendering context allocates storage depth , stencil buffers.  optional.  default false. -->         <!--<depthandstencil></depthandstencil>-->          <!-- whether or not pan when soft keyboard raised or lowered (either "pan" or "none").  optional.  defaults "pan." -->         <!--<softkeyboardbehavior></softkeyboardbehavior>-->          <!-- display resolution app (either "standard" or "high"). optional, osx-only. default "standard" -->         <!-- <requesteddisplayresolution></requesteddisplayresolution> -->     </initialwindow>      <!-- recommend omitting supportedprofiles element, in turn permits application deployed devices supported air.          if wish restrict deployment (i.e., mobile devices) add element , list profiles application support. -->     <!--<supportedprofiles>desktop extendeddesktop mobiledevice extendedmobiledevice</supportedprofiles>-->      <!-- languages supported application. these languages can specified -->     <!--<supportedlanguages>en de cs es fr ja ko nl pl pt ru sv tr zh</supportedlanguages>-->      <!-- subpath of standard default installation location use. optional. -->     <!--<installfolder></installfolder>-->      <!-- subpath of programs menu use. (ignored on operating systems without programs menu.) optional. -->     <!--<programmenufolder></programmenufolder>-->      <!-- icon system uses application. @ least 1 resolution, specify path png file included in air package. optional. -->     <!--<icon>         <image16x16></image16x16>         <image29x29></image29x29>         <image32x32></image32x32>         <image36x36></image36x36>         <image48x48></image48x48>         <image50x50></image50x50>         <image57x57></image57x57>         <image58x58></image58x58>         <image72x72></image72x72>         <image96x96></image96x96>         <image100x100></image100x100>         <image114x114></image114x114>         <image128x128></image128x128>         <image144x144></image144x144>         <image512x512></image512x512>         <image732x412></image732x412>         <image1024x1024></image1024x1024>     </icon>-->      <!-- whether application handles update when user double-clicks update version of air file (true),          or default air application installer handles update (false). optional. default false. -->     <!--<customupdateui></customupdateui>-->      <!-- whether application can launched when user clicks link in web browser. optional. default false. -->     <!--<allowbrowserinvocation></allowbrowserinvocation>-->      <!-- listing of file types application can register. optional. -->     <!--<filetypes>-->     <!-- defines 1 file type. optional. -->     <!--<filetype>-->     <!-- name system displays registered file type. required. -->     <!--<name></name>-->     <!-- extension register. required. -->     <!--<extension></extension>-->     <!-- description of file type. optional. -->     <!--<description></description>-->     <!-- mime content type. -->     <!--<contenttype></contenttype>-->     <!-- icon display file type. optional. -->     <!--<icon>         <image16x16></image16x16>         <image32x32></image32x32>         <image48x48></image48x48>         <image128x128></image128x128>     </icon>-->     <!--</filetype>-->     <!--</filetypes>-->      <!-- ios specific capabilities -->     <!--<iphone>-->         <!-- list of plist key/value pairs added application info.plist -->         <!--<infoadditions>-->             <!--<![cdata[-->             <!--<key>uidevicefamily</key>-->             <!--<array>-->                 <!-- iphone , ipod touch devices -->                 <!--<string>1</string>-->                 <!-- ipad devices -->                 <!--<string>2</string>-->             <!--</array>-->             <!--<key>uistatusbarstyle</key>-->             <!--<string>uistatusbarstyleblackopaque</string>-->             <!--<key>uirequirespersistentwifi</key>-->             <!--<string>yes</string>-->             <!--]]>-->         <!--</infoadditions>-->          <!-- list of plist key/value pairs added application entitlements.plist -->         <!--<entitlements>             <![cdata[             <key>keychain-access-groups</key>             <array>                 <string></string>                 <string></string>             </array>             ]]>         </entitlements>-->          <!-- display resolution app (either "standard" or "high"). optional. default "standard" -->         <!--<requesteddisplayresolution>high</requesteddisplayresolution>-->         <!-- forcing render mode cpu devices mentioned. optional  -->         <!--<forcecpurendermodefordevices></forcecpurendermodefordevices> -->         <!-- file containing line separated list of external swf paths. these swfs won't packaged inside application         , corresponding stripped swfs output in externalstrippedswfs folder. -->         <!--<externalswfs></externalswfs> -->     <!--</iphone>-->      <!-- android specific tags passed androidmanifest.xml file. -->     <android>          <manifestadditions>              <![cdata[             <manifest android:installlocation="auto">                 <uses-permission android:name="android.permission.internet"/>                 <!--<uses-permission android:name="android.permission.write_external_storage"/>-->                 <!--<uses-permission android:name="android.permission.read_phone_state"/>-->                 <!--<uses-permission android:name="android.permission.vibrate"/>-->                 <!--<uses-permission android:name="android.permission.access_fine_location"/>-->                 <!--<uses-permission android:name="android.permission.disable_keyguard"/>-->                 <!--<uses-permission android:name="android.permission.wake_lock"/>-->                 <!--<uses-permission android:name="android.permission.camera"/>-->                 <!--<uses-permission android:name="android.permission.record_audio"/>-->                 <!--<uses-permission android:name="android.permission.access_network_state"/>-->                 <!--<uses-permission android:name="android.permission.access_wifi_state"/>-->                 <uses-permission android:name="com.android.vending.billing"/>                  <!--<uses-feature android:required="true" android:name="android.hardware.touchscreen.multitouch"/>-->                 <application android:enabled="true">                      <activity android:excludefromrecents="false">                         <intent-filter>                             <action android:name="android.intent.action.main"/>                             <category android:name="android.intent.category.launcher"/>                         </intent-filter>                     </activity>                     <activity android:name=".asyncactivity" android:label="async_activity"/>                 </application>             </manifest>             ]]>             </manifestadditions>           <!-- color depth app (either "32bit" or "16bit"). optional. default 16bit before namespace 3.0, 32bit after -->         <!--<colordepth></colordepth>-->         <!-- indicates if app contains video or not. necessary ordering of video planes graphics plane, in jellybean - if app video must set true - valid values true or false -->         <!-- <containsvideo></containsvideo> -->     </android>  </application> 

my activity class:

public class asyncactivity extends activity {     public void oncreate(bundle savedinstancestate) {         super.oncreate(savedinstancestate);         iapmanager.getinstance().getcontext().dispatchstatuseventasync("message", "this shit b cray cray");         iapmanager.getinstance().makepurchase(this);     }      @override     protected void onactivityresult(int requestcode, int resultcode, intent data) {          // pass on activity result helper handling         log.d("iapmanager", "shit hit fan");         if (!iapmanager.getinstance().gethelper().handleactivityresult(requestcode, resultcode, data)) {             // not handled, handle ourselves (here's you'd             // perform handling of activity results not related in-app             // billing...             super.onactivityresult(requestcode, resultcode, data);         }     }      @override     public void ondestroy() {         iapmanager.getinstance().endpurchase(this);         super.ondestroy();     } } 

initializing activity in java code:

intent intent = new intent(context.getactivity(), asyncactivity.class); context.getactivity().startactivity(intent); 

so found out native androidmanifest.xml not used @ in extension, 1 used in air.

the answer problem include qualified name of class it's seen in java:

incorrect:

<activity android:name=".asyncactivity"/> 

correct:

<activity android:name="com.industrycorp.androidinapppurchaselib.asyncactivity"/>  

Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -