How to addContentView from Native Extension

Hi!
We're currently (still) working at a NativeExtension to show a GoogleMap in Android. What works so far is showing the map as a newActivity. But that doesn't suffice, as only the map or the underlying air-app can accept touch-events this way (If I'm wrong, please DO correct me). So I'm currently trying to add the view containing the map via addContentView to the air-app itself, but so far, no success. I'm assuming, that the whole air-app is only one activity. I'm trying this in the extension's onCreate-method:
                    View extensionview = LayoutInflater.from(context.getActivity().getBaseContext()).inflate(
                                        context.getResourceId("layout.activity_map"), null);
                    context.getActivity().addContentView(extensionview, new ViewGroup.LayoutParams(
                ViewGroup.LayoutParams.FILL_PARENT,
                ViewGroup.LayoutParams.FILL_PARENT));
where context is the FREContext from the function parameter. Doesn't work, any ideas, where the error is here?
Any hints appreciated!
Thanx, Marcus

I've forwarded this to our Android team for their review.
Chris

Similar Messages

  • Successfully using a Native Extension with Flash CS5.5 Pro, having issues

    Hey all,
    I'm trying to use a native extension due to an app rejection about the new storage guidelines. I'm hoping someone can help me figure out how to use a native extension from Flash CS5.5 and the adt command line utility (I've never used before).
    Apples storage guidelines in 5.0.1 require files saved to Documents (and other places) to be marked with the icloud "do not back up" bit. I'm trying to use Adobe's IOS 5.0.1 data storage native extension to do that as I have file sharing enabled and my app downloads files I want the user to be able to copy to their desktop.
    From the bits and fragments I'm reading all over, getting it to compile means using the command line adt tool (I've never used it before) because Flash Pro CS5.5 doesn't support native extensions. Also, this native extension requires a v14 SWF published (11.1) and CS5.5 only goes up to 10.2 (or higher if you install the players).
    I edited the AiriPhone.xml file and pointed it to an AIR 3.1 airglobal.swc and I have AIR 3.1 overlayed in flash. I can't test AIR for iOS anymore after that change but I can get it to compile a SWF. The adt command line adt utility stopped complaining that my SWF version was 13 when it needed 14, so I assume this worked?
    I am trying to compile a debug version so I can see trace statements to see if the native extension reports success on changing the bit. Here is my command line cobbled together from scraps of info on adobe.com and the -help data:
    adt -package -target ipa-debug -connect 192.168.1.80 -provisioning-profile myApp.mobileprovision -storetype pkcs12 -keystore myApp.p12 myApp.ipa myApp-app.xml myApp.swf dat AppIconsForPublish Default-Landscape.png Default-LandscapeRight.png -extdir extensionDir
    Before this iCloud change this app published directly from Flash Pro CS5.5 without any issues. I am only running into issues getting this app to work with this native extension and/or published correctly.
    I am including the folders "dat" and "AppIconsForPublish" as well as splash screens (this app is landscape-only) as well as that extension in the folder extensionDir.
    After putting in my password my app compiles into an IPA which I can drop into iTunes. It has the same general size as the IPA generated from Flash Pro. The icon is correct, etc.
    When I sync this file, the progress bar goes across, I see it loading on my iPad and then once it goes to install I get a popup saying "iTunes Sync: 'myApp' failed to install."
    Is there anything obvious wrong with my adt line? Has anyone else used this native extension? Ideas on what I can do to fix this?
    No, unfortunately I did not build this with Flash Builder. I am an avid user of it now and this would be a moot point as it uses ANEs and changes SWF versions trivially. I have to get this to compile using Flash Pro CS5.5 though.
    Any help is greatly appreciated!
    edit:
    Just FWIW, after I updated the .xml to use the latest AIR and such (so the version is 14) I removed the extension, exported purely from Flash Pro CS5.5 and the app works fine. As soon as I enable the <extension> in the XML I can no longer install the app. This just appears to be a noob adt publish issue.

    My app downloads PDFs, movies and other information-esque files and saves them to the apps Documents folder so they can be retrieved via file sharing. These files not being in something purgable like /Library/Caches and not having the "do not back up" bit is why I was rejected.
    update: It's definitely my command line building.. I took out the native extension completely and published from flash to an IPA and it works. I then run adt on the same SWF that just worked and it fails to install. So the install failing is my command line. I see this article and my command line is very similar. I'm really uncertain why it's failing.

  • Problem creating native extension package

    In an effort to learn how to create a native extension on my own, I've looked to the examples and help documentation from Adobe. I have actually created the required files for the extension (the native code, extension descriptor, the swc library and library.swf). However, when I run the command to build the .ane file I get this error:
    /Users/dalston/TeamAGC/sdk/4.6.0/bin/adt -package -target ane ../release/DeviceInfoExtension.ane extension.xml -swc DeviceInfoExtension.swc -platform iPhone-ARM library.swf libDeviceInfo.a
    output file is not writable
    I also tried a variation of that command that results in the same error (which comes straight from the Adobe help docs):
    /Users/dalston/TeamAGC/sdk/4.6.0/bin/adt -package -target ane ../release/DeviceInfoExtension.ane extension.xml -swc DeviceInfoExtension.swc -platform iPhone-ARM -C platform/ios . -platform default -C platform/default library.swf
    output file is not writable
    I'm not sure what I'm doing wrong here. Has anyone had this problem before? Thanks in advance for your help!

    Hello Colin,
    The folder I was working from /Users/dalston/TeamAGC/sdk/4.6.0, which is where the AIR sdk resides. The actual directory with the native extension files are in /Users/dalston/Documents/Adobe Flash Builder 4.6/DeviceInfoExtension/bin/DeviceInfoExtension. When I run the ls command I see all the folders under the main user (dalston, which is me). I believe I have read/write access to everything since I am the adminsitrator on this machine. I am on a Mac by the way.

  • Add native extensions to a projec in adobe flash cs 5.5

    hi,
    how can I add native extensions to an android project? I 'd like to  add an *.ane file. I have the adobe flash cs 5.5 and actionscript 3.0.  I have this information, Project properties -> Flex Build Path -> Native Extensions -> Add but I can't find the project properties on menu bar (not windows -> project). what is the flex???

    You must get used to using the command line ADT tool if you wish to compile using an .ane. Flash CS5.5 does not have built in support such as Flash Builder to handle the ANE for you. Google 'adt compile ANE extension' and it will give you an example of using the adt command line tool with -extensionDir support for included extensions.
    I ended up just buying Flash Builder.. Chief problem being certain ANEs will require certain version SWFs to compile against and it's not easy to get Flash CS5.5 to give you, say, a version 14 SWF.

  • Native Extensions don't work in Flash CS6

    Edit: Never mind.
    Whoever made the native extension, despite it being a useful function, used the abominable package naming structure of:
    com.coder.nativeExtensions.NameOfClass.NameOfClass
    Anybody going to use it would import com.coder.nativeExtensions.NameOfClass, in which case it would not work because the name of class is also the name of an extra package directory and you have to repeat it twice which makes no sense, but it works with the class name redundantly repeated twice in the import.
    I am on Flash Professional CS6. I upgraded it just so I could use Native Extensions. I have browsed and added the native extension to libraries. I have added the import statement and added the xml entry for extension ID.
    If I try to run it I get "Definition could not be found" error for the package import. There is a complete lack of documentation or any way to find out why it isn't working. All I get is an unhelpful error that doesn't address the actual problem.
    How do you get native extensions to work?

    There was nothing wrong with CS6 in this situation, it was that the package name of the specific extension I was trying to use that was horribly named, to the point you had to repeat the class name twice, which means most developers would only put it once and it wouldn't work. Being that this was the first native extension I tried to run, it seemed that the native extension feature didn't work.
    Say your name is Bob Smith and you make a native extension that runs your hardware camera as a flashlight.
    If you name the class FlashLight and the package name com.bobsmith.nativeExtensions.FlashLight
    people would have to put
    import com.bobsmith.nativeExtensions.FlashLight.FlashLight;
    or
    import com.bobsmith.nativeExtensions.FlashLight.*;
    to import it. And that woudldn't  make much sense. "FlashLight" is the name of the class. If the class and the package subdirectory have the exact same name, people are going to think the package subdirectory is the class.
    Most people trying to import it would put
    import com.bobsmith.nativeExtensions.FlashLight;
    or
    import com.bobsmith.nativeExtensions.*;
    in which case it wounld not work.
    A non-insane way to name your package would be com.bobsmith.nativeExtensions.hardware
    Then one could put
    import com.bobsmith.nativeExtensions.hardware.FlashLight;
    or
    import com.bobsmith.nativeExtensions.hardware.*;
    That would make sense, either importing the FlashLight hardware feature or all hardware features in the package.

  • How to access android resource in java native extension....??

    hi..
    i want access android resource..
    for example, res/menu/menu.xml, res/values/strings.xml ... etc...
    - R.java -
    /* AUTO-GENERATED FILE.  DO NOT MODIFY.
    * This class was automatically generated by the
    * aapt tool from the resource data it found.  It
    * should not be modified by hand.
    package com.flash.extension.nativelib;
    public final class R {
        public static final class attr {
        public static final class drawable {
            public static final int icon=0x7f020000;
            public static final int notification_icon=0x7f020001;
        public static final class layout {
            public static final int main=0x7f030000;
        public static final class string {
            public static final int extension_app_name=0x7f040001;    -> "hi extension"
            public static final int extension_hello=0x7f040000;
    so i used getResourceId("string.extension_app_name");
    but it's not work.. throw NotFoundException error..
    so i used context.getString(R.string.extension_app_name);
    it's work, but return incorrect value.. -> return value is "0.0.0".. it's versionName in actionScript Client Project..
    why can't access android resource in native extension?
    how to get android resource in java natvie extension..??
    Is there anyone who has a sample source??
    help.. me.. please..

    Hello,
    I am facing the same issue with the native extension i am using follwing code to get the resource id
             Intent inte = new Intent(context.getActivity().getApplicationContext(),SecondActivity.class);
              inte.putExtra("layout",context.getResourceId("layout.secondactivity"));
              context.getActivity().startActivity(inte);
    i am getting this exception "android.content.res.Resources$NotFoundException:layout.secondactivity"
    I have included activity in the native manifest file as well as flex's manifest file for android.
    please help me with this or an example will be great thanks.

  • How to allow some fixed extension go in from outside to inside but not allow go from inside to outside

    how to allow some fixed extension go in from outside to inside but not allow go from inside to outside
    for example, allow JPEG, MOV, AVI data flow from outside to inside
    but not allow JPEG, MOV, AVI files access or upload or get by outside, in another words not from inside to outside
    how to configure?

    Hi,
    The ZBF link sent earlier show how we can inspect URI in http request
    parameter-map type regex uri_regex_cm
       pattern “.*cmd.exe”
    class-map type inspect http uri_check_cm
       match request uri regex uri_regex_cm
    ZBf is the feature on Cisco routers and ASA though concepts are little same but works differently. However it is important that you can be more granular with the protocol (layer 7) inspection only. Like on ASA if you will try to restrict .exe file from a p2p application that won't be possible, But on router you have some application for p2p in NBAR and you can use it file filtering. Please check configuartion example for both devices.
    Thanks

  • Problems adding native extensions from linked resources in Flash Builder 4.7

    While adding native extensions (.ane files) from linked source folder in a Actionscript Mobile Project on Flash Builder 4.7, a java.lang.NullPointerException is thrown. Below is the stacktrace. Any help would be appreciated.
    Also, what is the link/site to file Flash Builder 4.7 bugs?
    java.lang.NullPointerException
              at com.adobe.flexbuilder.project.ui.utils.ANE.AppXMLFileANEExtensionHandler.addToAppXMLModel (AppXMLFileANEExtensionHandler.java:78)
              at com.adobe.flexbuilder.project.ui.utils.ANE.AppXMLFileANEExtensionHandler.addToAppXmlFile( AppXMLFileANEExtensionHandler.java:65)
              at com.adobe.flexbuilder.project.ui.utils.ANE.AppXMLFileANEExtensionHandler.addToAppXmlFile( AppXMLFileANEExtensionHandler.java:48)
              at com.adobe.flexbuilder.project.ui.utils.ANE.ANEController.applyWorkingCopy(ANEController.j ava:791)
              at com.adobe.flexbuilder.project.ui.utils.ANE.ANEController.applyWorkingCopy(ANEController.j ava:814)
              at com.adobe.flexbuilder.project.ui.utils.ANE.ANEpathControl.contributeToLibraryPath(ANEpath Control.java:723)
              at com.adobe.flexbuilder.project.ui.utils.AirBuildPathsPropertiesPane.contributeToLibraryPat h(AirBuildPathsPropertiesPane.java:85)
              at com.adobe.flexbuilder.project.ui.utils.AbstractBuildPathsPropertiesPane.getLibraryPath(Ab stractBuildPathsPropertiesPane.java:1344)
              at com.adobe.flexbuilder.project.ui.properties.BuildPathsPropertyPage.applyProjectSettings(B uildPathsPropertyPage.java:520)
              at com.adobe.flexbuilder.project.ui.properties.AbstractFlexProjectPropertyPage.performOk(Abs tractFlexProjectPropertyPage.java:117)
              at com.adobe.flexbuilder.project.ui.properties.BuildPathsPropertyPage.performOk(BuildPathsPr opertyPage.java:617)
              at org.eclipse.jface.preference.PreferenceDialog$13.run(PreferenceDialog.java:964)
              at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
              at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
              at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
              at org.eclipse.jface.preference.PreferenceDialog.okPressed(PreferenceDialog.java:944)
              at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.okPressed(FilteredPreferenceDial og.java:447)
              at org.eclipse.jface.preference.PreferenceDialog.buttonPressed(PreferenceDialog.java:233)
              at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
              at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
              at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
              at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4128)
              at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457)
              at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480)
              at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1465)
              at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1270)
              at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3974)
              at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3613)
              at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
              at org.eclipse.jface.window.Window.open(Window.java:801)
              at org.eclipse.ui.dialogs.PropertyDialogAction.run(PropertyDialogAction.java:158)
              at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
              at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionI tem.java:584)
              at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
              at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java :411)
              at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
              at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4128)
              at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457)
              at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480)
              at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1465)
              at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1270)
              at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3974)
              at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3613)
              at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
              at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
              at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
              at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
              at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
              at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
              at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
              at com.adobe.flexbuilder.standalone.FlashBuilderApplication.start(FlashBuilderApplication.ja va:79)
              at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
              at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLau ncher.java:110)
              at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.jav a:79)
              at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
              at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
              at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
              at org.eclipse.equinox.launcher.Main.run(Main.java:1410)

    A year later, but I'm facing the same bug.
    If your ever found a solution I'd be glad to hear.
    I filed a bug with more details and my own workaround: 
      3697022

  • How do I keep photoshop from changing extensions from .JPG to .jpg

    How do I keep photoshop from changing extensions from .JPG to .jpg?

    Preferences > File Handling and uncheck "Use Lower Case" (Mac)
    or in the same area in the Windows version, choose "Use Upper Case" from the drop-down menu.
    Gene

  • How to use foreground dispatch system of android NFC with AIR native extension?

    Hello,
    I'm developping an AIR application which invokes NFC on android, via AIR native extension (ANE).
    I would like to enable foreground dispatch system of NFC (see http://developer.android.com/guide/topics/nfc/advanced-nfc.html#foreground-dispatch), but unfortunately it has not been achieved so far.
    [Problem]
    For enabling foreground dispatch system of android NFC, we need to listen some android native events e.g.) Activity.onNewIntent(), Activity.onPause() and Activity.onResume(). But I have no idea how to dispatch them to ANE. Could anyone tell me how to get it?
    I know there is an available ANE for android NFC as follows:
    http://code.google.com/p/ane-lab/source/browse/#svn%2Ftrunk%2Fmobile%2Fandroid%2Fjava%2Fnf c1
    But it is not fit for our use case, as it just uses "intent dispatch system" (another way to use android NFC).
    Maybe AIR must be extended for this case, but any information is welcome.
    Thanks.

    Hello
    My name is Sadao Tokuyama.(http://twitter.com/tokufxug)
    Is the person who is to manage the sample code in experimental AIR
    Native Extension.
    If you want to achieve the de-patch system foreground NFC, it is
    necessary to consider the following points.
    1.Create FREFunction for initial processing. processing of onCreate.
    2.can be obtained in onResume Event.ACTIVATE. After issuing
    Event.ACTIVATE, call the FREFunction to run in onResume.
    3.can be obtained in onPause Event.DEACTIVATE. After issuing
    Event.DEACTIVATE, call the FREFunction to run in onPause.
    4.onNewIntent can be obtained at InvokeEvent.INVOKE. After issuing
    InvokeEvent.INVOKE, call the FREFunction to run onNewIntent.(Gets the
    Intent of the scanned NFC. : FREContext.getActivity().getIntent())
    I have committed the sample code. Your reference.
    http://code.google.com/p/ane-lab/source/browse/#svn%2Ftrunk%2Fmobile%2Fandroid%2Fjava%2Fnf c-foreground-dispatch
    Thanks.

  • AIR Native Extensions. How to loop FREObject properties?

    Hello.
    We're working on a new AIR Native Extension, the goal is to run javascript code inside AIR. However that's actually not directly related to the problem.
    The problem itself:
    - we need to pass some AS3-objects to the javascript runtime
    - javascript runtime (SpiderMonkey) has a different GC, different memory aligning and a lot of other things, that differs from AIR
    - the only suitable way for us is to iterate through AS3-Object properties and to create a mirror-object in SpiderMonkey
    - we do not have such an API in FlashRuntimeExtensions.h which would allow us to iterate Object properties
    So the question is - is there any way to iterate on AS3-Object properties in С/С++ side of a Native Extension?
    If there is not than the only possibility for us is to use JSON-strings which is actually far from optimal.
    Thanks in advance,
    Denis

    Thanks for your reply but they are for sale actually, not open sourced... for example: http://myappsnippet.com/gcm/ which supports custom notification icons and sounds...

  • How to use GooglePlayServices libs in Native Extension of Android AIR app?

    I am trying to use some features of Google Play Services lib but I could not make it work. I have added the reference to the google play service libs to the manifest file (from Flash Builder)
    <application android:enabled="true">
    <meta-data  android:name="com.google.android.gms.version"
                    android:value="@integer/google_play_services_version" />
    <activity android:excludeFromRecents="false">
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
    </activity>
    </application>
    In my ANE, I have added the reference to the source of google-play-services_lib, but when I tried to call the FREFunction to check the availability of Google Play Service
    @Override
    public FREObject call(FREContext context, FREObject[] args){
         boolean result = false;
         try{
          Activity activitiy = context.getActivity();
          activityContext = activitiy.getBaseContext();
              result = isGooglePlayServiceExists();
         }catch(IllegalStateException e){
          Log.e(AneUtils.TAG, "Failed to get AIR current activity", e);
         FREObject obj = null;
        try{
            obj = FREObject.newObject(result);
        }catch(FREWrongThreadException e){
            Log.e(AneUtils.TAG, "Failed to create FREObject from [" + result + "]");
        return obj;
    private boolean isGooglePlayServiceExists(Context activityContext){
        int googlePlayServicesCheck = -1;
        try{
            googlePlayServicesCheck = GooglePlayServicesUtil.isGooglePlayServicesAvailable(activityContext);
        }catch(Exception e){
            Log.e(AneUtils.TAG, "Error getting googlePlayService state",e);
        if(googlePlayServicesCheck == ConnectionResult.SUCCESS){
             return true;
        return false;
    The ANE crashed at the line GooglePlayServicesUtil.isGooglePlayServicesAvailable(activityContext) so I really doubted the Google Play Service libs was not added.
    Has anyone successfully imported the Google Play Serivce libs into Adobe AIR Android app?
    Any advice or help will be appreciated. Thank you.

    hey sshk5,
    I have managed to make it work. The solution is quite simple, i will explain the steps below
    1. Download the latest Android SDK from ADT (including the latest version of GooglePlay lib)
    2. Check the version number of Google Play lib ( for example 412312....) something and in your FlashBuilder project, make sure you use the  exact number like
    <meta-data  android:name="com.google.android.gms.version" android:value="412312" />
    3. Use tool to merge the googlelib jar file with your native extension before importing the native extension to FlashBuilder. If you do not want to use any other tool, you can use the AIR 4.0 which will allow you to use commandline to merge jars (and even dependency resources)
    Hope it helps

  • How do I remove an extension from safari?  I am using safari 6.0.5.  I loaded an extension curiyo yesterday and it is limiting my clicking on safari now.  I want to uninstall it.  Please help.  Thanks.

    How do I remove an extension from safari.  I am using safari 6.0.5.  I am trying to remove curiyo which has limited my clicking ability in safari.  I cannot seem to find safari options or extensions to uninstall the program.

    Hi...
    From your Safari menu bar (top of your screen) click Safari > Preferences then select the Extensions tab.
    Just click uninstall.

  • Receiving message in C# from Firefox Extension through Native Messaging

    I am trying to get active Tab Title as well as URL from Mozilla Firefox. I have started to build up a Firefox add on and installed it using registry entry. My own developed Firefox add on is installed perfectly and it is showing the current machine time. This Firefox add on contains file like chrome.manifest, install.rdf, sample.xul, overlay.xul, clock.xul, clock.js etc. Below is my code.
    chrome.manifest ----
    content helloworld jar:chrome/helloworld.jar!/content/
    overlay chrome://browser/content/browser.xul chrome://helloworld/content/overlay.xul
    locale helloworld en-US jar:chrome/helloworld.jar!/locale/en-US/
    locale helloworld fr-FR jar:chrome/helloworld.jar!/locale/fr-FR/
    skin helloworld classic/1.0 jar:chrome/helloworld.jar!/skin/classic/
    style chrome://browser/content/browser.xul chrome://helloworld/skin/overlay.css
    style chrome://global/content/customizeToolbar.xul chrome://helloworld/skin/overlay.css
    clock.xul----
    <?xml version="1.0"?>
    <?xml-stylesheet href="chrome://global/skin/"?>
    <!DOCTYPE dialog SYSTEM "chrome://helloworld/locale/clock.dtd">
    <dialog id="clockDialog" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
    title="&helloworld.clock;" buttons="accept"
    onload="initClock();">
    <script type="application/javascript" src="chrome://helloworld/content/clock.js" />
    <hbox align="center">
    <label value="&helloworld.currentTime;:" />
    <textbox id="currentTime" />
    </hbox>
    </dialog>
    clock.js-----
    function initClock() {
    showCurrentTime();
    window.setInterval(showCurrentTime, 1000);
    function showCurrentTime() {
    var textbox = document.getElementById("currentTime");
    textbox.value = new Date().toLocaleTimeString();
    textbox.select();
    I want to convert this code to fetch current tab title and URL from Firefox browser. At first, I am concentrating on the browser extension part and not the native for now and I just want to have a listener inside the js files such that whenever I switch to a different firefox tab or firefox window, an alert should show up from the browser itself (not from native at this moment) displaying the active tab's title and URL.
    I want to get the solutions it code . It would be great help if any one can help me to get the exact solutions.

    Thanks for your prompt reply '''@philipp'''. I will definitely follow your suggestion and upload my question at Mozilla forum.

  • How to convert keystore (from native android project) to .p12 to use with AIR project?

    Due to the advancements with adobe AIR, I'm really excited to be finishing up a HUGE update of an old project that was originally made with native android.
    But, i've hit a brick wall with 2 issues, and it would be terrible if all the work i've done in AIR was for nothing...
    First, how do I convert the keystore I previously used (from native android project) to .p12 to use with AIR project? (on a mac)
    Second, how do I remove the "air." that gets automatically appended onto the front my android package name? I plan to use a captive runtime, so it's not really needed at all, and I can't upload it like this as an update because it will think it's a different app.
    Please help so I can continue using air for all my projects from now on!

    Thanks for the reply!
    So I'm going through this guide..
    http://helpx.adobe.com/air/kb/opt-out-air-application-analytics.html
    I followed all the steps, made all the adjustments to the androidmanifest.xml like it asks.
    But when i get to the stap that says
    "Run the following command to create the resource file for the updated AndroidManifest.xml:"
    I run this..
        "/Users/brybam/Documents/eclipse/android-sdk-mac_x86/platform-tools/aapt" package -f -M AndroidManifest.xml -F resources.arsc -I "/Users/brybam/Documents/eclipse/android-sdk-mac_x86/platforms/android-8/android.jar" -S ./res
    But I keep getting the same error
        ./res/layout/expandable_chooser_row.xml:1: error: Error parsing XML: not well-formed (invalid token)
        ./res/layout/expandable_multiple_chooser_row.xml:1: error: Error parsing XML: not well-formed (invalid token)
        ./res/layout/main.xml:1: error: Error parsing XML: not well-formed (invalid token)
        ./res/layout/multiple_file_selection_panel.xml:1: error: Error parsing XML: not well-formed (invalid token)
        ./res/layout/ssl_certificate_warning.xml:1: error: Error parsing XML: not well-formed (invalid token)
    The guide doesn't say anything about these xml files, and im not sure what to do with these ore how to handle them.
    If i go into the res/layout folder, and just delete these (i know theyre for my layout and i need them, but im just saying i deleted them for the sake of a test)
    I was able to get through the rest of the steps in the guide fine, make an apk, and put it on my phone...only to find out the app will crash the moment you try to run it.
    So my question is, does anyone with any experience re-packaging an android application know how I might get around this or take care of the errors with the xml files in the layout folder?
    Thanks!!
    EDIT to note something i've tried:
    So, earlier in the guide they have me use thing thing called the "AXMLPrinter2.jar" to make the AndroidManifest.xml readable so i can edit it.
    I run something like this:
        java -jar "/Users/brybam/Desktop/repackage/AXMLPrinter2.jar" AndroidManifest.xml > AndroidManifest.xml.bk
    This makes a new file "AndroidManifest.xml.bk" and i can edit that.
    So, I was thinking with all of these layout xml files, maybe I could run this "AXMLPrinter2.jar" on them and then edit them. Because right now if you open them they're not human readable, and its hard for me to work on them if they're not...
    But when i do the same command I did on the AndroidManifest.xml i just get blank files...
    I tried
        java -jar "/Users/brybam/Desktop/repackage/AXMLPrinter2.jar" main.xml > main.xml.bk
    Just get a blank file.
    So, i think the issue might be with these just not being re-formatted to human readable.

Maybe you are looking for