Reputation: 1037
I am using native extensions to build a custom video recording interface, the code to launch this activity is:
@Override
public FREObject call(FREContext freContext, FREObject[] args) {
Context context = freContext.getActivity().getApplicationContext();
Intent myIntent = new Intent(context, VideoRecorder.class);
int layoutID = freContext.getResourceId("layout.video_recorder");
int surfaceViewID = freContext.getResourceId("id.surfaceView");
int toggleRecordingButtonID = freContext.getResourceId("id.toggleRecordingButton");
myIntent.putExtra("layoutID", layoutID);
myIntent.putExtra("surfaceViewID", surfaceViewID);
myIntent.putExtra("toggleRecordingButtonID", toggleRecordingButtonID);
context.startActivity(myIntent);
return null;
}
Since I'm using custom activity I've added the following lines to my Flash manifest xml file:
<application android:enabled="true">
<activity android:name="com.xxxxx.videorecorderlib.VideoRecorder"></activity>
</application>
"com.xxxxx.videorecorderlib" being my native Android package in which VideoRecorder resides.
When I build and run the app through Flash and on my Android phone I get the following error in the ADT LogCat:
07-22 17:25:33.282: D/VideoRecorder(15369): android.content.ActivityNotFoundException: Unable to find explicit activity class {air.com.xxxxx.videorecorderprototype/com.lxxxxx.videorecorderlib.VideoRecorder2}; have you declared this activity in your AndroidManifest.xml?
Where "air.com.xxxxx.videorecorderprototype" is my Air app ID. Please can anyone tell me why I'm getting this error? I've tried adding the <activity>
tags in the Android native manifest too but I still got the same errors (tried the fully qualified name and the . syntax).
Thanks!
Upvotes: 0
Views: 992
Reputation: 1037
Oops, found the reason why it was not working. I had the <application>
tag as child of <manifestAdditions>
instead of <manifest>
.
Hope this helps someone down the line!
Upvotes: 1