ExtensionContext.createExtensionContext failed!
Hi,
I know this is disscussed before but it did not solve my problem. I was sure that my extension id is the same throughout my whole project, so I don't understand why my project terminate when it hit _ExtensionContext = ExtensionContext.createExtensionContext("com.jinyee.samples.SampleANE",null); Here are parts of my code:
SampleANE.as(the as file that produce the swc file which is eventually packaged into .ane):
package com.jinyee.samples.ANESample
import flash.events.EventDispatcher;
import flash.events.IEventDispatcher;
import flash.external.ExtensionContext;
public class SampleANE extends EventDispatcher
private var _ExtensionContext:ExtensionContext;
public function SampleANE(target:IEventDispatcher=null)
trace("creating...GO next please!")
_ExtensionContext = ExtensionContext.createExtensionContext("com.jinyee.samples.SampleANE",null);
super(target);
trace("created done");
public function dispose():void
_ExtensionContext.dispose();
public function open_key(sub_key_string:String):String
return _ExtensionContext.call("open_key",sub_key_string) as String;
public function writing_data_to_key(key_data_string:String, key_value_string:String):String
return _ExtensionContext.call("writing_data_to_key",key_data_string,key_value_string) as String;
public function reading_data_to_key(key_value_string:String):String
return _ExtensionContext.call("reading_data_to_key",key_value_string) as String;
public function deleting_key():String
return _ExtensionContext.call("deleting_key") as String;
public function closing_key():String
return _ExtensionContext.call("closing_key") as String;
Descriptor.xml(to be used in packaging .ane):
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<extension xmlns="http://ns.adobe.com/air/extension/3.1">
<id>com.jinyee.samples.SampleANE</id>
<versionNumber>1.0.0</versionNumber>
<platforms>
<platform name="Windows-x86">
<applicationDeployment>
<nativeLibrary>AccesingRegistryKey.dll</nativeLibrary>
<initializer>ExtInitializer</initializer>
<finalizer>ExtFinalizer</finalizer>
</applicationDeployment>
</platform>
</platforms>
</extension>
SampleANEProject.mxml(where i use my native extension):
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<fx:Script>
<![CDATA[
import com.jinyee.samples.ANESample.SampleANE
public var sample:SampleANE = new SampleANE(); //projected terminated here!
public function opening_key():void
trace("Opening Key " + sample.open_key("SOFTWARE\\TestAccess"));
public function reading_from_key():void
trace("Reading from key " + sample.reading_data_to_key("Accessing"));
public function writing_to_key():void
trace("Writing to key " + sample.writing_data_to_key("12345","Accessing"));
public function deleting_key():void
trace("Deleting key" + sample.deleting_key());
public function closing_key():void
trace("Closing key" + sample.closing_key());
protected function appClosing(e:Event):void
sample.dispose();
]]>
</fx:Script>
</s:WindowedApplication>
SampleANEProject-app.xml(my Project -app xml):
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<application xmlns="http://ns.adobe.com/air/application/3.1">
<!-- Adobe AIR Application Descriptor File Template.
Specifies parameters for identifying, installing, and launching AIR applications.
xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/3.1
The last segment of the namespace specifies the version
of the AIR runtime required for this application to run.
minimumPatchLevel - The minimum patch level of the AIR runtime required to run
the application. Optional.
-->
<!-- A universally unique application identifier. Must be unique across all AIR applications.
Using a reverse DNS-style name as the id is recommended. (Eg. com.example.ExampleApplication.) Required. -->
<id>SampleANEProject</id>
<!-- Used as the filename for the application. Required. -->
<filename>SampleANEProject</filename>
<!-- The name that is displayed in the AIR application installer.
May have multiple values for each language. See samples or xsd schema file. Optional. -->
<name>SampleANEProject</name>
<!-- A string value of the format <0-999>.<0-999>.<0-999> that represents application version which can be used to check for application upgrade.
Values can also be 1-part or 2-part. It is not necessary to have a 3-part value.
An updated version of application must have a versionNumber value higher than the previous version. Required for namespace >= 2.5 . -->
<versionNumber>0.0.0</versionNumber>
<!-- A string value (such as "v1", "2.5", or "Alpha 1") that represents the version of the application, as it should be shown to users. Optional. -->
<!-- <versionLabel></versionLabel> -->
<!-- Description, displayed in the AIR application installer.
May have multiple values for each language. See samples or xsd schema file. Optional. -->
<!-- <description></description> -->
<!-- Copyright information. Optional -->
<!-- <copyright></copyright> -->
<!-- Publisher ID. Used if you're updating an application created prior to 1.5.3 -->
<!-- <publisherID></publisherID> -->
<!-- Settings for the application's initial window. Required. -->
<initialWindow>
<!-- The main SWF or HTML file of the application. Required. -->
<!-- Note: In Flash Builder, the SWF reference is set automatically. -->
<content>[This value will be overwritten by Flash Builder in the output app.xml]</content>
<!-- The title of the main window. Optional. -->
<!-- <title></title> -->
<!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
<!-- <systemChrome></systemChrome> -->
<!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
<!-- <transparent></transparent> -->
<!-- Whether the window is initially visible. Optional. Default false. -->
<!-- <visible></visible> -->
<!-- Whether the user can minimize the window. Optional. Default true. -->
<!-- <minimizable></minimizable> -->
<!-- Whether the user can maximize the window. Optional. Default true. -->
<!-- <maximizable></maximizable> -->
<!-- Whether the user can resize the window. Optional. Default true. -->
<!-- <resizable></resizable> -->
<!-- The window's initial width in pixels. Optional. -->
<!-- <width></width> -->
<!-- The window's initial height in pixels. Optional. -->
<!-- <height></height> -->
<!-- The window's initial x position. Optional. -->
<!-- <x></x> -->
<!-- The window's initial y position. Optional. -->
<!-- <y></y> -->
<!-- The window's minimum size, specified as a width/height pair in pixels, such as "400 200". Optional. -->
<!-- <minSize></minSize> -->
<!-- The window's initial maximum size, specified as a width/height pair in pixels, such as "1600 1200". Optional. -->
<!-- <maxSize></maxSize> -->
<!-- The initial aspect ratio of the app when launched (either "portrait" or "landscape"). Optional. Mobile only. Default is the natural orientation of the device -->
<!-- <aspectRatio></aspectRatio> -->
<!-- Whether the app will begin auto-orienting on launch. Optional. Mobile only. Default false -->
<!-- <autoOrients></autoOrients> -->
<!-- Whether the app launches in full screen. Optional. Mobile only. Default false -->
<!-- <fullScreen></fullScreen> -->
<!-- The render mode for the app (either auto, cpu, gpu, or direct). Optional. Default auto -->
<!-- <renderMode></renderMode> -->
<!-- Whether or not to pan when a soft keyboard is raised or lowered (either "pan" or "none"). Optional. Defaults "pan." -->
<!-- <softKeyboardBehavior></softKeyboardBehavior> -->
<autoOrients>false</autoOrients>
<fullScreen>false</fullScreen>
<visible>false</visible>
</initialWindow>
<!-- We recommend omitting the supportedProfiles element, -->
<!-- which in turn permits your application to be deployed to all -->
<!-- devices supported by AIR. If you wish to restrict deployment -->
<!-- (i.e., to only mobile devices) then add this element and list -->
<!-- only the profiles which your application does support. -->
<!-- <supportedProfiles>desktop extendedDesktop mobileDevice extendedMobileDevice</supportedProfiles> -->
<!-- The subpath of the standard default installation location to use. Optional. -->
<!-- <installFolder></installFolder> -->
<!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. -->
<!-- <programMenuFolder></programMenuFolder> -->
<!-- The icon the system uses for the application. For at least one resolution,
specify the path to a PNG file included in the AIR package. Optional. -->
<!-- <icon>
<image16x16></image16x16>
<image32x32></image32x32>
<image36x36></image36x36>
<image48x48></image48x48>
<image57x57></image57x57>
<image72x72></image72x72>
<image114x114></image114x114>
<image128x128></image128x128>
</icon> -->
<!-- Whether the application handles the update when a user double-clicks an update version
of the AIR file (true), or the default AIR application installer handles the update (false).
Optional. Default false. -->
<!-- <customUpdateUI></customUpdateUI> -->
<!-- Whether the application can be launched when the user clicks a link in a web browser.
Optional. Default false. -->
<!-- <allowBrowserInvocation></allowBrowserInvocation> -->
<!-- Listing of file types for which the application can register. Optional. -->
<!-- <fileTypes> -->
<!-- Defines one file type. Optional. -->
<!-- <fileType> -->
<!-- The name that the system displays for the registered file type. Required. -->
<!-- <name></name> -->
<!-- The extension to register. Required. -->
<!-- <extension></extension> -->
<!-- The description of the file type. Optional. -->
<!-- <description></description> -->
<!-- The MIME content type. -->
<!-- <contentType></contentType> -->
<!-- The icon to display for the file type. Optional. -->
<!-- <icon>
<image16x16></image16x16>
<image32x32></image32x32>
<image48x48></image48x48>
<image128x128></image128x128>
</icon> -->
<!-- </fileType> -->
<!-- </fileTypes> -->
<!-- iOS specific capabilities -->
<!-- <iPhone> -->
<!-- A list of plist key/value pairs to be added to the application Info.plist -->
<!-- <InfoAdditions>
<![CDATA[
<key>UIDeviceFamily</key>
<array>
<string>1</string>
<string>2</string>
</array>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleBlackOpaque</string>
<key>UIRequiresPersistentWiFi</key>
<string>YES</string>
]]>
</InfoAdditions> -->
<!-- A list of plist key/value pairs to be added to the application Entitlements.plist -->
<!-- <Entitlements>
<![CDATA[
<key>keychain-access-groups</key>
<array>
<string></string>
<string></string>
</array>
]]>
</Entitlements> -->
<!-- Display Resolution for the app (either "standard" or "high"). Optional. Default "standard" -->
<!-- <requestedDisplayResolution></requestedDisplayResolution> -->
<!-- </iPhone> -->
<!-- Specify Android specific tags that get passed to 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.ACCESS_FINE_LOCATION"/>
<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>
</application>
</manifest>
]]>
</manifestAdditions> -->
<!-- Color depth for the app (either "32bit" or "16bit"). Optional. Default 16bit before namespace 3.0, 32bit after -->
<!-- <colorDepth></colorDepth> -->
<!-- </android> -->
<!-- End of the schema for adding the android specific tags in AndroidManifest.xml file -->
<extensions>
<extensionID>com.jinyee.samples.SampleANE</extensionID>
</extensions>
</application>
Please help me. I have been craking over this for days! Q.Q
I'm sure, I use Flex 3.6.0 SDK version. When I want to create a library project in 3.6.0, already I couldn't see ExtensionContext class in flash.external package. If I create in v4.6, I'm having problem when I start to debug my v3.6 desktop application. Now I want to learn
Does Flex v3.6.0 support NativeExtension ?
if Yes ,
which class is equal to ExtensionContext in v3.6.0
or How can I import ExtensionContext class to v3.6.0
Thanks
Similar Messages
-
ExtensionContext error while creating Native Extension in Flex 3.6 SDK
I'm creating native extension with Flex 3.6 . Coded native side then created Flex Library Project and then create .ane file. Finally imported .ane file to myFlex Project.
Here is the problem I had. While I'm debugging app, "1046: Type was not found or was not a compile-time constant: ExtensionContext" error occurs. Attached the Library project .as class .
Thanks in Advance
package com.extension.samples
import flash.events.EventDispatcher;
import flash.events.IEventDispatcher;
import flash.external.ExtensionContext;
public class NetworkConnectionANE extends EventDispatcher
public var _extContext : ExtensionContext;
public function NetworkConnectionANE(target:IEventDispatcher=null)
_extContext = ExtensionContext.createExtensionContext("com.extension.samples.NetworkConnectionANE", null);
super(target);
public function Connect(path:String):int
return _extContext.call("nativeFunc", path);
public function dispose():void
_extContext.dispose();
Edit: I tried to use .swc file that created from library project in another Flex Desktop app, but the same error
Also tried with _extContext = ExtensionContext.createExtensionContext("com.extension.samples.NetworkConnectionANE","");
Edit: The problem about Flex SDK, there is no problem in SDK 4.6. Now the question is, How to use Extension in lib project in Flex 3.6 SDK ?I'm sure, I use Flex 3.6.0 SDK version. When I want to create a library project in 3.6.0, already I couldn't see ExtensionContext class in flash.external package. If I create in v4.6, I'm having problem when I start to debug my v3.6 desktop application. Now I want to learn
Does Flex v3.6.0 support NativeExtension ?
if Yes ,
which class is equal to ExtensionContext in v3.6.0
or How can I import ExtensionContext class to v3.6.0
Thanks -
My company is developing a game for the iPhone and iPad devices using Flash cs5.5 and Air3.0
The client requires that certain features be supported - such things like GameCenter, Rating system, etc... none of which is currently supported by flash for the iOS.
However, they did provide us with a bunch of xCode sample files on how they want things to work.
My idea was to bridge the gap in functionality by creating a native exention that utilized the xcode source that was given to me, thus giving me the functionality that is required.
But first, I need to actually CREATE a native extension, even just a basic echo/hello world... I have followed all the steps from various guides and tutorials and I have managed to create an ipa and put it on my iPad2 to test, but when the program starts up, nothing happens, I am left with a black screen. When I comment out the lines of code that intialize the extension, it fires up just fine.
(and yes, I even tried to put things in try blocks in case there was an error - no luck)
So I am hoping that someone can read through the process of what I am doing below and point out what I am doing wrong, or what I am missing.
What I am using:
Mac Mini running OSX 10.7.2 - this is used to run xCode 4.1 build 4B110
PC - Windows 7 home 64bit - Running Flash CS5.5 (version 11.5.1.3469) with the AIR 3.0 SDK inside it. I also have the AIR 3.0 sdk in a seperate folder for command line running. (This is my primary developement platform)
The PC does have flash builder installed, but I have never really used it, nor do I know how to use it... everything that has been built to date has been done using Flash CS5.5
So, this is what I have done.
The first thing I do is create a .a static library on the mac.
I open xcode and create a new project.
Select iOS Framework and Library, then select "Cocoa touch Static Library"
Give it a name, in this case "EchoExtension" and put it in a folder.
I then delete the EchoExtension.h file as all the samples I have seen to date don't use it.
I then add "FlashRuntimeExtension.h" to the project from the AIR3.0 sdk frameworks folder on my PC
I then delete everything in my .m file and, following several different examples and tutorials, type up the following code:
// EchoExtension.m
// EchoExtension
#include "FlashRuntimeExtensions.h"
FREObject echo(FREContext ctx, void* funcData, uint32_t argc, FREObject argv[]) {
return argv[0];
//----------- Extention intializer and finalizer ----------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------ -
// A native context instance is created
void ContextInitializer(void* extData, const uint8_t* ctxType, FREContext ctx, uint32_t* numFunctionsToTest, const FRENamedFunction** functionsToSet) {
// setup the number of functions in this extention
// for easy reference, set the number of function that this extention will use.
int FunctionCount = 1;
// set the pointer reference to the number of function this extention will use.
*numFunctionsToTest = FunctionCount;
// create an array to store all the functions we will use.
FRENamedFunction* func = (FRENamedFunction*)malloc(sizeof(FRENamedFunction)*FunctionCount);
// create an array entry for each function
func[0].name = (const uint8_t*)"echo"; // the name of the function
func[0].functionData = NULL; // the data type
func[0].function = &echo; // reference to the actual function
// save the array in a pointer.
*functionsToSet = func;
// A native context instance is disposed
void ContextFinalizer(FREContext ctx) {
return;
// Initialization function of each extension
void ExtInitializer(void** extDataToSet, FREContextInitializer* ctxInitializerToSet, FREContextFinalizer* ctxFinalizerToSet) {
*extDataToSet = NULL;
*ctxInitializerToSet = &ContextInitializer;
*ctxFinalizerToSet = &ContextFinalizer;
// Called when extension is unloaded
void ExtFinalizer(void* extData) {
return;
I then go "Product", "Build" and it creates libEchoExtension.a
I copy this .a file over to my PC.
I am now finish with that god foresaken mac (*shudders*)
Back on my PC, I create a folder for my test project. For all intents an purposes, let's call this "D:\src\EchoExtension" I then create 2 folders, one called "lib" and one called "app". Lib is where I will create the actionscript source for my extension.
In my lib folder, I create a new fla in flash cs5.5 called "EchoExtension.fla"
I create in my lib folder, the following:
com\extensions\EchoExtension\EchoExtension.as
a folder called "Build" in which I place my libEchoExtension.a file.
in my EchoExtension.as file, I place the following code:
package com.extensions.EchoExtension
import flash.events.EventDispatcher;
import flash.events.IEventDispatcher;
import flash.external.ExtensionContext;
public class EchoExtension extends EventDispatcher
protected var _extensionContext:ExtensionContext;
* Constructor.
public function EchoExtension()
super();
// Initialize extension.
_extensionContext = ExtensionContext.createExtensionContext( "com.extensions.EchoExtension", "main" );
public function echo(Prompt:String):String
return _extensionContext.call( "echo" ) as String;
In my main fla, on the first layer of the time line, I simply put the following code to make sure that the as file get's included when I publish the swc.
import com.extensions.EchoExtension.EchoExtension;
var ext:EchoExtension = new EchoExtension();
stop();
I then open up my fla's publish settings, turn off the swf - which I don't need, and check the swc and make sure that it outputs into my build folder. "./Build/EchoExtension.swc"
I also set the player to Air 3.0 (which I can do since I have successfully integrated AIR 3.0 along side my AIR 2.6 and can build both without any problems)
I then publish the swc. So far, so good. No problems.
I then make a copy of the swc and rename it to EchoExtension.swc.zip, at which point I extract the library.swf file from it and also place it in my build folder.
I then create extension.xml in by build folder which contains the following code:
<extension xmlns="http://ns.adobe.com/air/extension/2.5">
<id>com.extensions.EchoExtension</id>
<versionNumber>1</versionNumber>
<platforms>
<platform name="iPhone-ARM">
<applicationDeployment>
<nativeLibrary>libEchoExtension.a</nativeLibrary>
<initializer>ExtInitializer</initializer>
<finalizer>ExtFinalizer</finalizer>
</applicationDeployment>
</platform>
</platforms>
</extension>
Now, at this point I am a little wary, because I am building for the iPad2... the platform is iPhone... I thought that may be a problem and at one point I tested the same build on the iPhone4 and had the same results. I have also tested it using the platform name of iPad-ARM and got the same results... So I don't think that is the problem, but I am unsure.
Now, to make things easier, I created a batch file called "buildane.bat" in my build folder. This is what I will use to create my .ane file and it contains the following command line:
D:\SDKs\AirSDK30\bin\adt -package -target ane EchoExtension.ane extension.xml -swc EchoExtension.swc -platform iPhone-ARM library.swf libEchoExtension.a
I then open a command prompt and run buildane.bat and poof. My ane is created. My build folder has the following files in it now:
buildane.bat
EchoExtension.ane
EchoExtension.swc
EchoExtension.swc.zip
extension.xml
libEchoExtension.a
library.swf
Now that I have my swc, ane, and all that, it's time to create my sample application that will be used to test my new extension.
I go back to my D:\src\EchoExtension folder and go into the app folder I created ealier.
I then create a new flash project called EchoExtensionTester.fla
I open the action script settings, library paths, and add the swc that I created in my D:\src\EchoExtension\lib\build folder to my project.
On my stage, I create an input text field called txtInput, a dynamic text field called txtEcho, and a couple of buttons called btnClear, btnRuntime, and btnEcho
I open up the first layer in the time line and place the following code:
// basic imports.
import flash.desktop.NativeApplication;
import flash.events.MouseEvent;
import flash.text.TextField;
// import the extension from our swc.
import com.extensions.EchoExtension.EchoExtension;
// set our input text field to need the softkeyboard
txtInput.needsSoftKeyboard = true;
// add the event handlers to our buttons.
btnEcho.addEventListener(MouseEvent.CLICK, btnEcho_Click);
btnClear.addEventListener(MouseEvent.CLICK, btnClear_Click);
btnRunTime.addEventListener(MouseEvent.CLICK, btnRunTime_Click);
// create our extension variable.
var ext:EchoExtension;
try
// initialize our echo extension.
ext = new EchoExtension();
} catch (e:Error) {
txtEcho.text = "Error trying to create new EchoExtension:\n\n" + e;
stop();
// clear the echo text field
function btnClear_Click(e:MouseEvent):void
txtEcho.text = "";
// just for testing, put the current version of air runtime into our text field so we can make sure we are running air 3.0
function btnRunTime_Click(e:MouseEvent):void
txtEcho.text += "\nRuntime version = " + NativeApplication.nativeApplication.runtimeVersion;
// call the extension, passing it whatever is in the input text field and have it return it and place it in our echo text field
function btnEcho_Click(e:MouseEvent):void
txtEcho.text += "\n";
try
txtEcho.text += ext.echo(txtInput.text);
} catch (e:Error) {
txtEcho.text += "\nError calling ext.echo: " + e;
I then save the project, Open the Air for iOS settings and set the following: (but yes, I know... I am going to have to use adt to do the build, but I need to create the swf first)
Output file: EchoExtensionTester.ipa
Appname: EchoExtensionTester
Version 1.0
Landscape
Fullscreen On
Auto orientation is off
rendering GPU
device: iPad and iPhone
Res: High
Deployement: I use my certificate and provisionging profile that I use for my Primary project (which work) and set for device testing.
I close the window and save again... but before I publish, I open newly created "EchoExtensionTester-app.xml" that is in my app folder.
I add <extensions> <extensionID>com.extensions.EchoExtension</extensionID> </extensions> to the xml file so now it looks like this:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<application xmlns="http://ns.adobe.com/air/application/3.0">
<extensions>
<extensionID>com.extensions.EchoExtension</extensionID>
</extensions>
<id>EchoExtensionTester</id>
<versionNumber>1.0</versionNumber>
<filename>EchoExtensionTester</filename>
<description/>
<!-- To localize the description, use the following format for the description element.<description><text xml:lang="en">English App description goes here</text><text xml:lang="fr">French App description goes here</text><text xml:lang="ja">Japanese App description goes here</text></description>-->
<name>EchoExtensionTester</name>
<!-- To localize the name, use the following format for the name element.<name><text xml:lang="en">English App name goes here</text><text xml:lang="fr">French App name goes here</text><text xml:lang="ja">Japanese App name goes here</text></name>-->
<copyright/>
<initialWindow>
<content>EchoExtensionTester.swf</content>
<systemChrome>standard</systemChrome>
<transparent>false</transparent>
<visible>true</visible>
<fullScreen>true</fullScreen>
<aspectRatio>landscape</aspectRatio>
<renderMode>gpu</renderMode>
<maximizable>true</maximizable>
<minimizable>true</minimizable>
<resizable>true</resizable>
<autoOrients>false</autoOrients>
</initialWindow>
<icon/>
<customUpdateUI>false</customUpdateUI>
<allowBrowserInvocation>false</allowBrowserInvocation>
<iPhone>
<InfoAdditions>
<![CDATA[<key>UIDeviceFamily</key><array><string>1</string><string>2</string></array>]]>
</InfoAdditions>
<requestedDisplayResolution>high</requestedDisplayResolution>
</iPhone>
</application>
I save the changes to the xml and go back to flash. I then publish.
The swf is created as it should be, but then I get the error message:
Error creating files.
An implmentation for native extension 'com.extensions.EchoExtension' required by the application was not found for the target platform.
Now, while this is a pain in the rear, I new this was going to happen because in my reading of tutorials and samples, they all said that you must use adt to build the ipa... but that's fine... all I wanted anyway was the swf, which I now have in my app folder.
I close down flash as I don't need it anymore and I create a new batch file: (note: I change the names of the cert, provision profile, and password for this post)
cls
"D:\SDKs\AirSDK30\bin\adt" -package -target ipa-ad-hoc -storetype pkcs12 -keystore "D:\src\mycert.p12" -storepass MYPASSWORD -provisioning-profile "D:\src\myprovfile.mobileprovision" "EchoExtensionTester.ipa" "EchoExtensionTester-app.xml" "EchoExtensionTester.swf" -extdir ../lib/Build
set /p dummy=
echo done
I then open a command window in my app folder and run build.bat...
I wait about 2 minutes....
YAY! My ipa file has been created with no errors reported so far.... Time to copy this bad boy to the iPad and see what happens.
I open iTunes, drag "EchoExtensionTester.ipa" over to the Apps, then sync my device....
YAY! iTunes has successfully installed the ipa on the device... and there is by bright and shiney blank icon for Echo Extension Tester...
I open the app.... and.....
nothing.
I wait
still nothing.
I go to the bathroom.
I get back... still nothing... just a black screen.
I press the iPad home button, the app minimized, I restore it... nothing... black screen.
hrm. Time to do a little trial and error to see if I can figure out where the break down is.
As a test, I open my fla and I comment out the following lines:
ext = new EchoExtension();
txtEcho.text += ext.echo(txtInput.text);
I then rebuild the swf... get the same error (don't care)... I then rebuild the ipa using the batch file.... and re-install it on the device when it's done.
The exact same thing....
I open the xml file... and remove the <extensionID>com.extensions.EchoExtension</extensionID> line, save and re-run the batch file again... wait for the ipa to finish, and run it on the device.
I fire up the program on the iPad and it launches perfectly... except for the commented line of code to actually create and call the extension, everything works as it should. The runtime on the device is reporting as 3.0.0.4080
As a test, I open the .fla back up and uncomment the 2 lines I commented out above... keeping the extensionID out of the xml file, I re-publish the ipa.... of course, this time, it actually creates the ipa from flash because the extension id is not in the xml.
I put the ipa file with the extension code in place on the ipad... Fire it up and put some text into the txtInput and press the echo button. I get the following error:Error calling ext.echo: TypeError: Error #1009
I suspect that is because I failed into include the extension in the descriptor... but when I build it with the extensionid in the xml, I just get a black screen. I am 99% sure that the extension context in the ext object is null (because that is what happens when I run it in flash debug without the extension lines in the xml)
And here I am stuck.
Can anyone tell me what I am doing wrong or what I have forgotten to do?
Thanks.I have been trying to get the remote debugging working with my flash and ipad2... but I can't seem to figure it out. I looked at several tutorials, but the ipad build just doesn't want to seem to connect to the flash remote debugger.
Anyway... here is a little more information.
I moved the initialization of the extension from the start of the application to the button event itself. Now, the application will start up exactly as it's supposed to, but when I press the button that creates and initalizes the extension and does the echo call, the application crashes.
Here is the new code:
// basic imports.
import flash.desktop.NativeApplication;
import flash.events.MouseEvent;
import flash.text.TextField;
// import the extension from our swc.
import com.extensions.EchoExtension.EchoExtension;
// set our input text field to need the softkeyboard
txtInput.needsSoftKeyboard = true;
// add the event handlers to our buttons.
btnEcho.addEventListener(MouseEvent.CLICK, btnEcho_Click);
btnClear.addEventListener(MouseEvent.CLICK, btnClear_Click);
btnRunTime.addEventListener(MouseEvent.CLICK, btnRunTime_Click);
txtEcho.text += "Initialization complete.\n";
stop();
// clear the echo text field
function btnClear_Click(e:MouseEvent):void
txtEcho.text = "";
// just for testing, put the current version of air runtime into our text field so we can make sure we are running air 3.0
function btnRunTime_Click(e:MouseEvent):void
txtEcho.text += "Runtime version = " + NativeApplication.nativeApplication.runtimeVersion +"\n" ;
// call the extension, passing it whatever is in the input text field and have it return it and place it in our echo text field
function btnEcho_Click(e:MouseEvent):void
// create our extension variable.
try
var ext:EchoExtension = new EchoExtension();
txtEcho.text += ext.echo(txtInput.text) +"\n" ;
ext = null;
} catch (err:Error) {
txtEcho.text += "Error: " + err.message +"\n" ;
Now, program crashes are an entirely different animal because the ipad creates a crash log! YAY!
this is what the crash log contains:
Incident Identifier: 4BF67A2C-FD36-495D-BB56-B3DCA4772EB8
CrashReporter Key: 7a4dd56d46eb23a7701ad55245de2bca11c48b32
Hardware Model: iPad2,2
Process: EchoExtensionTester [9272]
Path: /var/mobile/Applications/90B3B31D-F516-4094-BE3B-88E1324419EC/EchoExtensionTester.app/Ech oExtensionTester
Identifier: EchoExtensionTester
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2011-10-28 14:17:48.145 -0300
OS Version: iPhone OS 4.3.5 (8L1)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00000000
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 EchoExtensionTester 0x00813aac 0x1000 + 8465068
1 EchoExtensionTester 0x005f88ec 0x1000 + 6256876
2 EchoExtensionTester 0x00372ba4 0x1000 + 3611556
3 EchoExtensionTester 0x006dd7c8 0x1000 + 7194568
4 EchoExtensionTester 0x006dd25c 0x1000 + 7193180
5 EchoExtensionTester 0x006de304 0x1000 + 7197444
6 EchoExtensionTester 0x006dc750 0x1000 + 7190352
7 EchoExtensionTester 0x006730cc 0x1000 + 6758604
8 EchoExtensionTester 0x006dd0ac 0x1000 + 7192748
9 EchoExtensionTester 0x006dc750 0x1000 + 7190352
10 EchoExtensionTester 0x006730cc 0x1000 + 6758604
11 EchoExtensionTester 0x006dd0ac 0x1000 + 7192748
12 EchoExtensionTester 0x006dc750 0x1000 + 7190352
13 EchoExtensionTester 0x006730cc 0x1000 + 6758604
14 EchoExtensionTester 0x006dd0ac 0x1000 + 7192748
15 EchoExtensionTester 0x0032fc90 0x1000 + 3337360
16 EchoExtensionTester 0x00329e1c 0x1000 + 3313180
17 EchoExtensionTester 0x0032171c 0x1000 + 3278620
18 EchoExtensionTester 0x0032179c 0x1000 + 3278748
19 EchoExtensionTester 0x0032ae00 0x1000 + 3317248
20 EchoExtensionTester 0x00137328 0x1000 + 1270568
21 EchoExtensionTester 0x004f9a5c 0x1000 + 5212764
22 EchoExtensionTester 0x00035adc 0x1000 + 215772
23 EchoExtensionTester 0x002f6824 0x1000 + 3102756
24 EchoExtensionTester 0x002f7f18 0x1000 + 3108632
25 UIKit 0x35ef9bee 0x35ede000 + 113646
26 UIKit 0x35ef9568 0x35ede000 + 111976
27 UIKit 0x35ee230c 0x35ede000 + 17164
28 UIKit 0x35ee1c4c 0x35ede000 + 15436
29 GraphicsServices 0x321e9e70 0x321e5000 + 20080
30 CoreFoundation 0x316f3a90 0x3167e000 + 481936
31 CoreFoundation 0x316f5838 0x3167e000 + 489528
32 CoreFoundation 0x316f6606 0x3167e000 + 493062
33 CoreFoundation 0x31686ebc 0x3167e000 + 36540
34 CoreFoundation 0x31686dc4 0x3167e000 + 36292
35 GraphicsServices 0x321e9418 0x321e5000 + 17432
36 GraphicsServices 0x321e94c4 0x321e5000 + 17604
37 UIKit 0x35f0cd62 0x35ede000 + 191842
38 UIKit 0x35f0a800 0x35ede000 + 182272
39 EchoExtensionTester 0x001819e4 0x1000 + 1575396
40 EchoExtensionTester 0x00813a6c 0x1000 + 8465004
Thread 1:
0 libsystem_kernel.dylib 0x35afe3ec 0x35aec000 + 74732
1 libsystem_c.dylib 0x31bf06d8 0x31bbc000 + 214744
2 libsystem_c.dylib 0x31bf0bbc 0x31bbc000 + 215996
Thread 2 name: Dispatch queue: com.apple.libdispatch-manager
Thread 2:
0 libsystem_kernel.dylib 0x35afefbc 0x35aec000 + 77756
1 libdispatch.dylib 0x31660ed4 0x31660000 + 3796
2 libdispatch.dylib 0x31661f3a 0x31660000 + 7994
3 libdispatch.dylib 0x316614ec 0x31660000 + 5356
4 libsystem_c.dylib 0x31bf058a 0x31bbc000 + 214410
5 libsystem_c.dylib 0x31bf0bbc 0x31bbc000 + 215996
Thread 3 name: WebThread
Thread 3:
0 libsystem_kernel.dylib 0x35afbc00 0x35aec000 + 64512
1 libsystem_kernel.dylib 0x35afb758 0x35aec000 + 63320
2 CoreFoundation 0x316f42b8 0x3167e000 + 484024
3 CoreFoundation 0x316f6562 0x3167e000 + 492898
4 CoreFoundation 0x31686ebc 0x3167e000 + 36540
5 CoreFoundation 0x31686dc4 0x3167e000 + 36292
6 WebCore 0x3248e27e 0x32488000 + 25214
7 libsystem_c.dylib 0x31bef30a 0x31bbc000 + 209674
8 libsystem_c.dylib 0x31bf0bb4 0x31bbc000 + 215988
Thread 4:
0 libsystem_kernel.dylib 0x35afdd18 0x35aec000 + 72984
1 libsystem_c.dylib 0x31c16860 0x31bbc000 + 370784
2 libsystem_c.dylib 0x31bbdeb2 0x31bbc000 + 7858
3 EchoExtensionTester 0x004aa090 0x1000 + 4886672
4 EchoExtensionTester 0x002a0b54 0x1000 + 2751316
5 EchoExtensionTester 0x004aa2fc 0x1000 + 4887292
6 EchoExtensionTester 0x004aa5e8 0x1000 + 4888040
7 EchoExtensionTester 0x004aa748 0x1000 + 4888392
8 libsystem_c.dylib 0x31bef30a 0x31bbc000 + 209674
9 libsystem_c.dylib 0x31bf0bb4 0x31bbc000 + 215988
Thread 5:
0 libsystem_kernel.dylib 0x35afdd18 0x35aec000 + 72984
1 libsystem_c.dylib 0x31c16860 0x31bbc000 + 370784
2 libsystem_c.dylib 0x31bbdeb2 0x31bbc000 + 7858
3 EchoExtensionTester 0x004aa090 0x1000 + 4886672
4 EchoExtensionTester 0x002a0b54 0x1000 + 2751316
5 EchoExtensionTester 0x004aa2fc 0x1000 + 4887292
6 EchoExtensionTester 0x004aa5e8 0x1000 + 4888040
7 EchoExtensionTester 0x004aa748 0x1000 + 4888392
8 libsystem_c.dylib 0x31bef30a 0x31bbc000 + 209674
9 libsystem_c.dylib 0x31bf0bb4 0x31bbc000 + 215988
Thread 6:
0 libsystem_kernel.dylib 0x35afbc74 0x35aec000 + 64628
1 libsystem_kernel.dylib 0x35afbf46 0x35aec000 + 65350
2 libsystem_c.dylib 0x31c16812 0x31bbc000 + 370706
3 libsystem_c.dylib 0x31c169fe 0x31bbc000 + 371198
4 EchoExtensionTester 0x004a9f60 0x1000 + 4886368
5 EchoExtensionTester 0x001b8908 0x1000 + 1800456
6 EchoExtensionTester 0x001b893c 0x1000 + 1800508
7 EchoExtensionTester 0x004aa2fc 0x1000 + 4887292
8 EchoExtensionTester 0x004aa5e8 0x1000 + 4888040
9 EchoExtensionTester 0x004aa748 0x1000 + 4888392
10 libsystem_c.dylib 0x31bef30a 0x31bbc000 + 209674
11 libsystem_c.dylib 0x31bf0bb4 0x31bbc000 + 215988
Thread 7:
0 libsystem_kernel.dylib 0x35afdd18 0x35aec000 + 72984
1 libsystem_c.dylib 0x31c16860 0x31bbc000 + 370784
2 libsystem_c.dylib 0x31bbde86 0x31bbc000 + 7814
3 EchoExtensionTester 0x004aa044 0x1000 + 4886596
4 EchoExtensionTester 0x0039367c 0x1000 + 3745404
5 EchoExtensionTester 0x004aa2fc 0x1000 + 4887292
6 EchoExtensionTester 0x004aa5e8 0x1000 + 4888040
7 EchoExtensionTester 0x004aa748 0x1000 + 4888392
8 libsystem_c.dylib 0x31bef30a 0x31bbc000 + 209674
9 libsystem_c.dylib 0x31bf0bb4 0x31bbc000 + 215988
Thread 0 crashed with ARM Thread State:
r0: 0x03ebb060 r1: 0x00000000 r2: 0x00000000 r3: 0x00000000
r4: 0x043b19e0 r5: 0x00000002 r6: 0x2fdfc178 r7: 0x2fdfc108
r8: 0x043b19e0 r9: 0x007d47d4 r10: 0x2fdfc1e4 r11: 0x043b19f0
ip: 0x00813aad sp: 0x2fdfc03c lr: 0x005f88f4 pc: 0x00813aac
cpsr: 0x68000030
Binary Images:
0x1000 - 0x8d6fff +EchoExtensionTester armv7 <4c58623df42ff7826b2bf3efab136467> /var/mobile/Applications/90B3B31D-F516-4094-BE3B-88E1324419EC/EchoExtensionTester.app/Ech oExtensionTester
0x2fe00000 - 0x2fe25fff dyld armv7 <4d3190188cbf32a8a73f32a8b5bb7adf> /usr/lib/dyld
0x30986000 - 0x309b9fff QuickLook armv7 <29d2d981d1d6358381f5716ee37314b4> /System/Library/Frameworks/QuickLook.framework/QuickLook
0x30ab8000 - 0x30abefff StoreKit armv7 <0deee3e11c7632aab98ab3c026d41e41> /System/Library/Frameworks/StoreKit.framework/StoreKit
0x30ac5000 - 0x30af3fff DataAccess armv7 <3a2e67aa1d8834b7a8fc2fbb56654b15> /System/Library/PrivateFrameworks/DataAccess.framework/DataAccess
0x30af4000 - 0x30b9afff GameKit armv7 <844f6d90111f3e81961a723f557dd2a1> /System/Library/Frameworks/GameKit.framework/GameKit
0x30bbf000 - 0x30c7efff CFNetwork armv7 <b09e0d53de9f3bc8bde494780f3cdd4f> /System/Library/Frameworks/CFNetwork.framework/CFNetwork
0x30c81000 - 0x30d05fff AVFoundation armv7 <eeaf5f4f822436a5bd1655f536e69879> /System/Library/Frameworks/AVFoundation.framework/AVFoundation
0x30e07000 - 0x30f07fff libGLProgrammability.dylib armv7 <c0e6b958279639c098136283c6ad06a8> /System/Library/Frameworks/OpenGLES.framework/libGLProgrammability.dylib
0x30f08000 - 0x30f0bfff ActorKit armv7 <f7aa6cdd654231988aafcf448978f450> /System/Library/PrivateFrameworks/ActorKit.framework/ActorKit
0x30f0c000 - 0x30f52fff CoreTelephony armv7 <af7d1e770e5a3ffd8834a57fb5d40557> /System/Library/Frameworks/CoreTelephony.framework/CoreTelephony
0x30f56000 - 0x30f5dfff AggregateDictionary armv7 <ab9777b39e8e3026ad64dc90323cad7e> /System/Library/PrivateFrameworks/AggregateDictionary.framework/AggregateDictionary
0x30f85000 - 0x31072fff libiconv.2.dylib armv7 <f4146ce07e3031ea8a81fa5516fd77d0> /usr/lib/libiconv.2.dylib
0x3107a000 - 0x310affff AddressBook armv7 <3f2071a77bc134cd82065eef90d4082f> /System/Library/Frameworks/AddressBook.framework/AddressBook
0x310b0000 - 0x311d1fff CoreGraphics armv7 <65f6c8701b563542820a26b0dfc4f6a4> /System/Library/Frameworks/CoreGraphics.framework/CoreGraphics
0x31209000 - 0x31241fff IOKit armv7 <80ae313ad69d3363935c88e51a11862d> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x31242000 - 0x3129bfff EventKit armv7 <0d4e597ee229337183e96e921a72e30a> /System/Library/Frameworks/EventKit.framework/EventKit
0x312af000 - 0x3136bfff MapKit armv7 <806f9ca7eb593d1998587441ce87a396> /System/Library/Frameworks/MapKit.framework/MapKit
0x3136c000 - 0x31466fff GameKitServices armv7 <a69426414c4634cda77409d5890696ac> /System/Library/PrivateFrameworks/GameKitServices.framework/GameKitServices
0x31469000 - 0x314a6fff CoreText armv7 <fb6a72faec2330c4b2cd33c2e9c59588> /System/Library/Frameworks/CoreText.framework/CoreText
0x314a7000 - 0x314abfff libGFXShared.dylib armv7 <a0772a32cd8b3b9194bb0c29807c1c5b> /System/Library/Frameworks/OpenGLES.framework/libGFXShared.dylib
0x314ac000 - 0x314c7fff FTServices armv7 <e23c3572bf3a36a3a99364d18c484f1e> /System/Library/PrivateFrameworks/FTServices.framework/FTServices
0x314c8000 - 0x31519fff libsqlite3.dylib armv7 <8a41cc6a6d9332308bc415d27577fd24> /usr/lib/libsqlite3.dylib
0x31624000 - 0x31626fff libAccessibility.dylib armv7 <d55f1553d14831a2a5435ae27ef75ef4> /usr/lib/libAccessibility.dylib
0x31627000 - 0x3165ffff libCGFreetype.A.dylib armv7 <416c77100b453e3f838831c4c857f8c7> /System/Library/Frameworks/CoreGraphics.framework/Resources/libCGFreetype.A.dylib
0x31660000 - 0x3166dfff libdispatch.dylib armv7 <9a0511ad5ebc3db898f1f49ed1a73d34> /usr/lib/system/libdispatch.dylib
0x3167e000 - 0x31763fff CoreFoundation armv7 <a8444f997111304c9571b3ff974b769c> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
0x31797000 - 0x317cefff Security armv7 <6599f42a910b3b31a0e1d98c883d61cb> /System/Library/Frameworks/Security.framework/Security
0x317cf000 - 0x317effff PrintKit armv7 <e5a01ca9083a36afacc08611a398e2ad> /System/Library/PrivateFrameworks/PrintKit.framework/PrintKit
0x31851000 - 0x31858fff libbz2.1.0.dylib armv7 <0a082e1d475432959ba93aa3dbf7fb31> /usr/lib/libbz2.1.0.dylib
0x31ba0000 - 0x31ba8fff MobileBluetooth armv7 <63f11756c4aa3262b2317ff3b8e2a977> /System/Library/PrivateFrameworks/MobileBluetooth.framework/MobileBluetooth
0x31bbc000 - 0x31c3dfff libsystem_c.dylib armv7 <17ee3fe220c23b1f898d21ba25b2bcac> /usr/lib/system/libsystem_c.dylib
0x31c5a000 - 0x31d6cfff MediaPlayer armv7 <da848c0745a637af81d7edd962a09324> /System/Library/Frameworks/MediaPlayer.framework/MediaPlayer
0x31d6d000 - 0x31e0afff AddressBookUI armv7 <e354aeb3d96e30338e90cc3638ffe81b> /System/Library/Frameworks/AddressBookUI.framework/AddressBookUI
0x31e0b000 - 0x31e3afff SystemConfiguration armv7 <1d73b8a159363f96bb9c039655c5eae6> /System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration
0x31e42000 - 0x31e4bfff MobileWiFi armv7 <03d98d5cf6383695aa7d8a88da52f410> /System/Library/PrivateFrameworks/MobileWiFi.framework/MobileWiFi
0x31e4c000 - 0x31e4cfff libCVMSPluginSupport.dylib armv7 <42d8aa2a31843a6e8bfff745644a7ba5> /System/Library/Frameworks/OpenGLES.framework/libCVMSPluginSupport.dylib
0x31e4d000 - 0x31e4dfff Accelerate armv7 <7d5ad465049136afaa1f0d89aac600bc> /System/Library/Frameworks/Accelerate.framework/Accelerate
0x31e6b000 - 0x31e6efff CaptiveNetwork armv7 <fc834fd33a18341ea7506587ad895703> /System/Library/PrivateFrameworks/CaptiveNetwork.framework/CaptiveNetwork
0x31e6f000 - 0x31e81fff TelephonyUI armv7 <e2c34b9a391e3384875ac552dbca0ad4> /System/Library/PrivateFrameworks/TelephonyUI.framework/TelephonyUI
0x31e82000 - 0x31e97fff libresolv.9.dylib armv7 <e92cfbb83f7b330db19181e797bb3f7b> /usr/lib/libresolv.9.dylib
0x31e98000 - 0x31ea3fff libz.1.dylib armv7 <ac706bee36593dc683fd5a96a389d72e> /usr/lib/libz.1.dylib
0x31ec7000 - 0x31ec9fff SpringBoardUI armv7 <90ba5da3e3e337e0a83e2c2589d951a8> /System/Library/PrivateFrameworks/SpringBoardUI.framework/SpringBoardUI
0x31ed3000 - 0x31ef0fff libsystem_info.dylib armv7 <48016be86e3f3cd9aeee1c6590e1ac6f> /usr/lib/system/libsystem_info.dylib
0x31ef2000 - 0x31ef4fff libgcc_s.1.dylib armv7 <a2631ac302f4310dae8367939e16b7c2> /usr/lib/libgcc_s.1.dylib
0x31f0c000 - 0x31f3ffff AppSupport armv7 <0217468bd9f839229a47910b7816b3d5> /System/Library/PrivateFrameworks/AppSupport.framework/AppSupport
0x31f40000 - 0x31f43fff IOSurface armv7 <ad50e71624583d06b891344d832f9b08> /System/Library/PrivateFrameworks/IOSurface.framework/IOSurface
0x31f64000 - 0x31f79fff OpenAL armv7 <162722d7da273d649798b27ae0e4458c> /System/Library/Frameworks/OpenAL.framework/OpenAL
0x31fa8000 - 0x31fb7fff MobileDeviceLink armv7 <563a09bcdb2f32369b1e22f53f58273a> /System/Library/PrivateFrameworks/MobileDeviceLink.framework/MobileDeviceLink
0x31fb8000 - 0x31ff4fff libGLImage.dylib armv7 <9d97699e44ee3651ba4ac37e5adec35b> /System/Library/Frameworks/OpenGLES.framework/libGLImage.dylib
0x31ff5000 - 0x3203ffff libstdc++.6.dylib armv7 <e98c3fd72ba43d02aac24b08f7219eb7> /usr/lib/libstdc++.6.dylib
0x32044000 - 0x3204bfff libMobileGestalt.dylib armv7 <55f29184efcc3046bb833dd72a4487e1> /usr/lib/libMobileGestalt.dylib
0x320af000 - 0x320d3fff MediaControl armv7 <1cfc7d79f554357ab59eb69f9efebf07> /System/Library/PrivateFrameworks/MediaControl.framework/MediaControl
0x320d6000 - 0x320dbfff libcopyfile.dylib armv7 <e32cf2d48a1f3060b372ca7623e4a12b> /usr/lib/system/libcopyfile.dylib
0x320df000 - 0x320e5fff BluetoothManager armv7 <7861bc6128d93f72877df2f234434a47> /System/Library/PrivateFrameworks/BluetoothManager.framework/BluetoothManager
0x320f2000 - 0x320f7fff liblaunch.dylib armv7 <f5ccc8234aea3ebd9a88bd37f0fa23ae> /usr/lib/system/liblaunch.dylib
0x32124000 - 0x32127fff MobileIcons armv7 <08e426f8a707388d8adda670bfed0c2e> /System/Library/PrivateFrameworks/MobileIcons.framework/MobileIcons
0x3216d000 - 0x321a0fff iCalendar armv7 <34ce1957082f3518b5740ac33cfc92eb> /System/Library/PrivateFrameworks/iCalendar.framework/iCalendar
0x321e5000 - 0x321f1fff GraphicsServices armv7 <ff78a9636e933f0dbd222f8d26209788> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
0x321f2000 - 0x32231fff libSystem.B.dylib armv7 <64cf947dd8423eeeb677f81dd3eb2d9d> /usr/lib/libSystem.B.dylib
0x32232000 - 0x3225bfff ContentIndex armv7 <ecd71782cd833360872b943ecc65d203> /System/Library/PrivateFrameworks/ContentIndex.framework/ContentIndex
0x32270000 - 0x322a5fff ImageCapture armv7 <2c474beec10f3791ac8a1d37df04600f> /System/Library/PrivateFrameworks/ImageCapture.framework/ImageCapture
0x322a6000 - 0x322dafff VideoToolbox armv7 <570c63dc3a273a5a8c9072fd5567f5c1> /System/Library/PrivateFrameworks/VideoToolbox.framework/VideoToolbox
0x32301000 - 0x32409fff CoreData armv7 <9843a401dd1d322383e3e40021cc8b95> /System/Library/Frameworks/CoreData.framework/CoreData
0x3240a000 - 0x3240cfff Marco armv7 <53203fa831ab34f894f3a3811bf3917c> /System/Library/PrivateFrameworks/Marco.framework/Marco
0x32440000 - 0x32443fff ArtworkCache armv7 <4863e321afee3ac5a3749e50cd926597> /System/Library/PrivateFrameworks/ArtworkCache.framework/ArtworkCache
0x32444000 - 0x32452fff OpenGLES armv7 <5a76beaeaa013f0cbf16e5cb154598ab> /System/Library/Frameworks/OpenGLES.framework/OpenGLES
0x32468000 - 0x32487fff Bom armv7 <b178e3efb4d733c694bd5a55e57a314f> /System/Library/PrivateFrameworks/Bom.framework/Bom
0x32488000 - 0x32a93fff WebCore armv7 <07941e59d0a33f94802c16c76238fddf> /System/Library/PrivateFrameworks/WebCore.framework/WebCore
0x32a98000 - 0x32a9afff IOMobileFramebuffer armv7 <683f321680763e519d61541170ba2133> /System/Library/PrivateFrameworks/IOMobileFramebuffer.framework/IOMobileFramebuffer
0x32a9b000 - 0x32adbfff CoreMedia armv7 <8e0570582ba535bfa74f1f00eef64376> /System/Library/Frameworks/CoreMedia.framework/CoreMedia
0x32ade000 - 0x32ae1fff MediaRemote armv7 <0804293b2774359189f3a67e2c81558d> /System/Library/PrivateFrameworks/MediaRemote.framework/MediaRemote
0x32ae3000 - 0x32ae8fff libnotify.dylib armv7 <9d7198e91de9386a9e5ea43608a66a57> /usr/lib/system/libnotify.dylib
0x32be5000 - 0x32ed2fff libLAPACK.dylib armv7 <b855d60dac01310495453bddfd004f0d> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libLAPACK.dyl ib
0x32f68000 - 0x32f69fff libremovefile.dylib armv7 <0fa08e1bb47a3d179072a933d1726597> /usr/lib/system/libremovefile.dylib
0x32f6a000 - 0x32fbffff libvDSP.dylib armv7 <0221caba81a235c5a896a835e2aac047> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libvDSP.dylib
0x32fc0000 - 0x33084fff libobjc.A.dylib armv7 <a89ef30f6d663254babb6329ce02ca3d> /usr/lib/libobjc.A.dylib
0x33085000 - 0x330b3fff MIME armv7 <60de1fe0bbb134d788c09f7c34b1caa4> /System/Library/PrivateFrameworks/MIME.framework/MIME
0x330bc000 - 0x3311bfff libBLAS.dylib armv7 <0b36b2272aa33a8c9aa22d99c89d7189> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libBLAS.dylib
0x33120000 - 0x331cffff QuartzCore armv7 <ef9632c9781f3101916b65e9faae1579> /System/Library/Frameworks/QuartzCore.framework/QuartzCore
0x331d0000 - 0x331d2fff Camera armv7 <fd4d53b318ab35ce9bb89db3879120f0> /System/Library/PrivateFrameworks/Camera.framework/Camera
0x331fa000 - 0x331fdfff ApplePushService armv7 <015c68c15621348db9f6a012499170e1> /System/Library/PrivateFrameworks/ApplePushService.framework/ApplePushService
0x331fe000 - 0x3331dfff Foundation armv7 <09ff368178c5321c9715b9c8d491d53f> /System/Library/Frameworks/Foundation.framework/Foundation
0x3331e000 - 0x33361fff ManagedConfiguration armv7 <f790c26852cb3cf298abe56bc9a3940b> /System/Library/PrivateFrameworks/ManagedConfiguration.framework/ManagedConfiguration
0x33391000 - 0x33396fff libsystem_dnssd.dylib armv7 <f019bc513a6a37f4a79555b3ffb2a777> /usr/lib/system/libsystem_dnssd.dylib
0x33439000 - 0x33446fff libbsm.0.dylib armv7 <0a1e2bb78d5138419ecad8ba0fe42fdd> /usr/lib/libbsm.0.dylib
0x3346f000 - 0x34ebdfff TextInput armv7 <f242acc046073c1598195dd26fd8ad6f> /System/Library/PrivateFrameworks/TextInput.framework/TextInput
0x34f49000 - 0x34f4bfff CrashReporterSupport armv7 <9e7efa009730322f84bbc5d8bf1ded94> /System/Library/PrivateFrameworks/CrashReporterSupport.framework/CrashReporterSupport
0x34f4e000 - 0x34f54fff IAP armv7 <c0f4c99a1b493e489948f231ad9238e2> /System/Library/PrivateFrameworks/IAP.framework/IAP
0x34f99000 - 0x34fe7fff GMM armv7 <049361f664eb3f30b0d25cd56ffc1f0f> /System/Library/PrivateFrameworks/GMM.framework/GMM
0x34fe8000 - 0x35031fff IMCore armv7 <9c1e280e1fa33fa784cad479b9cbd941> /System/Library/PrivateFrameworks/IMCore.framework/IMCore
0x35032000 - 0x35077fff IMAVCore armv7 <a4dbb6f1203e3f569080707b3a388573> /System/Library/PrivateFrameworks/IMAVCore.framework/IMAVCore
0x3507a000 - 0x35086fff HomeSharing armv7 <2df6957cdfea31aea12eebf27ca1691c> /System/Library/PrivateFrameworks/HomeSharing.framework/HomeSharing
0x3509e000 - 0x3516ffff IMGSGX543GLDriver armv7 <406a4fa178c036e78cdc9537d5332c2e> /System/Library/Extensions/IMGSGX543GLDriver.bundle/IMGSGX543GLDriver
0x35170000 - 0x3526ffff PhotoLibrary armv7 <03a0336e443b3d958419dab3d432b147> /System/Library/PrivateFrameworks/PhotoLibrary.framework/PhotoLibrary
0x35270000 - 0x35276fff liblockdown.dylib armv7 <14c89b7346433c1f8675f454531f6ca3> /usr/lib/liblockdown.dylib
0x352b1000 - 0x352dbfff libtidy.A.dylib armv7 <68abd33352613e80a099a46d38704085> /usr/lib/libtidy.A.dylib
0x352ff000 - 0x35303fff AssetsLibraryServices armv7 <e1cbfe599c96369ca4bdb0dd99d3cd9f> /System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices
0x35304000 - 0x35346fff CoreAudio armv7 <c972fd5f8e89333ca680b9a33587f896> /System/Library/Frameworks/CoreAudio.framework/CoreAudio
0x35347000 - 0x35351fff ExternalAccessory armv7 <eebb4bdbbefb37419b884ffa011e1dc5> /System/Library/Frameworks/ExternalAccessory.framework/ExternalAccessory
0x35352000 - 0x3535cfff AccountSettings armv7 <d083fb384dc7311eb6766b9b2d2dd9c8> /System/Library/PrivateFrameworks/AccountSettings.framework/AccountSettings
0x3536e000 - 0x3538efff AppleAccount armv7 <4e0ac5cf93b338ab8c5f34ba3c5e2ee4> /System/Library/PrivateFrameworks/AppleAccount.framework/AppleAccount
0x3544b000 - 0x3544bfff libdnsinfo.dylib armv7 <21415179ffa03f949fa8cc851c6c31c7> /usr/lib/system/libdnsinfo.dylib
0x35645000 - 0x356eefff libxml2.2.dylib armv7 <5538d3f2c7d83b88b06168488fe6326b> /usr/lib/libxml2.2.dylib
0x356ef000 - 0x35809fff libicucore.A.dylib armv7 <bada0c2725bb31a483d5adf9aaf1f8df> /usr/lib/libicucore.A.dylib
0x35883000 - 0x3590dfff Message armv7 <2cce1aa95a493906bb0227197f9e4b96> /System/Library/PrivateFrameworks/Message.framework/Message
0x35911000 - 0x35a65fff AudioToolbox armv7 <6619c8c13f8d328e923e797fa8d0df23> /System/Library/Frameworks/AudioToolbox.framework/AudioToolbox
0x35a6e000 - 0x35a73fff MobileKeyBag armv7 <8c35c090bc373cb181fc26b961b8dba5> /System/Library/PrivateFrameworks/MobileKeyBag.framework/MobileKeyBag
0x35a77000 - 0x35ae6fff ProofReader armv7 <6d843c6aecdd37ae84baa40af8ad7e65> /System/Library/PrivateFrameworks/ProofReader.framework/ProofReader
0x35aec000 - 0x35b03fff libsystem_kernel.dylib armv7 <c4ebe7eb2e6c3a2d9bd3620a4d6dbc0e> /usr/lib/system/libsystem_kernel.dylib
0x35b04000 - 0x35c50fff MediaToolbox armv7 <482b13059e8a329fa5d832baede25103> /System/Library/PrivateFrameworks/MediaToolbox.framework/MediaToolbox
0x35c51000 - 0x35c51fff libsystem_sandbox.dylib armv7 <f47c01d627853b328e088b3fdd08e87d> /usr/lib/system/libsystem_sandbox.dylib
0x35cab000 - 0x35cf2fff MessageUI armv7 <35a81f5d4eb03467a1447db80337e570> /System/Library/Frameworks/MessageUI.framework/MessageUI
0x35d49000 - 0x35d72fff MobileCoreServices armv7 <57fef84bdc17301d8bf53ba0fb967fe6> /System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices
0x35d73000 - 0x35d8bfff iAd armv7 <7f6c5b4499ee383ea75f0cc8dcb5ca35> /System/Library/Frameworks/iAd.framework/iAd
0x35d8c000 - 0x35d9bfff Notes armv7 <d9c976ca976e3d029f69febd48f17601> /System/Library/PrivateFrameworks/Notes.framework/Notes
0x35d9d000 - 0x35db6fff libRIP.A.dylib armv7 <4825c3e392983aba947eca06555e4480> /System/Library/Frameworks/CoreGraphics.framework/Resources/libRIP.A.dylib
0x35db7000 - 0x35ea3fff GLEngine armv7 <f216c91c5fdb38a9ae65dc6651ccbd02> /System/Library/Frameworks/OpenGLES.framework/GLEngine.bundle/GLEngine
0x35ebb000 - 0x35edbfff MobileSync armv7 <4df400c4559435889eccd88db77a110c> /System/Library/PrivateFrameworks/MobileSync.framework/MobileSync
0x35edc000 - 0x35eddfff libsystem_blocks.dylib armv7 <ccc041df3de73eafb7a59e74cdb1702b> /usr/lib/system/libsystem_blocks.dylib
0x35ede000 - 0x3626bfff UIKit armv7 <c271b78464d93cb7bf28c6e49df293ba> /System/Library/Frameworks/UIKit.framework/UIKit
0x3626c000 - 0x3657ffff GeoServices armv7 <88616f3deada3bb495fc15e3ba58dc83> /System/Library/PrivateFrameworks/GeoServices.framework/GeoServices
0x365bb000 - 0x365cbfff WebBookmarks armv7 <6956561235333e74b8ff316cb2edc93e> /System/Library/PrivateFrameworks/WebBookmarks.framework/WebBookmarks
0x365dc000 - 0x36622fff CoreLocation armv7 <249b8af3dc503d11bf3711f0407c66d8> /System/Library/Frameworks/CoreLocation.framework/CoreLocation
0x36629000 - 0x36629fff vecLib armv7 <0c60cd0a60f43d2791d36cb357d30e3c> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/vecLib
0x3663f000 - 0x36640fff CoreSurface armv7 <7b83cd757da73e6e826693c29296d3fa> /System/Library/PrivateFrameworks/CoreSurface.framework/CoreSurface
0x36641000 - 0x366d6fff ImageIO armv7 <d520e3241d1130e8ac1375ee0f2c1095> /System/Library/Frameworks/ImageIO.framework/ImageIO
0x366d7000 - 0x3679dfff MusicLibrary armv7 <71a09022bd8b3b6a90a250199d190f10> /System/Library/PrivateFrameworks/MusicLibrary.framework/MusicLibrary
0x3679e000 - 0x36844fff Celestial armv7 <407badafc6403692bf099d542d28bf7f> /System/Library/PrivateFrameworks/Celestial.framework/Celestial
0x36847000 - 0x36849fff MobileInstallation armv7 <94b6d6c5d9883175af26764567528127> /System/Library/PrivateFrameworks/MobileInstallation.framework/MobileInstallation
0x3684e000 - 0x36850fff MailServices armv7 <74ae0145ef713c6d91fd8f68885b0a61> /System/Library/PrivateFrameworks/MailServices.framework/MailServices
0x36851000 - 0x368b7fff EventKitUI armv7 <b3b568df80863f2e9374054bab335bf3> /System/Library/Frameworks/EventKitUI.framework/EventKitUI
0x369e7000 - 0x36a98fff WebKit armv7 <eb9a0d69c64b3127b2bffd71641add3b> /System/Library/PrivateFrameworks/WebKit.framework/WebKit
0x36b4e000 - 0x36c7afff libmecabra.dylib armv7 <113de5f9858c32b8b158bfdc68042a97> /usr/lib/libmecabra.dylib
0x36c7c000 - 0x36c92fff EAP8021X armv7 <9fefc0ada30435fbb3b51818c74f6cb8> /System/Library/PrivateFrameworks/EAP8021X.framework/EAP8021X
0x36c93000 - 0x36c99fff ProtocolBuffer armv7 <f9277ee9b85b3722975ad319a323aca0> /System/Library/PrivateFrameworks/ProtocolBuffer.framework/ProtocolBuffer
0x36cda000 - 0x36cdefff libcache.dylib armv7 <362fdd2de66f3e189b5d139c9669a9e3> /usr/lib/system/libcache.dylib
0x36cdf000 - 0x36cf1fff PersistentConnection armv7 <659ea9d5b13d3fefb37acff09016a69c> /System/Library/PrivateFrameworks/PersistentConnection.framework/PersistentConnection
0x36d08000 - 0x36d11fff ITSync armv7 <ba8b48d061903e4096774344448776d0> /System/Library/PrivateFrameworks/ITSync.framework/ITSync
0x36d13000 - 0x36e17fff JavaScriptCore armv7 <61a94142e2d23dafa2964190dd46e9e3> /System/Library/PrivateFrameworks/JavaScriptCore.framework/JavaScriptCore
0x36e1b000 - 0x36e24fff CoreVideo armv7 <ea847e6dba2d36b1826b255c73b39539> /System/Library/Frameworks/CoreVideo.framework/CoreVideo
0x36e25000 - 0x36e28fff libmacho.dylib armv7 <53908d448e9e32418652a4afee5bc578> /usr/lib/system/libmacho.dylib
0x36e29000 - 0x36e77fff CoreMotion armv7 <5e6b884d36d93789b40b7f3876130417> /System/Library/Frameworks/CoreMotion.framework/CoreMotion
0x36e7d000 - 0x36e7efff DataMigration armv7 <42e9e87a4e0735c3837e27d4f2adcf55> /System/Library/PrivateFrameworks/DataMigration.framework/DataMigration
0x36e7f000 - 0x36e85fff AssetsLibrary armv7 <124dd93095423fcf8029d3c7614dffd4> /System/Library/Frameworks/AssetsLibrary.framework/AssetsLibrary
0x36ee6000 - 0x36ef9fff libmis.dylib armv7 <529ea6e3a87230ce9f6cf3285c22429c> /usr/lib/libmis.dylib
0x36f16000 - 0x36f17fff libsystem_network.dylib armv7 <3e0b7d6754cd33669c0680525f03ede1> /usr/lib/system/libsystem_network.dylib
0x36f18000 - 0x36f4bfff StoreServices armv7 <d526715648f435c3aac4c42953e76d20> /System/Library/PrivateFrameworks/StoreServices.framework/StoreServices
0x36fa9000 - 0x3706afff RawCamera armv7 <0c52d8b1498c3dbb9aad95f3bcd8261d> /System/Library/CoreServices/RawCamera.bundle/RawCamera
0x370b2000 - 0x370ddfff IMFoundation armv7 <f1f21bedbf2e3ea38f692abef0005d76> /System/Library/PrivateFrameworks/IMCore.framework/Frameworks/IMFoundation.framework/IMFo undation
0x370e4000 - 0x370e5fff libdyld.dylib armv7 <7dd4acfe150831e0ae82296587e67e7f> /usr/lib/system/libdyld.dylib
0x370ec000 - 0x370fcfff DataAccessExpress armv7 <66d9047da79a31daa887e6d84c42ecb2> /System/Library/PrivateFrameworks/DataAccessExpress.framework/DataAccessExpress
0x37144000 - 0x37147fff CertUI armv7 <9060fe03a4943ef295531feced9a17dd> /System/Library/PrivateFrameworks/CertUI.framework/CertUI
0x37148000 - 0x37154fff SpringBoardServices armv7 <c68262667ac8397a949ce4e92dfec7db> /System/Library/PrivateFrameworks/SpringBoardServices.framework/SpringBoardServices -
Using an ANE (Adobe Native Extension) in a CS Extension
Hi,
I've made a simple ANE which works with AIR on a Windows Desktop.
I'd like to use it within a CS Extension, but it does not work (ExtensionContext.createExtensionContext(...) fails.
Did anybody succeed doing this ?
Any idea welcome,
TIA,
J.Hi,
Thanks for your answer.
We have a dll which does quite complex things.
The idea is to create to ANE to use it either from a AIR desktop application (in Windows and later on MacOS), or from a CS extension within InDesign.
The desktop application/CS extension are mainly GUI, doing it in Flex would have allowed easy and reusable development for both Windows/MacOS.
J. -
Just about have native Android extension working.
Hey,
I've been following GoToAndLearn's Android Native Extension tutorial. After a couple hours of mucking with batch scripts I finally converted over his build script to windows and got my .ane and .apk.
However, when I load up my apk on my device, there's no indication that the extension is actually loaded.
Here's some of my code:
extension.xml
<extension xmlns="http://ns.adobe.com/air/extension/2.5">
<id>com.revstudios.dota2stream</id>
<versionNumber>1</versionNumber>
<platforms>
<platform name="Android-ARM">
<applicationDeployment>
<nativeLibrary>dota2stream.jar</nativeLibrary>
<initializer>com.revstudios.dota2stream.Dota2StreamExtension</initializer>
<finalizer>com.revstudios.dota2stream.Dota2StreamExtension</finalizer>
</applicationDeployment>
</platform>
</platforms>
</extension>
my Actionscript interface library:
package
import flash.external.ExtensionContext;
public class Dota2StreamInterface
private var context:ExtensionContext;
public function Dota2StreamInterface()
if(!context)
context = ExtensionContext.createExtensionContext("com.revstudios.dota2stream", null);
public function nofity(message:String):void{
context.call("notify", message);
Here's my view:
<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" title="HomeView">
<fx:Script>
<![CDATA[
protected function showIt(event:MouseEvent):void
var ni:Dota2StreamInterface = new Dota2StreamInterface();
ni.nofity(ti.text);
]]>
</fx:Script>
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:TextInput id="ti" left="20" right="20" top="10"/>
<s:Button y="162" left="20" right="20" label="Button" click="showIt(event)"/>
</s:View>
Here's my app descriptor extension element:
<extensions>
<extensionID>com.revstudios.dota2stream</extensionID>
</extensions>
Here's my android Java (imports excluded for space):
package com.revstudios.dota2stream;
public class Dota2StreamContext extends FREContext {
@Override
public void dispose() {
@Override
public Map<String, FREFunction> getFunctions() {
Map<String, FREFunction> map = new HashMap<String, FREFunction>();
map.put("notify", new Dota2StreamFunction());
return map;
package com.revstudios.dota2stream;
public class Dota2StreamExtension implements FREExtension {
@Override
public FREContext createContext(String arg0) {
return new Dota2StreamContext();
@Override
public void dispose() {
@Override
public void initialize() {
package com.revstudios.dota2stream;
public class Dota2StreamFunction implements FREFunction {
@Override
public FREObject call(FREContext context, FREObject[] args) {
String message = "";
try {
message = args[0].getAsString();
} catch (IllegalStateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (FRETypeMismatchException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (FREInvalidObjectException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (FREWrongThreadException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Log.w("WHEEEEE", "WHEEEEE");
String ns = Context.NOTIFICATION_SERVICE;
NotificationManager mNotificationManager = (NotificationManager) context.getActivity().getSystemService(ns);
long when = System.currentTimeMillis();
Notification notification = new Notification(context.getResourceId("drawable.notify"), message, when);
notification.defaults |= Notification.DEFAULT_SOUND;
CharSequence contentTitle = "Notification from Flash";
CharSequence contentText = message;
Intent notificationIntent = new Intent();
PendingIntent contentIntent = PendingIntent.getActivity(context.getActivity(), 0, notificationIntent, 0);
notification.setLatestEventInfo(context.getActivity(), contentTitle, contentText, contentIntent);
final int HELLO_ID = 1;
mNotificationManager.notify(HELLO_ID, notification);
return null;
I think that's all of the relevant code. I figured that the .ane and .apk wouldn't build if something is wrong... but the extension doesn't do anything.
I wasn't sure if it was something in my code or not, but that's why I put the Log.w. But that's not displayed either.
Any help would be appreciated.Try this:
try{
String ns = Context.NOTIFICATION_SERVICE;
NotificationManager mNotificationManager = (NotificationManager) context.getActivity().getSystemService(ns);
long when = System.currentTimeMillis();
Notification notification = new Notification(context.getResourceId("drawable.notify"), message, when);
notification.defaults |= Notification.DEFAULT_SOUND;
CharSequence contentTitle = "Notification from Flash";
CharSequence contentText = message;
Intent notificationIntent = new Intent();
PendingIntent contentIntent = PendingIntent.getActivity(context.getActivity(), 0, notificationIntent, 0);
notification.setLatestEventInfo(context.getActivity(), contentTitle, contentText, contentIntent);
final int HELLO_ID = 1;
mNotificationManager.notify(HELLO_ID, notification);
}catch(Exception e){
context.dispatchStatusEventAsync("error",e.toString());
and this:
public function Dota2StreamInterface()
if(!context){
context = ExtensionContext.createExtensionContext("com.revstudios.dota2stream", null);
context .addEventListener(StatusEvent.STATUS, onStatus);
public function nofity(message:String):void{
context.call("notify", message);
private function onStatus( event : StatusEvent ) : void
trace(event.level);
If You don't listen in the app content the function in native code can just fail without any answer to Air.
You should have Your answer there..
Other thing.. did You add the image in the resources folder? -
I little confuse about build ANE, I already follow all the direction, but the error always #3500 when I try to call the ANE.
I create ANE using java android.
The tools I use : Flash Builder running on Win-64 win.7. I think I must straight to the point, here what i made it first step by step;
1. I create the JAVA application first, with package senigo.extension.android then I create 3 file, Sample.java, SampleContext.java, PassTextFunction.java
Sample.Java Source Code
package senigo.extension.android;
import android.util.Log;
import com.adobe.fre.FREContext;
import com.adobe.fre.FREExtension;
public class Sample implements FREExtension {
@Override
public FREContext createContext(String arg0) {
// TODO Auto-generated method stub
Log.i("Sample", "createContext");
return new SampleContext();
@Override
public void dispose() {
// TODO Auto-generated method stub
Log.i("Sample", "Dispose");
@Override
public void initialize() {
// TODO Auto-generated method stub
Log.i("Sample", "Initialize");
SampleContext.Java Source Code
package senigo.extension.android;
import java.util.HashMap;
import java.util.Map;
import android.util.Log;
import com.adobe.fre.FREContext;
import com.adobe.fre.FREFunction;
public class SampleContext extends FREContext {
public SampleContext()
Log.i("SampleContext", "constructor");
@Override
public void dispose() {
// TODO Auto-generated method stub
Log.i("SampleContext", "dispose");
@Override
public Map<String, FREFunction> getFunctions() {
// TODO Auto-generated method stub
Log.i("SampleContext", "getFunctions");
Map<String, FREFunction> functionMap = new HashMap<String, FREFunction>();
functionMap.put("passText", new PassTextFunction());
return functionMap;
PassTextFunction.Java Source Code
package senigo.extension.android;
import com.adobe.fre.FREContext;
import com.adobe.fre.FREExtension;
import com.adobe.fre.FREFunction;
import com.adobe.fre.FREObject;
public class PassTextFunction implements FREFunction {
@Override
public FREObject call(FREContext arg0, FREObject[] arg1) {
// TODO Auto-generated method stub
FREObject result = null;
try{
result = FREObject.newObject("Hello World");
}catch(Exception e)
return result;
after all the file I create the jar file using click right on the tree view >> Export >> Jar File >> Sample.Jar (i already create jar file that just contain the src folder and after i frustrated, i create .jar file contain all the whole project folder but still didn't work out).
Ok, After that I create project Flex Library Project, That's contain the actionscript to call the native and the extension.xml, here the code.
Test.as Source Code, FYI : i already create public function and the static function the error still same #3500.
package senigo.extension.android
import flash.external.ExtensionContext;
public class test
private static var extContext:ExtensionContext = null;
public function test()
trace ("Test Constructor");
if (!extContext)
initExtension();
public static function get passText():String
trace ("Test Pass Text");
if (!extContext)
initExtension();
return extContext.call("passText") as String;
private static function initExtension():void
trace ("Vibration Constructor: Create an extension context");
extContext = ExtensionContext.createExtensionContext("senigo.extension.android", null);
extension.xml source code
FYI: in Flex when i put the Native Extension, they said must have Windows-x86 so I already create 3 ANE, that just contain Android-ARM , Contain Android-ARM and Default, Contain Android-ARM,Default and Windows-x86 but the error still same. I didn't got it where is the error.
<extension xmlns="http://ns.adobe.com/air/extension/3.1">
<id>senigo.extension.android</id>
<versionNumber>1.0.0</versionNumber>
<platforms>
<platform name="Android-ARM">
<applicationDeployment>
<nativeLibrary>Sample.jar</nativeLibrary>
<initializer>senigo.extension.android.Sample</initializer>
<finalizer>senigo.extension.android.Sample</finalizer>
</applicationDeployment>
</platform>
<!-- <platform name="Windows-x86">
<applicationDeployment>
<nativeLibrary>sample.jar</nativeLibrary>
<initializer>senigo.extension.android.Sample</initializer>
<finalizer>senigo.extension.android.Sample</finalizer>
</applicationDeployment>
</platform>
-->
<platform name="default">
<applicationDeployment/>
</platform>
</platforms>
</extension>
After I create it, I copy the .swc file and extension file sample with the Sample.jar file.
I extract the .swc file, copy the library.swf to folder Android-ARM,Default,Windows-86 and I create build.bat that contain the command like this
adt -package -storetype PKCS12 -keystore senigo.p12 -storepass l10nk1ng -target ane senigo.extension.android.ane extension.xml -swc AndroidLib.swc -platform Android-ARM -C ./Android-ARM/ . -platform default -C ./default/ .
the I put the ane to Flex mobile project that I created:
I run it but got error #3500, I really confuse?? what's wrong with my code? is there something I wrong or I Miss it?
Please any one help me.. and when is already ane file can I debug it in Flex Mobile Project? I wanna looks the log.i code that i wrote but i confuse how to looking up in flash builder.
at the end, I wanna said Sorry if my english not very goods, and thanks, because wanna see my problem and thank you very much if You can gave me a solution'sAlex Rekish wrote:
Why you comment Windows-x86 in your extension.xml ?
I think that is a problem. You launch your application on Windows but ANE haven't got Windows-x86 implementation (also you don't include it while packaging). So your application use default implementation. But default implementation don't use any native code and cannot use ExtensionContext. And you got error.
If you don't need Windows-x86 native implementation than you need implement default implementation that different than Android-ARM. You don't need to use ExtensionContext in default implementation.
Thanks for you answer Alex Rekish, Sorry I didn't screen shoot all about the extension.xml. I comment it because the latest ANE that I build is contain Android-ARM and default. so I commented. but I already try it using just ANE that's just contain Android-ARM, with Android-ARM and windows-x86,and Android-ARM, and default, and Android-ARM,default,Windows-x86 the error still the same.
here the screen shoot, I embeded the ane that's i contain Windows-x86
in action script test.as I didn't change it anythings, I just play it on extension.xml to build the ane. is there any mistake over there? I interact with your answer that "If you don't need Windows-x86 native implementation than you need implement default implementation that different than Android-ARM. You don't need to use ExtensionContext in default implementation." I didn't need to user ExtensionContext? is means? in the actionscript? or in extension.xml? can you explained -
Is it possible to access an AIR Native Extension inside an Actionscript worker?
Hi, I'm currently trying to push off some time consuming tasks to an actionscript worker. This worker will in turn needs to call out to an AIR Native Extension as part of it's processing.
I've tried various combination in Flash Builder 4.7 i.e. embedded worker and external worker (with explicit packaging of the ANE in the external worker project) but alas I've been unable to get this to setup to work. I keep getting an error from the worker saying that the native extesion class could not be found (Error #1014).
Does anyone know if it is at all possible to do this or it's a limitation of Actionscript workers (loading thw swf bytes does not load up the ANE)?Hi
I also met the same problem---"native extesion class could not be found"
The problem is solved?
I think the reason is
" <extensions>
<extensionID>XXXXXX</extensionID>
</extensions>“ in "-app.xml"
the worker do not konw the extensionID
In this article :
Adobe AIR * Using native extensions for Adobe AIR
Including the ANE file in your application’s library path
To compile an application that uses a native extension, include the ANE file in your library path.
Using the ANE file with Flash Builder
If your application uses a native extension, include the ANE file for the native extension in your library path. Then you can use Flash Builder to compile your ActionScript code.
Do the following steps, which use Flash Builder 4.5.1:
Change the filename extension of the ANE file from .ane to .swc. This step is necessary so that Flash Builder can find the file.
Select Project > Properties on your Flash Builder project.
Select the Flex Build Path in the Properties dialog box.
In the Library Path tab, select Add SWC....
Browse to the SWC file and select Open.
Select OK in the Add SWC... dialog box.
The ANE file now appears in the Library Path tab in the Properties dialog box.
Expand the SWC file entry. Double-click Link Type to open the Library Path Item Options dialog box.
In the Library Path Item Options dialog box, change the Link Type to External.
Now you can compile your application using, for example, Project > Build Project.
the error will be done
Unfortunately, it still does not work well!
Error: Error #3731: This feature is not available within this context.
at flash.external::ExtensionContext$/_createExtensionContext()
at flash.external::ExtensionContext$/createExtensionContext()
3731
This feature is not available within this context.
This error occurs if a background worker attempts to access an API that is not available to it.
Run-Time Errors - Adobe ActionScript® 3 (AS3) API Reference -
Need help with C++ native extension for Android
Hello!
I'm trying to build and launch sample native extension written with C++ on Android device.
But thre
I have:
1) Code of native library:
#include "FlashRuntimeExtensions.h"
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
FREObject nativeFunction(FREContext ctx, void* funcData, uint32_t argc, FREObject argv[])
uint32_t length = 12;
const uint8_t* value = (const uint8_t*)"Hello from C";
FREObject retObject;
int res = FRENewObjectFromUTF8(length, value, &retObject);
if (res == FRE_OK) {
return retObject;
} else {
return NULL;
void ContextInitializer(void *extData, const uint8_t *ctxType, FREContext ctx,
uint32_t *numFunctionsToSet,
const FRENamedFunction **functionsToSet)
FRENamedFunction* func = (FRENamedFunction*)malloc(sizeof(FRENamedFunction)*1);
func[0].name = (const uint8_t*)"nativeFunction";
func[0].functionData = NULL;
func[0].function = &nativeFunction;
*functionsToSet = func;
void ContextFinalizer(FREContext ctx)
return;
void NativeCppExtensionInitializer(void** extDataToSet, FREContextInitializer* ctxInitializerToSet,
FREContextFinalizer* ctxFinalizerToSet)
extDataToSet = NULL;
*ctxInitializerToSet = ContextInitializer;
*ctxFinalizerToSet = ContextFinalizer;
void NativeCppExtensionFinalizer(void* extData)
return;
2) ActionScript Library with Extension class:
package com.adobe.hellojni
import flash.external.ExtensionContext;
public class HelloJniExtension
private static var context:ExtensionContext;
public static function init():void {
if (!context) {
context = ExtensionContext.createExtensionContext("com.adobe.canewithjava", null);
public static function stringFromJNI():String {
if (context) {
return context.call("stringFromJNI") as String;
return null;I do not have time to finish this topic.
The full problem described in http://forums.adobe.com/thread/1217167 -
Air Native Extension for OS X. Cant call functions from native code.
Hi, I am trying to build native extension for OS X.
After creating context, I try to call native function with "call" method, but always I have an error "The extension context does not have a method with the name ..."
In as3 code my ExtensionContext is not null, so it's okay. And in native objective-c code I have a function, which I call in as3 code.
What should I do?
Here my code.
Objective-c:
FREContext AirContext = nil;
FREObject init(FREContext ctx, void* funcData, uint32_t argc, FREObject argv[])
return nil;
FREObject someFunction(FREContext ctx, void* funcData, uint32_t argc, FREObject argv[])
FREDispatchStatusEventAsync(AirContext ,(uint8_t*) "SOME_EVENT", (uint8_t*) "some information" );
return nil;
void ANEContextInitializer(void* extData, const uint8_t* ctxType, FREContext ctx, uint32_t* numFunctionsToTest, const FRENamedFunction** functionsToSet)
NSLog(@"Entering ContextInitinalizer()");
*numFunctionsToTest = 5;
FRENamedFunction* func = (FRENamedFunction*) malloc(sizeof(FRENamedFunction) * *numFunctionsToTest);
func[0].name = (const uint8_t*) "init";
func[0].functionData = NULL;
func[0].function = &init;
func[1].name = (const uint8_t*) "someFunction";
func[1].functionData = NULL;
func[1].function = &someFunction
// other blank functions
*functionsToSet = func;
AirContext = ctx;
FREDispatchStatusEventAsync(AirContext ,(uint8_t*) "SOME_EVENT", (uint8_t*) "some information" );
void ContextFinalizer(FREContext ctx) {
NSLog(@"Entering ContextFinalizer()");
NSLog(@"Exiting ContextFinalizer()");
void ANEInitializer(void** extDataToSet, FREContextInitializer* ctxInitializerToSet, FREContextFinalizer* ctxFinalizerToSet )
NSLog(@"Entering ExtInitializer()");
*extDataToSet = NULL;
*ctxInitializerToSet = &ContextInitializer;
*ctxFinalizerToSet = &ContextFinalizer;
NSLog(@"Exiting ExtInitializer()");
void ANEFinalizer(void* extData)
return;
ActionScript3:
public class MyANE extends EventDispatcher{
private static var _instance:MyANE;
private var extCtx:ExtensionContext;
public function MyANE()
if (!_instance)
if (this.isSupported)
extCtx = ExtensionContext.createExtensionContext("my.awesome.ane", null);
if (extCtx != null)
trace('context is okay'); //this trace works
extCtx.addEventListener(StatusEvent.STATUS, onStatus);
} else
trace('context is null.');
_instance = this;
else
throw Error('singleton');
public static function getInstance():MyANE
return _instance != null ? _instance : new MyANE();
public function get isSupported():Boolean
var value:Boolean = Capabilities.manufacturer.indexOf('Macintosh') > -1;
trace(value ? 'supported' : 'not supported ');
return value;
private function onStatus(event:StatusEvent):void
trace('Event', event, 'code', event.code, 'level', event.level); //this traсе does not works
private function test(): void
extCtx.call("someFunction"); //this throws error
XML:
<extension xmlns="http://ns.adobe.com/air/extension/3.9">
<id>my.awesome.ane</id>
<versionNumber>1.0.0</versionNumber>
<platforms>
<platform name="MacOS-x86">
<applicationDeployment>
<nativeLibrary>MyANE.framework</nativeLibrary>
<initializer>ANEInitializer</initializer>
<finalizer>ANEFinalizer</finalizer>
</applicationDeployment>
</platform>
</platforms>
</extension>
And this script Im using for build ANE:
mv ../as3/bin/MyANE.swc .
unzip MyANE.swc
mv library.swf mac/
rm catalog.xml
rsync -a ../Obective-C/ANE/Build/Products/Debug/ANE.framework/ mac/ANE.framework/
adt -package -target ane MyANE.ane extension.xml -swc MyANE.swc -platform MacOS-x86 -C mac .
mv MyANE.ane ~/Work/_Projects/test/libs-ane/I haven't done Objective C in a long time, but if I'm not mistaken, it requires the semicolon to terminate a line of code. The line containing "func[1].function = &someFunction" does not have that termination and since that is the function you are trying to execute, maybe that is the source of the error.
-
Native extension on Mac OS X (Air 3)
Hi
I have a blocking issue for native extensions when targetting the MacOS-x86 platform. (in my case Snow Leopard)
I succeded in packaging the ANE file, but I have this error when using it in my test app:
[SWF] tekhnia.simpleAirNativeExtension - 2 871 octets après la décompression
[SWF] simpleAirNativeExtensionTest.swf - 2 119 250 octets après la décompression
Context: [object ExtensionContext] in /Users/vandrito/Documents/Projets/o3sui/.metadata/.plugins/com.adobe.flexbuilder.project. ui/ANEFiles/simpleAirNativeExtensionTest/macosx/simpleAirNativeExtension.ane
ArgumentError: Error #3500: The extension context does not have a method with the name isSupported.
at flash.external::ExtensionContext/_call()
at flash.external::ExtensionContext/call()
at tekhnia.org.simpleAirNativeExtension::simpleAirNativeExtension/isSupported()[/Users/vandr ito/Documents/Projets/o3sui/simpleAirNativeExtension/src/tekhnia/org/simpleAirNativeExtens ion/simpleAirNativeExtension.as:16]
at simpleAirNativeExtensionTest/init()[/Users/vandrito/Documents/Projets/o3sui/simpleAirNati veExtensionTest/src/simpleAirNativeExtensionTest.mxml:15]
at simpleAirNativeExtensionTest/___simpleAirNativeExtensionTest_WindowedApplication1_creatio nComplete()[/Users/vandrito/Documents/Projets/o3sui/simpleAirNativeExtensionTest/src/simpl eAirNativeExtensionTest.mxml:5]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()[E:\dev\4.y\frameworks\projects\framework\src\mx\core \UIComponent.as:13151]
at mx.core::UIComponent/set initialized()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:1818]
at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.y\frameworks\projects\framewo rk\src\mx\managers\LayoutManager.as:842]
at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.y\frameworks\projects \framework\src\mx\managers\LayoutManager.as:1180]
In fact it seems that the initializer is not executed. This is my extension declaration file:
<extension xmlns="http://ns.adobe.com/air/extension/3.1">
<id>tekhnia.simpleAirNativeExtension</id>
<versionNumber>1.0.0</versionNumber>
<name>tekhnia.simpleAirNativeExtension</name>
<copyright>@2011 OpenTekhnia, Techniware</copyright>
<platforms>
<platform name="MacOS-x86">
<applicationDeployment>
<nativeLibrary>simpleAirNativeExtension.framework</nativeLibrary>
<initializer>initNativeExtension</initializer>
<finalizer>doneNativeExtension</finalizer>
</applicationDeployment>
</platform>
</platforms>
</extension>
That's my *.m file in the xcode framework project:
#import "simpleAirNativeExtension.h"
FREObject isSupported(FREContext ctx,
void *functionData,
uint32_t argc,
FREObject argv[]) {
FREObject retObj;
FRENewObjectFromBool(1, &retObj);
return retObj;
// contextInitializer()
// The context initializer is called when the runtime creates the extension context instance.
void contextInitializer(void* extData, const uint8_t* ctxType, FREContext ctx,
uint32_t* numFunctions, const FRENamedFunction** functionsToSet) {
*numFunctions = 1;
FRENamedFunction* func = (FRENamedFunction*)malloc(sizeof(FRENamedFunction) * (*numFunctions));
func[0].name = (const uint8_t*) "isSupported";
func[0].functionData = NULL;
func[0].function = &isSupported;
*functionsToSet = func;
// contextFinalizer()
// The context finalizer is called when the extension's ActionScript code
// calls the ExtensionContext instance's dispose() method.
// If the AIR runtime garbage collector disposes of the ExtensionContext instance, the runtime also calls
// contextFinalizer().
void contextFinalizer(FREContext ctx) {
// Nothing to clean up.
return;
// initMulticastSocket()
// The extension initializer is called the first time the ActionScript side of the extension
// calls ExtensionContext.createExtensionContext() for any context.
void initNativeExtension(void** extDataToSet, FREContextInitializer* ctxInitializerToSet,
FREContextFinalizer* ctxFinalizerToSet) {
*ctxInitializerToSet = &contextInitializer;
*ctxFinalizerToSet = &contextFinalizer;
// done()
// The extension finalizer is called when the runtime unloads the extension. However, it is not always called.
void doneNativeExtension(void* extData) {
// Nothing to clean up.
return;
and that's my .h:
// simpleAirNativeExtension.h
// simpleAirNativeExtension
// Created by Victor Andritoiu on 17/10/11.
// Copyright (c) 2011 OpenTekhnia. All rights reserved.
#import <Foundation/Foundation.h>
#include "Adobe Air/FlashRuntimeExtensions.h"
void initNativeExtension(void** extDataToSet, FREContextInitializer* ctxInitializerToSet,
FREContextFinalizer* ctxFinalizerToSet);
void doneNativeExtension(void* extData);
FREObject isSupported(FREContext ctx,
void *functionData,
uint32_t argc,
FREObject argv[]);
void contextInitializer(void* extData, const uint8_t* ctxType, FREContext ctx,
uint32_t* numFunctions, const FRENamedFunction** functionsToSet);
void contextFinalizer(FREContext ctx);
@interface simpleAirNativeExtension : NSObject
@end
And finally my AS3 code for the lib:
package tekhnia.org.simpleAirNativeExtension
import flash.external.ExtensionContext;
public class simpleAirNativeExtension {
/** extension context */
protected var context: ExtensionContext;
public function simpleAirNativeExtension() {
context = ExtensionContext.createExtensionContext("tekhnia.simpleAirNativeExtension", "");
trace("Context: " + context + " in " + ExtensionContext.getExtensionDirectory("tekhnia.simpleAirNativeExtension").nativePath);
public function isSupported(): Boolean {
return context.call("isSupported") as Boolean;
and for the app using it:
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
creationComplete="init()">
<fx:Script>
<![CDATA[
import mx.events.FlexEvent;
import tekhnia.org.simpleAirNativeExtension.simpleAirNativeExtension;
protected function init(): void {
var sane: simpleAirNativeExtension = new simpleAirNativeExtension();
trace(sane.isSupported());
]]>
</fx:Script>
<fx:Declarations>
<!-- Placer ici les éléments non visuels (services et objets de valeur, par exemple). -->
</fx:Declarations>
</s:WindowedApplication>
If anybody succeeded in using extensions on MacOS, please first tell me that s possible then, maybe help me on getting the error that I make.
Thanks a lot
VictorWorkaround found:
Need to launch adl as a line command (depends on your directory config, of course):
/Applications/Adobe\ Flash\ Builder\ 4.6/sdks/4.6.0/bin/adl -runtime /Library/Frameworks/ -extdir /Users/vandrito/Desktop/simpleAirNativeExtension/launch/extensions -profile extendedDesktop /Users/vandrito/Documents/Projets/o3sui/simpleAirNativeExtensionTest/bin-debug/simpleAirN ativeExtensionTest-app.xml
Pay attention to the library location: it is the one of the Air 3.1 install. Did not check the same trick with Flash Builder 4.6 Air install.
Then use a fake web debugger to connect to the process (if compiled in debug mode). See here how to do (french):
http://www.flex-tutorial.fr/2010/08/05/air-android-debug-sur-mobile-froyo-emulateur-avec-f lash-builder-4/
Victor -
Is it possible to have more than one instance of an ane running?
It seems that ExtensionContext.createExtensionContext just links to the first initialized extension. Is it possible to have it not do that?First create the symbol as a movieclip. Then right click the object in the library and select the Linkage option. In the panel that opens select the option to export for actionscript and then assign a Class name for the symbol... lets say you name it ImageMC (caps are usually used for starting class names). Flash will provide an indication that it can't find a class and it will create one when you compile.
To add a new instance of the symbol to the stage you use...
var imgMC:ImageMC = new ImageMC();
imgMC.x = ???;
imgMC.y = ???;
addChild(imgMC);
where the x and y values (???) will be determined based on whatever information you have available regarding where the ball was when it hit the wall. -
Android native extention errors
Hi Everyone,
I'm currently working on creating an Android ANE for native alert popups. I'm now at the point where I think my both my Java and AS3 code is good to go but I'm getting an error when I try to use it.
Main Thread (Suspended: TypeError: Error #1009: Cannot access a property or method of a null object reference.)
My problem is I'm really not sure where this error is coming from. My thinking is that I'm not building the ANE file correctly or something is wrong in my extension.xml file but I'm really not too sure.
I'm going to try to provide as much information as I can about how this project is set up. Right now I'm trying to use this ANE in a small, testing application.
First, the folder setup:
ANEextensions-
Alert_Java (holding my Java project)
(Android/Java created assets. Not sure if these are important or now. If so I will list them)
src
com
fa
ne
android
AlertContext.java
AlertExtension.java
ShowAlert.java
Alert_AS
bin
AlertAndroidAS.swc
src
Alert.as
extension.xml
I'm not going to bother posting my java code as I think it's correct. but if anyone who is willing to invest some time in helping me with this issue wants to take a look please let me know.
This is my extensions.xml file
<extension xmlns="http://ns.adobe.com/air/extension/2.5">
<id>com.fa.alerts</id>
<versionNumber>1.0</versionNumber>
<platforms>
<platform name="Android-ARM">
<applicationDeployment>
<nativeLibrary>AndroidAlert.jar</nativeLibrary>
<initializer>com.fa.ne.android.AlertExtension</initializer>
<finalizer>com.fa.ne.android.AlertExtension</finalizer>
</applicationDeployment>
</platform>
</platforms>
</extension>
And this is my Alert.as file:
package {
import flash.events.EventDispatcher;
import flash.external.ExtensionContext;
public class Alert extends EventDispatcher{
public static var extContext:ExtensionContext = null
public function Alert(){
super();
extContext = ExtensionContext.createExtensionContext("com.fa.alerts", null);
public static function androidAlert(aTitle:String, aMsg:String, aNeg:String = "Cancel", aPos:String = "Ok"):void{
extContext.call("showAlert", aTitle, aMsg, aNeg, aPos);
And this is my stub app I'm using to test
<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" title="HomeView">
<fx:Script>
<![CDATA[
protected function spawnAne(event:MouseEvent):void{
var a:Alert = new Alert();
Alert.androidAlert("test","testing");
]]>
</fx:Script>
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Button click="spawnAne(event)" />
</s:View>
Now clicking on that button is what causes the error.
I don't have any kind of swc or link between my testing app and the AS3 Alert_AS project. I'm using Flash Builder 4.6 to import the ANE file using the IDE tools.
To build my ANE I'm using a lightly modified bash script from this post: http://gotoandlearn.com/play.php?id=149 by Lee Brimelow
# path to YOUR Android SDK
export AIR_ANDROID_SDK_HOME="my sdk"
# path to the ADT tool in Flash Builder sdks
ADT="my adt"
# native project folder
NATIVE_FOLDER=Alert_Java
# AS lib folder
LIB_FOLDER=Alert_AS
# name of ANE file
ANE_NAME=AndroidAlert.ane
# JAR filename
JAR_NAME=AndroidAlert.jar
# cert path
CERT_NAME=cert.p12
# cert password
CERT_PASS=password
#===================================================================
echo "****** preparing ANE package sources *******"
rm ${ANE_NAME}
rm -rf ./build/ane
mkdir -p ./build/ane
mkdir -p ./build/ane/Android-ARM
mkdir -p ./build/ane/Android-ARM/res
# copy resources
cp -R ./${NATIVE_FOLDER}/res/* ./build/ane/Android-ARM/res
# create the JAR file
jar cf ./build/ane/Android-ARM/${JAR_NAME} -C ./${NATIVE_FOLDER}/bin .
# grab the extension descriptor and SWC library
cp ./${LIB_FOLDER}/src/extension.xml ./build/ane/
cp ./${LIB_FOLDER}/bin/*.swc ./build/ane/
unzip ./build/ane/*.swc -d ./build/ane
mv ./build/ane/library.swf ./build/ane/Android-ARM
echo "****** creating ANE package *******"
"$ADT" -package -storetype PKCS12 -keystore ./cert.p12 -storepass password -tsa none \
-target ane \
${ANE_NAME} \
./build/ane/extension.xml \
-swc ./build/ane/*.swc \
-platform Android-ARM \
-C ./build/ane/Android-ARM/ .
echo "****** ANE package created *******"
I know this is a bit long but any help would be greatly appreciated! And feel free to let me know if you need some more elaborationI know this is an old post but I'm running into a similar situation - my ExtensionContext is NULL. I've worked through all the examples I can find and I can't get my own ANE functional.
-
Updated AIR 3.4 SDK beta version to release version, package IPA failed
my project contains an ANE , and it works fine with previous version , today i updated sdk version to AIR3.4 sdk release , but failed to package IPA with errors below:
ld: warning: -ios_version_min not specificed, assuming 4.0
Undefined symbols for architecture armv7:
"_null", referenced from:
_g_com_adobe_air_fre_fmap in extensionglue.o
(maybe you meant: _sqlite3_bind_null, __ZN7avmplus20BitmapDataJPEGWriter14j
peg_null_charEP18jpeg_common_structPc , __ZN7CString16s_nullTerminatorE , __ZN7a
vmplus7AvmCore24decrementAtomRegion_nullEPii , _null_name , __ZN7avmplus20Bitmap
DataJPEGWriter9jpeg_nullEP18jpeg_common_struct , _sqlite3_result_null , __ZN7USt
ring16s_nullTerminatorE )
ld: symbol(s) not found for architecture armv7
Compilation failed while executing : ld64
is it a bug? or i do someting wrong?I was really hoping that would work for me to.
I'm using:
AIR 3.4 to compile the ANE and the IPA.
FB 4.7 beta to write the Actionscript Library
Xcode to compile the native library - I added the signature minimalFinalizerFunction() then rebuilt the framework and used the 'release' version
The ANE seems to compile without error using this command:
adt -package -target ane KiipNativeExtension.ane extension.xml -swc KiipNativeExtension.swc -platform iPhone-ARM -C ios . -platform default -C default .
-- here's my extension.xml --
<extension xmlns="http://ns.adobe.com/air/extension/3.1">
<id>com.slaphostgames.extensions.KiipNativeExtension</id>
<versionNumber>0.0.1</versionNumber>
<platforms>
<platform name="iPhone-ARM">
<applicationDeployment>
<nativeLibrary>libKIIPANE.a</nativeLibrary>
<initializer>ExtInitializer</initializer>
<finalizer>minimalFinalizerFunction</finalizer>
</applicationDeployment>
</platform>
<platform name="default">
<applicationDeployment/>
</platform>
</platforms>
</extension>
Then I republish the swf in Flash Pro CS6 (I do this by testing the movie and it pops open ADL but gives runtime errors that the ExtensionContext function is not available - I think that is expected behavior because it's in the simulator)
Then finally I run this command to compile the IPA:
adt -package -target ipa-test-interpreter -storetype pkcs12 -keystore Certificates.p12 -storepass passwd -provisioning-profile Distribution_Ad_Hoc.mobileprovision TestKiip.ipa TestKiip-app.xml TestKiip.swf -extdir . -platformsdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPh oneOS6.0.sdk/
-- here's my -app.xml
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<application xmlns="http://ns.adobe.com/air/application/3.4">
<id>com.slaphostgames.TestKiip</id>
<versionNumber>1.0</versionNumber>
<filename>TestKiip</filename>
<description></description>
<!-- To localize the description, use the following format for the description element.
<description>
<text xml:lang="en">English App description goes here</text>
<text xml:lang="fr">French App description goes here</text>
<text xml:lang="ja">Japanese App description goes here</text>
</description>
-->
<name>TestKiip</name>
<!-- To localize the name, use the following format for the name element.
<name>
<text xml:lang="en">English App name goes here</text>
<text xml:lang="fr">French App name goes here</text>
<text xml:lang="ja">Japanese App name goes here</text>
</name>
-->
<copyright></copyright>
<initialWindow>
<content>TestKiip.swf</content>
<systemChrome>standard</systemChrome>
<transparent>false</transparent>
<visible>true</visible>
<fullScreen>false</fullScreen>
<autoOrients>false</autoOrients>
<aspectRatio>portrait</aspectRatio>
<renderMode>auto</renderMode>
</initialWindow>
<customUpdateUI>false</customUpdateUI>
<allowBrowserInvocation>false</allowBrowserInvocation>
<icon></icon>
<iPhone>
<requestedDisplayResolution>standard</requestedDisplayResolution>
<InfoAdditions><![CDATA[<key>UIDeviceFamily</key><array><string>1</string><string>2</stri ng></array>]]></InfoAdditions>
<!--
<Entitlements>
<![CDATA[<key>keychain-access-groups</key><array><string>...</string></array>]]>
</Entitlements>
-->
</iPhone>
<extensions>
<extensionID>com.slaphostgames.extensions.KiipNativeExtension</extensionID>
</extensions>
</application>
I get this error:
ld: warning: -ios_version_min not specificed, assuming 4.0
ld: duplicate symbol _OBJC_CLASS_$_FIXCATEGORYBUGKP_ASIHTTPRequest in /var/folders/2g/4jk4pqbs28v13vh9scbj1cq40000gn/T/a8ede4b9-22d3-4d0f-8faf-2eafcacffd42/lib com.slaphostgames.extensions.KiipNativeExtension.a(KP_ASIHTTPRequest+OAuth.o) and /var/folders/2g/4jk4pqbs28v13vh9scbj1cq40000gn/T/a8ede4b9-22d3-4d0f-8faf-2eafcacffd42/lib com.slaphostgames.extensions.KiipNativeExtension.a(KP_ASIHTTPRequest+OAuth.o) for architecture armv7
Compilation failed while executing : ld64
Any thoughts? -
Bit locker drive encryption failed due to power failer and hard disk corrupted
I ran Bitlocker drive ecryption drive D. My pc is windows 7 ultimate, while it was in progress of 1% due to power failer the encryption failed, when power resume the drive didn't showed the file format nor the size but it shows the size in disk management.
It showed like this in My computer
I do Have the recovery code password and back of recovery password so I ran the "manage-bde-_unlock D:-rp[my code ]
and my pc got hang no other option rather than to press the restart button.
then I used commang "repair-bde -force D:I:-rp[my rp] and following info showed but it stucked in 1% about 8 hours, and there was no increase in the pecentage
I also connected the hardisk to mac but all othe partation showed but didn't showed the encrypted one.
I had lots of memorable picture and other backups so any one kindly help me to get out of this problem. Thanks for helpHi,
The BitLocker encryption and decryption processes can be interrupted by turning the computer off, and it will resume where it left off the next time Windows starts. This is true even if the power is suddenly unavailable.
Bitlocker-repair (repair-bde) tool
can't repair a drive that failed during the encryption or decryption process.
In addition, could you please explain a bit for what drive you are trying to deal with? external one?
When you first restart your PC, have you seen any signs that indicate that the encryption is in process?
Regarding your scenario, please take a look to see if the following articles could help here:
Scenario 11: Recovering Data Protected by BitLocker Drive Encryption (Windows 7)
Besides, when running manage-bde command, did we followed the steps mentioned in the below article?
Scenario 14: Using a Data Recovery Agent to Recover BitLocker-Protected Drives (Windows 7)
Best regards
Michael Shao
TechNet Community Support -
Cannot send email from my Touch (connection to smtp server fails)
Hello,
I have a new iPod Touch with 1.1.4 and the January apps. I am having a problem setting the Mail application.
I am trying to connect to the IMAP/SMTP servers at my university. I am using the exact same settings and passwords I use on my laptop, which works fine. I can receive email fine on my Touch, but every time I try to send one it fails tellings me "the connection to the outgoing server smtp.myuniversity.edu failed".
If I on purpose write a wrong password for the outgoing mail, the error message I get is different ("check the account settings for the outgoing server smtp.myuniversity.edu").
The university IT people confirmed my settings, and told me that there is nothing blocking any handheld device from using the server.
Does anyone know why this would happen?
Thanks,
MarceloThank you very much for your responses
1) the link to mail setup is (sorry, it's quite long)
http://www.knowledgepak.com/kpaksonline/kpol.asp?PiAlias=kpolpi17&k2dockey=04096 3251575739@kpol17&ViewLink=true&SkipHeader=false&printformat=true
2) I am indeed using SSL, as instructed by IT
3) I do use port 587 instead of 25 (25 does not work either)
Any ideas? Thanks again.
MC
Maybe you are looking for
-
How do I sort the photos in the photo pane when making a photo book?
There's a certain order that I'd like to see the photos I want to use when making a photo book. But the order that I have it in (which is done manually and not by date) in the album does not appear in the same order when I want to turn some of those
-
Check for mat transfer in thro 541 to SC Vendor if it exeeds the PO qty
Dear Friends, user is able to transfer material to sub contractor through 541 movementwith reference to PO if the qty exceeds the PO qty. How can it be stopped ? Is there any error message to be set ? Pl provide me the solution. Regards, ASK
-
Connect Ipod mini to car stereo
I have just bought a new car (ford Fiesta) that has an aux socket for an ipod/mp3. Where and what cable to i need to get to connect my ipod mini to this.
-
What is the best method to backup an Iphone 3G and then install newer ios without losing any data in the phone?
-
The images are large and perfectly good. Im using Jpeg format if that matters. They are good in the beginning on captivate, but always seems to all of a sudden go to being blurry,and usually not straight away,its either hours after I placed inserted