Air for Android - Sqlite - Slow inserts

Hello there,
What is the best way to follow in order to make a lot of insert on a sqlite db?
I ask because I noticed a great and unpredicatable slowdown on my Galaxy S when I make a lot of insert.
I use an openAsync connection because I need to monitor what is happening.
Everytime a row is created I increment a counter.
It starts well, then after a 100 insert it slow down and nearly dies.
Any suggestions?
Thanks in advance

I optimized the query:
- I reuse the same statement and changing only the parameters
- I use the transaction with begin and commit
This speeded up the whole things in an incredible way, however I still notice a slow down that luckily, after the optimizations I made, never dies.
Any other suggestion will be appreciated!

Similar Messages

  • Air for Android Extremely Slow...

    Hey everybody,
    Hopefully some of you have been trying the prerelease of Air for Android like myself. Its all great and easy peasy to export the apps to my phone but it seems to be ridiculously slow even for seemingly simple scripts.
    This is what i'm trying to run at the moment and the app times out before it gets running (All the apps do get running eventually but only after the time out timer could have run over multiple times).
    import flash.display.Shape;
    import flash.events.Event;
    import flash.sensors.Accelerometer;
    import flash.events.AccelerometerEvent;
    var vx:Number = 0;
    var vy:Number = 0;
    var s:Shape = new Shape;
    s.x = stage.stageWidth/2;
    s.y = stage.stageHeight/2;
    with (s.graphics)
        lineStyle(3,0);
        drawCircle(0,0,5);
    addChild(s);
    var accel:Accelerometer = new Accelerometer();
    addEventListener(Event.ENTER_FRAME, onFrameLoop);
    accel.addEventListener(AccelerometerEvent.UPDATE, onAccelEvent);
    function onAccelEvent (evt:AccelerometerEvent):void
        vx += evt.accelerationX;
        vy += evt.accelerationY;
    function onFrameLoop (evt:Event):void
        s.x = Math.round(s.x + vx);
        s.y = Math.round(s.y + vy);
    From what I can see theres nothing actually wrong with the code from what I can see but it just takes so frickin' long to load. If I make an app with some equally simple animations it loads almost instantly. I am aware that this is only a prerelease version of the software and the documentation does say that hardware acceleration has not been added yet but whenever I watch the videos up on youtube of the Adobe team making amazing apps with obviously buckets of script running smoothly on their phone I get annoyed
    P.S The processor on my phone isn't the problem either (Nexus One Eclair )

    If you are deploying for iPhone it is on the 'general' settings(First setting page opened).
    Just noticed you are making android app but i still added iphone deployment settings for further future
    But if you are using it for flash/android you have to add code into your fla descriptor with XML language(dont worry it is 1 line of code)
    Watch the video on this page about GPU rendering:
    http://blogs.adobe.com/cantrell/archives/2010/10/gpu-rendering-in-adobe-air-for-android.ht ml
    Your app shouldn't lag after these steps but if you have a project that gets bigger and has lots of code it MIGHT lag so that is when external files should help.

  • Air for Android problem

    Hi. Hope someone can help!
    I've successfully published an interactive childrens book app for the iPad using Air for iOS. I now want to publish the same app using Air for Android. I did a quick test just to see what it will look like and found that the animation is very slow and therefor the voice over is out of sync.
    The animations are hand drawn images with very basic tween motions. That's it!
    For navigation I used code snippets.
    Can someone please point me in the right direction?
    M

    did you test on an android device or emulator?
    if you used the emulator, test on a device.
    if you tested on a device make sure you have always have a background bitmap even if its just a stage colored rectangle.

  • How to add Google Ads or similar in "AIR for Android" application?

    Hello,
    I have developed my android application (AIR for Android) in Flash Professional CS5.5. It's completed and fully tested on multiple android phones. Now I want to add Google Ads in my application to make some money.
    What I already know:
    I know that Adobe provides AdMob native extension API which allows you to add Google Ads in your app. But unfortunately, it's not free.
    What I want:
    I want a free resource through which I can add ads in my application.
    Please guide me how can I achieve this?
    Thanks in advance,
    momersaleem

    Yes, its for me broken, too.
    I found the link in this thread:
    http://forums.adobe.com/message/4036804
    Maybe try to contact the author or one of the thread participants for an unbroken version?

  • How can I use a file in flash cs6 that I made in flash cs5.5 air for android

    I have made an app in in air for android in flash cs5.5 air for android, and I want to edit it in cs6 and play it in cs6.
    But if I put Ctrl+Enter I got an error: createWin process failed with error 2: system couldn't find the file. I think the problem is that I'am using air for android 2.6 version in flash cs5.5 and version 3.2 in flash cs6. I have searched the web and found out that you can add older air versions using the sdk manager and I have tried it but first I get the error that the version of the sdk I am trying to install is not valid and after some files that I added to the sdk folder I get this error:Only SDK higher than version 3.4.2540 may be added.
    I there a possible way to update the air for android for an fla or apk? Or how can I let my originally file work fine in flash cs6??

    system couldn't find the file
    If you can´t get a more specific hint why your project can´t compile then I can think of some reasons theis error might occur
    1.You had files included besides the swf, like videos, audio files, xml files, that are not present in the place air expects them to be
    2.somewhere in your createWin functions there is a class import needed that isn`t present in 3.2 anymore, for example some classes or functions from classes that were valid in 2.6 are not any more in 3.2
    3. to achieve better eror logging, allow for debugging in the publishing options and see what specific lines in your code throw the error
    4.any air app needs a cert file, this needs to be created once, if you migrated to e new system it might be you never created that file which air expects to even begin the compiling process
    once you isolate the problem, report back

  • Air For Android - Full Screen not working

    Opened CS5.5 > Chose "Air For Android" which gave me a stage dimension of 480x800 default. I then created my app.
    I am using a Droid Bionic and testing my app on it. It will not go to full screen, regardless of how I am holding the Droid. When publishing, I clicked "Full Screen" and Portrait, Landscape, Auto Orientation, etc. I tried all of the publishing options, yet still there is white screen on the eastern and southern side of the screen.
    I have a picture on the main screen, and it fits perfectly within the 480x800 dimmensions when playing in Flash. After publishing to an APK file and testing it on Droid, I have that white space as mentioned, as if the stage size grew larger than the picture / app. I also shrank the stage(480x800) dimensions to to (340x600) , but still the same amount of white space. When I move the picture to the right a bit, and publish, it shows the white space on the left hand side of the stage. This can only mean that when I publish, the stage size grows but everything on the stage stays the same. 
    Any ideas?
    Thanks!

    I removed:
    stage.scaleMode = StageScaleMode.NO_SCALE;
    stage.align = StageAlign.TOP_LEFT;
    from AS3 and it works better. Now there is even white space on the north and south side of the screen. Clicking "Full Screen" in the publish settings, makes a little more white space, which is weird. It as if now the stage is expanding its height, rather than its height and width due to me using the above code. Still, would like to get rid of that extra white space.
    Edit: It looks like the stage height grew by 60. If I expand the picture by 60, placing it on the stage at 0x and -30y, it fits fine on the bionic. I don't understand why this is happening, and scared that it may be different for each device.

  • APP created with Air for Android but doesn't work on the emulator for test - Help!

    When I create an application using Flash CS5.5>>> AIR FOR ANDROID.
    After creating a test page I go to publish settings and send the app on Emulator RELEASE ... The APP is loaded correctly but as soon as you start the emulator, give this error "The application XXnameappXX (process air.XXnameappXX) has stopped unexpectedly. Please try again" Help Please!

    Ok i've find this before "Adobe Flash CS5/AIK2.5/runtimes/air/android/emulator/Runtime.apk" and install it on android emulator! Now works all i hope! Thanks for your answer!

  • Best practice for images. Air for Android

    Hey guys...
    I was thinking about the best solution when it comes to images storage for Air on Android.
    Since I dont have much experience with non-web based apps, I thought of two way and I would like to know your thought on them.
    1.Application Storage Directory. If I get it right, this folder is created when the app is installed and the project can access files in it. Any idea on how this can work with images?
    2.Database. My app uses a local database anyway so maybe that the proper way to do it. I've done some research and found out that the image must be converted to a byte array (thats easy) but then I dont have a clue on how to save it to the database.
    So? Which one is better for the mobile world?
    Also, if there are other ways let me know please.

    While I am no expert in this area, I did run across this blog:
    http://www.remotesynthesis.com/post.cfm/local-caching-of-remote-images-in-air-for-android
    It deal with local caching of remotely loaded images.  Should be exactly what you are looking for.
    Darren

  • Adobe AIR for Android - GPU Mode - Bitmap Auto-Smoothing Issue

    Hi everyone
    I'm having a bit of an issue with the AS3 bitmap object. I'm currently developing an 8-bit style pixel game for AIR for Android.
    This game is being developed at a very low resolution and is being scaled up to maintain the charm of an old retro game.
    One of the methods I'm using is drawing pixels directly to bitmap objects and scaling the object up to create the old look.
    When testing on a mobile device, this works beautifully when you set the rendering method to Direct but when you change
    the render method to GPU the visuals go all blurry and anti-aliased (it's as if the bitmap is being smoothed out). The mini map
    for example is rendered using the setPixel method and then scaled up 9 times. Looks great on my PC but once I export it to my phone
    it looks absolutely awful! This is no good as I want to keep the clean, solid pixel look to maintain the the old 8-bit feel and obviously
    I'd like to stick to GPU mode due to it's speed.
    Like I said, this only happens once you test on a mobile device in GPU mode - it doesn't do it on my main desktop machine or
    in Direct mode. I already have the stage quality set to low and I've tried setting the bitmap's smoothing property to false but
    it does nothing.
    Does anyone have any suggestions as to how I can get around this?

    How about first blit your image to a small bitmapData, then draw it on a large bitmapData (9X larger)?
    Like,
    var small_bmd:BitmapData = new BitmapData(SMALL_WIDTH, SMALL_HEIGHT, false);
    var large_bmd:BitmapData = new BitmapData(SMALL_WIDTH * 9, SMALL_HEIGHT * 9, false);
    var bm:Bitmap = new Bitmap(large_bmd, PixelSnapping.NEVER, false);
    var blitRect:Rectangle = new Rectangle(0, 0, 9, 9);
    var i:uint, j:uint, blitColor:uint;
    small_bmd.draw(SOURCE_IMAGE);
    large_bmd.lock();
    for(j = 0; j < SMALL_HEIGHT; j++){
         for(i = 0; i < SMALL_WIDTH; i++){
              blitColor = small_bmd.getPixel(i, j);
              blitRect.x = i * 9;
              blitRect.y = j * 9;
              large_bmd.fillRect(blitRect, blitColor);
    large_bmd.unlock();
    Not sure if the code works or not, but hopefully this helps.

  • Partial wakelock in Adobe Air for Android

    I'm developing Adobe Air (for Android) application which is intended to be constantly on. App has event based operations. However, when phone enters to sleep mode app is able to perform only one or few events in a second which is not good enough. AIR's SystemIdleMode.KEEP_AWAKE -mode is not an alternative since it is too battery consuming.
    I'm looking for a solution where phone is allowed to go into sleep mode (screen is off) but still CPU performance is not drastically dropped. Not sure if Android's partial wakelock -mode does the job and is available via ANE?

    Well Im a bit puzzled now. I just created a quick AIR app using AIR13 for Android and did a DEACTIVATE test on the NativeApplication.nativeApplication property and used a TextField to "trace" out the frame rate when the app deactivated. The frame rate stayed at 24FPS the entire time. I turned the screen off, let it turn off, went to the home screen, and switched to other apps while the test app was still running. In all cases, the frame rate never dropped to 4FPS as indicated in Adobe's documentation. So it is either something a bug or feature of AIR13+ or it is how Android KitKat handles applications in the background. Im using an unlocked/stock Moto X running Android 4.4.3. The app also appends the getTimer() call to the end so you can see that it does change. Here is a link to the quick app I created: Dropbox - deactivate.apk
    I guess if you want to download that and test it out to see how it behaves on your device and let me know the results. What device and OS are you running?
    Below is the original message I started to type before I decided to create a quick app to test with. It may or may not still be relevant based on your results from my app test.
    If you are looking at just recording information, you could probably setup something on the Android/Java side that gets started when the app "sleeps" using the DEACTIVE event as a trigger to start the ANE side of things. Then when your app "wakes", you could use the ACTIVATE event to trigger a call to the ANE to pull all the data collected in the Java side back to AIR and stop the ANE data capture since the data capture would be back to being handled by AIR.

  • Adobe Air for Android 2.3.4

    I need Adobe Air for Android 2.3.4 Urgently.
    I recently made an app on Flash CS5.5 and it installed correctly.
    It said to install adobe air
    But then it said "This prodict is not comptable with this version of..."
    ANY help?

    Hi,
    Please download latest AIR3.4 SDK from http://www.adobe.com/devnet/air/air-sdk-download.html.
    Look for the runtime.apk present in the AIRSDK folder \runtimes\air\android\device.
    Install the AIR3.4 runtime on android device using command(Refer http://help.adobe.com/en_US/air/build/WSfffb011ac560372f-5d0f4f25128cc9cd0cb-7ff6.html) -
    adt -installRuntime -platform android -device deviceID -package path-to-runtime
    The above steps will install latest AIR runtime on Android device.
    Please note that - Applications created and published from Flash Professional CS6 for Android platforms will run on devices that run Google Android™ 2.2 operating system or higher.
    Thanks,
    Meenakshi
    Flash Pro Engg Team

  • Adobe AIR for Android update FAILS

    The most recent update for Adobe AIR for Android is failing on multiple users. Reading the reviews, I am having the same problem with running the update. Update runs, then stops and won't update? Why bother coming out with an update THAT WON'T LET YOU UPDATE AIR???????

    Hi,
    Could you please share the device used, OS version, kernel version and the last Adobe AIR installed in your device. Also, is this intermittent or it is failing everytime.
    Regards,
    Nimit

  • Adobe AIR for android, what is going on ?

    Hello!
    Few days ago i decided to try develop adobe air for android.
    Updated my phone to android 2.2 installed Android SDK , Adobe AIR SDK.
    Now there are few tutorials out there how to set up Air ap for android.
    They all state that u have to install Runtime_Device_Froyo_***********.apk
    You can supposidly download it from adobe pre-release, i cant get in there because they don`t let new members to register ?!?!?!
    I searched the entire google for 3h in every possible way to find Adobe Air setup for android, but its like it never existed. There are few disabled rapidshare and megadownload links, it is mentioned in a lot of places but you just cant find it anywhere.
    How can i setup Adobe AIR for my Android phone ?

    Can you please give directions where can i clear that cash.
    Anyway i don`t think its the case, because this is first time i hooked phone to internet, and first time i launched Android app store.
    Edit:
    I went to https://market.android.com and there is Adobe air app. But when i try to download it says that my device doesn't support it (Samsung Galaxy GT-I5500) By default it comes with android 2.1 and doesn't support Adobe air, but i upgraded firmware to 2.2.
    Maybe that is the reason it doesn't show me Adobe AIR in app store - based on my phone, not my Android version ?

  • Can you play/view swf files on adobe air for android?

    Hi, yes; I'm new here, as well as to Adobe Air, and I'm still trying to learn the ropes around here, and I apologize in advance if this has already been asked, or I have placed this question in the wrong forum.
    The thing is, I was wondering if it was possible to play my SWF files via adobe air for android; and if so, how? Thanks in advance either way.

    Can you please give directions where can i clear that cash.
    Anyway i don`t think its the case, because this is first time i hooked phone to internet, and first time i launched Android app store.
    Edit:
    I went to https://market.android.com and there is Adobe air app. But when i try to download it says that my device doesn't support it (Samsung Galaxy GT-I5500) By default it comes with android 2.1 and doesn't support Adobe air, but i upgraded firmware to 2.2.
    Maybe that is the reason it doesn't show me Adobe AIR in app store - based on my phone, not my Android version ?

  • Why is debugging an AIR for Android on device via USB so awful?

    I've used Flash 8, Flash Pro CS4, CS5, CS5.5, and now CS6 and I have to say when it comes to debugging it is absolutely the worst environment I've ever worked in. Over the years the number of times I've successfully debugged an application can be counted on one hand. Really, its that bad. Flash will crash or stop responding. I place a breakpoint in the code and Flash will either: A) Ignore it, B) "Breakpoint not set; No executable code at line ###" C) Crash and burn. D) breakpoint turns on but can never be turned off.
    Its infuriating and maddening. After this much time why can't Adobe make the debugger work?
    Frankly, because of this I have to write ALOT of trace statements into my code.
    Has Adobe just given up on the debugger in Flash Pro? As a developer should I be trying to convince my company  to switch over to Flash Builder?
    For example, right now I'm trying to debug an AIR for Android 3.4.0.2540 via USB on a Motorola Droid 2. I can publish and run in debug mode and see all my trace statements just fine. But I know the instant I need to try to set a breakpoint I'm doomed. Or if my code gets in a race condition like right now. The breakpoints in the new code I added were ignored (see B above) and I can find no options in the Debug menu to break into my app and observe what code it is currently executing. My only option is to end the debug session.
    Can anyone comment on debugging in Flash Builder vs. Flash Pro? Is it any better?
    Can anyone suggest a solid development environement with debugging that supports Actionscript 3 or can compile it to some other language or object code that would allow me to reliably debug code?
    I'm sorry for venting like this. I like Actionscript 3 and I even like Flash Pro until it comes to debugging. But at this point I really need to consider other options so I can get some work done.

    Hi Chris,
    I also have an HTC Legend, and I'm trying to make some tutorials about publishing from Flash Builder to Android.
    I've notice this also, and I must say, it's a complete deception that AIR cannot support this phone, and certainly it seems that upgrading to the Android 2.2 was a bad option, since I defenitly was able to make a simple flash game, and some other exeperiments, and got them to work with AIR when this phone had Android 2.1
    If it runs on Android 2.1, maybe it was a an upgrade that make AIR incompatible with this device on Android 2.2. Is there any way of running it, maybe forcing to install a AIR version that works.
    I was starting to program on Flash Builder, and experimenting on my Legend, but now I stumbled on this.
    Thanks,
    Leonel

Maybe you are looking for