AppendBytes on mobile

Hi,
I'm working on a ShoutCast player in Adobe AIR. My code works very good on a Desktop machine with low CPU/ memory usage but uses a lot of CPU (18%) when run on a Android phone (HTC Desire). I discovered the bottleneck was the appendBytes api which uses almost 15% CPU. I currently can't post the code but this is how my player works:
- I connect to a ShoutCast server using Sockets (ShoutCasts servers do not always return valid HTTP responses so i can't use URLStream).
- I parse the headers and based on the content-type i use a different parser (mp3 or AAC)
- I prepare a audio only FLV header and push it into the NetStream.
- For AAC i will parse each frame and wrap it in a FLV tag. The first FLV tag will be a AudioSpecificConfig. The timestamp will be calculated based on the length of the frame.
- For MP3 the same process applies. However no AudioSpecificConfig will be made.
- When playing i will wait for the buffer to drop below 60% of the max buffer time (6 seconds) and start reading more flv tags untill the buffer is full.
These are the problems i discovered when debugging the player on my phone:
- It uses a lot of CPU when playing audio. CPU drops when i comment out the appendBytes line (to 2%, 3%).
- The audio skips when you leave the program and try to do something (like scrolling).
So my questions are:
- Am i using the appendBytes api the wrong way and if so what is the best way to use it?
- Is it possible to make the audio less choppy when leaving the program? Or does AIR not allow that?
Best regards,
Remco

Remco,
It is hard to tell without the program or source code. I would expect the cpu % go up in Android.
Is it possible for you to make a simple program that works and demostrate the problem
you describe and send the project to me? That would be the best way for us to take a look.
My email address is [email protected]
Thanks,
-ted

Similar Messages

  • Sending SMS to a mobile app from smpp server

    Hi frndz
    I have a j2me application which is listening to port number 1581
    So, any message for port number 1581 will be directed to my j2me application,
    problem is how can I send an SMS to a specific port number using SMPP server so my j2me app. receives the msg.
    I have my own SMPP server through which I am able to send simple messages
    so what modification required to send messages to a particular port
    thanks
    alpesh

    Thanks Senthil
    I tried two methods for sending msgs to a specific port from SMPP server
    (I) setting up the optional parameter (TLV values)
    The Code is:
    request.setDestAddr(ton, npi,mobile_no );
    request.setShortMessage("This msg is on port number 1581");
    request.setDestinationPort((short)0x62D); // HEX for 1581
    request.setSourcePort((short)0000);
    request.setReplaceIfPresentFlag(replaceifpresentflag);
    request.setRegisteredDelivery(registeredDelivery);
    (II) setting UDH parameter
    The Code is:
    // setting UDH parameter CODE
    ByteBuffer msgUDH=new ByteBuffer();
    msgUDH.appendByte((byte)6);
    msgUDH.appendByte((byte)5);
    msgUDH.appendByte((byte)4);
    msgUDH.appendShort((short)0x1581);
    msgUDH.appendShort((short)0x0000);
    // appending msg to the UDH header
    message="Sending Message on Specified Port";
    msgUDH.appendBuffer(new ByteBuffer(message.getBytes()));
    // submitting the msg
    request.setDestAddr(ton, npi,mobile_no );
    request.setMessagePayload(msgUDH);
    request.setProtocolId((byte)0xF5);
    request.setEsmClass((byte)(Data.SM_UDH_GSM));
    request.setReplaceIfPresentFlag(replaceifpresentflag);
    request.setRegisteredDelivery(registeredDelivery);
    I am submitting the message using any of the above method, message goes to mobile phone default Inbox, not to my J2ME app.
    any Idea, what is wrong?
    thanks
    alpesh

  • Cannot retrieve business partners in SAP mobile iPad

    Hello Colleagues,
    since some days I'm not able to retrieve business partners in my SAP mobile App.
    Neither in iPad nor in iPhone.
    I tried it on 2 different test servers.
    A couple of day's before I saw all the business partners.
    The only change I did in the last days was executing the steps regarding the Java JRE that was recommended by SAP Note 1582526.
    In the Message-Log I've found the following:
    The SQL-Exception with the ErrorCode 242 points to a conversion error from the given Date-String to a DateTime Value.
    The Date-String is automatically inserted by the (whatever) system, it is the current date.
    Is there a possibility to change the DateTime Format so the query can pass thru and I can see the business-partners?
    Thank you in advance
    Rudy.

    Problem solved
    After setting the language of the sql server "sa" from german to english, everything works fine.
    I don't know why this problem occurred. I never changed the language before...
    Cheers
    Rudy

  • I designed a site for a customer, exported HTML, customer wanted to launch the site themselves so when they did so it will not work on a mobile device or tablet but is fine on the PC browser.

    The customer is using AT&T as the host, it seems to automatically map to the a mobile site when on a phone or tablet, could the mapping to a tablet site be on AT&T's end?
    I never setup the tablet or mobile site through Muse.

    As you don't include a link or other copy of your code there is no way we can answer this… however:
    Upload a copy of the site to bc (business catalyst) from Muse or Dreamweaver (if Muse can't) as a temp web site then test that the code works for laptop and phones. If it works on your bc site then your code IS correct and you have answered the main question as yes AT&T is the issue… this is basic testing and you (seriously) already should have done it before letting your client see it.

  • Stream 8 tablet location does not work on T-mobile broadband

    On my HP Stream 8 tablet, location works fine with GPS only (GNSS on; Mobile Broadband, Wi-Fi, and Bluetooth off).
    However, if I turn on Mobile Broadband and connect to T-Mobile and turn off GNSS (or GNSS on inside where there is no GPS signal) and keep Wi-Fi and Bluetooth off, the location gives very odd results.  Last week the map showed Phoenix as my location (I am actually located in San Francisco).  This week, it gives Brentwood or Clayton, CA, both more than 30 miles away.
    HP tech support said call T-Mobile.  T-Mobile said they had occasionally seen equally odd locations.
    I went to a nearby T-Mobile store.  They had a Samsung Galaxy Tab 4 which always gave a correct location, within 100 feet using T-Mobile alone.  Manually moving the map to a different location in an attempt to confuse it and turning it on and off, it would still find the correct location.  No surprise there, my three year old Virgin Mobile LG android cell phone does just as good a job at finding locations.
    (The T-mobile store also had an iPad Mini 3 that I was able to confuse.  On T-Mobile alone and clicking on My Location in maps, it produced a grid that was blank except for a line saying that it was unable to find a location, no info or link to what to do next.  The T-Mobile store did not have a Stream 8.  The Microsoft Store has a Stream 8 but it is not connected to Mobile Broadband.)
    Does anyone else have this problem?  Is my unit defective? There  are times that a GPS signal is unavailable and a T-mobile broadband signal is available, and it seems that this unit should be able to find a location at least as well as my cell phone.
    Thanks.

    I see the same basic results, wifi=off, bluetooth=off, gnss=off, t-mobile=on. Open win8.1 map-app shows my location in LA south of the 101/110 junction. I'm in SF Bay area near San Jose about 400 miles away. Turn on wifi and map-app shows me at my real address. With t-moile only, opened win8.1 IE, went to www.bing.com/maps location also shows LA.
    My only t-mobile account is the stream8 free 200mb/month data plan, don't think they have my real address anywhere. My t-mobile "phone" number is 720 area code in the Denver area. No idea why middle of LA is the t-mobile location. Must be a "feature, not a bug".

  • My Weather Mobile

    For you weather junkies like me, this is the greatest weather app yet for the iPhone.
    Be forewarned however:
    I downloaded and installed this app last night and immediately was unable to connect (spinning wheel) to any of my mail accounts. Pandora would take forever to load and when it did it would play for 10 seconds.
    Deleted My Weather Mobile, restarted the phone and all was back to normal with both mail and Pandora.
    Other than the phone, Mail is my most important app and then Pandora.
    I will try to contact the My weather Mobile folks to see if they have any answers.
    Just FYI.
    CD3

    You're talking about two separate issues. Push notifications are available for 3rd party apps (a feature of 3.0) - IM apps, AP news, etc., make use of them. An app must be specifically written to use Apple's Push Notification servers. I don't see that My Weather Mobile supports Push notifications at all - so, if you're expecting them to, any delay is on their end, not Apple (and AT&T has nothing to do with Push notifications, other than carrying the data just like email or web browsing).
    MMS is also a feature of iPhone OS 3.0, but that one requires cell carrier support. Carriers in many countries worldwide support MMS for the iPhone, but AT&T currently does not. They have stated they will support MMS on the iPhone in "late Summer" - summer ends on September 22nd.

  • Mobile Me CONTACTS not coming down to iOS4 and lost visual voicemail

    I updated my 3GS to iOS4 and everything seems to be working, howver my contacts haen't repopulated the phone form Mobile Me. they are all still there on Mobile Me, but when I go to contacts on the iPhone, there are none and unlike previously, opening contacts on the phone does not force a sync (no spinning clock-wheel)...
    I have tried turning off the Mobile Me setting on the iphone and then restarting it, but still no contacts...
    I also lost my visual voicemail.... when I go to voicemail, it wants me to physically dial up voicemail...
    Any ideas here?

    dmbono wrote:
    Try turning off push and instead fetch every 15 minutes. There seems to be a bug that prevents data from getting through on push. Hope they remedy this soon!
    Huh? A "bug" would affect all devices using the OS. I have no idea what you are talking about as push worked just fine here after allowing a little time for my phone to be re-provisioned by the network. That took longer than normal due, I'm sure, to the large number of folks trying to do the same thing I was. And we've all hear AT&T whine that we evil iPhone users are breaking their network.

  • Responsive Mobile Menus: Open and close on browser, but not in mobile?

    I have two responsive jquery menus I am working with. In the desktop browser they both look and operate fine (full screen and mobile size), but when that same responsive page with menu is viewed on an actual phone (Android and iphone), the menus both: SHOW FULLY OPENED WITH ALL PARENT AND CHILDREN?
    I believe I installed everyting properly (especially since it resizes and works perfect in a normal desk browser) -Dropsdown and Contracts back.
    Does anyone have any experience with this issue (Responsive menus works fine in a desktop browser, but shows completely opened, and will not drop or contract when viewed on an actual mobile phone, like Android or iphone?), and if so any guidance?
    Thanks very much

    Wow, you save me alot of time and headaches. You really know alot and are very helpful and taught me alot. Thank you for helping me, this is my first site I am still trying to build/get up, after years of on-off trying / learning/ abandoning (for other pursuits). This site is really important for me, and would mean alot for me to finally follow through on building.
    Do you know if this forums allows (or do you ever) add friends/contacts so you can message each other? I am somewhat a 'newbie', so I understand if problem, I would not bug/bother you, just curious and fully understand if not. (or do you ever contact via email, website, or other)?
    Also re: Vanilla Testing: I always test all my stuff on a blank HTML page with only the Boilerplate and JS that Dreamweaver provides. I don't know if I have the capability to fully do in something like notepad? Will this method (Boiler, JS, and blank HTML) suffice--No other Scripts--Not even my stylesheet?
    What do you think about this menu. Features seem good, has the most sales, good developer and support?
    http://themes.pixelworkshop.fr/?theme=MegaMenuCompleteSet

  • BIP Report in Siebel mobile is not working in languages other than English

    Hi,
    We have upgraded our Siebel from 7.8 to Siebel 8.1 and in that we have moved from Actuate to BIP Reports. We have created a customized report in which we have put in the Filters on '.rtf' file to show a particular set of data. This report is deployed for 3 languages : English (ENU), Portuguese (PTB) and Spanish (ESN).After deploying this report, on Web application, it is working fine for all the languages but we are facing an issue on mobile client, the report is only working fine in ENU but for other languages(PTB & ESN) it is failing (means the filter which we put on '.rtf' is not working on other languages).
    Is anybody face this issue and what will be the solution for this?

    Hi
    I think you need to first translate the smartform into other languages. Before translation, it wont work.
    Steps for translation:
    1. goto Transaction SE63
    2. in R3 Enterprise select form menu
    Translation - ABAP Objects - Other long texts
    3. select FS - SSF-Smart Form
    4. Object Name: choose your smart form
    5. select target language
    6. press edit
    Regards,
    Vishwa.

  • Print Message Report from Mobile

    Hello...
    We need modify standard mobile infrastructure java code...
    We need print some report from Mobile Front-end.
    Is possible to print all MESSAGE data that we can see from front-end of mobile infrastructure 2.5 ???
    thank you very much
    Stefano

    I haven't really done much enhancements on MAM 2.5, but Im sure sami will let you know where to add the code, or you can review the MAM enhancement guide on the CD.
    In regards to printing the PIOS API is pretty simple. If you are using a laptop to print to a normal printer then you can just use the Win32 Drivers..(installed via driver addon from web sap console.)If you are using the handheld you will need to find the appropriate drivers.
    Here is some code I used in one of my applications:
                   <i>Connector conn = Connector.getInstance();
                   DriverInfo[] driverInfo = conn.listDrivers(ConnectionType.PRINTER);
                   PrinterParameters params = new PrinterParameters(driverInfo[0]);
                   params.setPrinterMode(PrinterParameters.GRAPHIC_MODE);
                   GraphicPrinter gp = (GraphicPrinter) conn.open(params);
                   File myImage = new File("c:
    smalllogo.bmp");
                   if (myImage.exists()) {
                        float x = 0;
                        float y = 50;
                        try {
                             String[] sFonts =
                                  gp.getFontConfigurationManager().listFontNames();
                             PrinterFont pf = gp.getFont(sFonts[0]);
                             gp.drawText(
                                  pf,
                                  25,
                                  25,
                                  "TO For Delivery # = "
                                       + dbAccess.getItemFieldValue(arrayItems[0], "VBELN"),
                                  GraphicPrinter.NO_ROTATION);
                             for (i = 0; i < arrayItems.length; i++) {
                                  gp.drawText(
                                       pf,
                                       25,
                                       y,
                                       "Delivery Item # = "
                                            + dbAccess.getItemFieldValue(
                                                 arrayItems<i>,
                                                 "POSNR"),
                                       GraphicPrinter.NO_ROTATION);
                                  y = y + 10;
                                  gp.drawText(
                                       pf,
                                       25,
                                       y,
                                       "Material # = "
                                            + dbAccess.getItemFieldValue(
                                                 arrayItems<i>,
                                                 "MATNR"),
                                       GraphicPrinter.NO_ROTATION);
                                  y = y + 10;
                                  gp.drawText(
                                       pf,
                                       25,
                                       y,
                                       "Quantity to Pick = "
                                            + dbAccess.getItemFieldValue(
                                                 arrayItems<i>,
                                                 "LFIMG"),
                                       GraphicPrinter.NO_ROTATION);
                                  y = y + 25;
                   gp.doPrint(1);
                   gp.close();
              } catch (Throwable tFile) {
                   tFile.printStackTrace();
              }<i>
    This should give you an idea, you should also read through the MDK documentation for the printer API (PIOS). Its quite easy to pick up and as long as you have the driver and connector installed it prints right away.(You could also use the Peripheral emulator in
    NWDS to test the code first)
    Hope this helps,
    Wael..
    Dont forget the rewards
    Message was edited by: wael aoudi

  • Print a report from SAP Mobile

    Hi,
        I want to print a report (not a screen shot) from iPad (SAP Mobile/SAP BI), but there is no option there for printing.  I don't think this feature is available in the current SAP Mobile (6.1.11).  Can anyone have a way to work around it?  Can SAP add this feature as an enhancement in the future releases?
        Thanks.
                    James

    Hi,
    The feature is not available in Mobile BI App. You can search an existing idea and vote up or post a fresh at IDEA Place SAP BusinessObjects Mobile: Ideas.
    Would be helpful if you provide the following details
    - What is the business use case
    - How many users would be using this feature
    - What content types you are expecting to print
    - How should the printed report look like - mobile view, web view, pdf view
    - Primary used device - IOS/Android
    Regards,
    Ashutosh

  • How to move Mobile Applications folder while sharing an Itunes library

    For reasons that would be long and hard to explain, I decided some times ago to open a second user on my Book Pro dedicated to my music collection. The collection required to be stored on an external HDD, so the second user's Itunes folder links to a folder where all music is stored, and I put it with all library files (xml etc) in the Shared folder. Now I have decided to let the primary and mostly used user to share the same music of the secondary one. I easily succeeded in doing this, just simply opening the primary ITunes and ask it to link to the Itunes folder under the Shared folder. I have got my entire library also from the primary user, with covers and so on.
    The trouble is that I use to manage an Iphone with the primary ITunes, and since I have not moved the Mobile Application folder (and what more?) into the shared ITunes folder, I cannot see anymore all data and applications into my IPhone section under ITunes, and I do not want to run experiments, doing a sync and just running the risk to lose all. How can I share the same ITunes library between two users, but to allow one of those still to see the IPhone data that was originally managed only from her ITunes, that now addresses to the ITunes folder under Shared folder that addresses to a HDD?.....

    Still misspeaking. Further use reveals that while the users iTunes use the shared file, when the phones add new apps their iTunes recreates its iTunes Media directory in the users home folder. This time I can exit iTunes, move the apps to the shared Mobile Applications, delete and empty trash the original apps/ and folder, then the users iTunes will find the app in the shared folder when it restarts. Clearly not very tidy...

  • IMessage on MacBook Pro - how to use mobile number?

    So I upgraded to 10.8.2 on ML and IOS 6 on other devices. I notice on the iPhone that my iMessages can be received by default only to the mobile number.
    I previously turned iMessage off because frankly it was a complete PITA and more trouble than it was worth.  The mess created for recipients with messages coming from apple IDs when sent from the iPad and from a mobile number on the phone, then messages sent from one not showing on the other, replies not going from one device becase there was no internet available but the message had come to the apple ID and not the phone number etc etc.  The woes went on.  iMessage thus went off.
    Now, the ability to use the phone number as the default across decvices did sound appealing and I THOUGHT that when I activated imessage on the Mac and iPad it would automatically show up with the option to use the mobile number on those devices.  Instead I just get the email option and can see phone number at all.
    Am I correct in assuming that I need to add the Apple ID so messages can be sent there BUT configure it somehow so that iMessages going out from those devices are sent as coming from my mobile and not an email address?  last thing I want is the dog's breakfast that the last incarnation of iMessage brought and I would hope this time around that "It just works".  I'm gettng more and more used to having to probe around with Apple though, to find ways to make it work.

    Finally got this to work, coincidence or not i'm not sure, maybe the system was just catching up.  On the iPhone I ONLY had the telephone number enabled.  I then added the Apple ID and all the test messages arrived, as did the mobile number verify message.  I then went and turned the Apple ID email off as a 'receive at' source.  After that the mobile number was verified on the Macbook and was available to add as an iPad 'email address'.

  • I have two apple ids somehow, probably from two mobile and two computers - how do I merge them into one account so they all work with iCloud?

    Somewhere, somehow, between two mobile and two macs, I ended up with two apple ids. I figured that this was the root of my problem to syncing. So, I am syncing Mail, Contacts, etc through the one account that I bought storage on this year in iCloud. I want to merge the two accounts, since many of my apps were purchased with my other id. Apparently, Keynote will not merge files since the app was bought with the second id, not the id I am using for icloud.
    What to do??? I read, in the forums, that I am definitely not alone. I always had the id I used for the Apple Store to buy iTunes items, and then apps. The other id, that I am using for iCloud was based on my iDisk id, and apparently I set up as a separate account. The much failed iDisk account appears to be the one that I wish I never got involved with. Should I feel the same way about iCloud. If I cannot merge the two APPLE accounts from the same person (ME!!!), then many dropbox really is the answer for my file sharing needs.
    Please help me decide.

    To begin with, I would like to try to explain Apple's confusing nomenclature in regard to iCloud.
    Apple have called the whole cloud thing iCloud, there are a number of features under the iCloud umbrella, some of which require their own login. iTunes is one of these, another is what Apple have unfortunately also called iCloud too.
    You can use the same Apple ID (account) to login to both iCloud and iTunes, but you don't need to and often users will login to each service using a different ID.
    The part that you need to remember is that the services available when you log into iCloud are completely different and unrelated to those when you log in to iTunes. Your iCloud login enables mail, contacts, calendars, find my phone, Back to My Mac, Documents & Data sharing and photostream, it does not affect any of your iTunes services.
    To avoid confusion when discussing your problem, when I mention iCloud, I am referring to the services under the iCloud login, Whereas I will refer to the whole cloud thing as The Cloud.
    To go back to your question; you cannot merge accounts, but perhaps using one account for iCloud and the other for iTunes will resolve the majority of the reasons you needed to merge to begin with.

  • HT204053 I have one apple ID for purchases and then my mobile me ID where I use for email.  So I have set my cloud with my mobile me name, while keeping my purchases the original name.  Will my purchases be recognized as purchases when backup is finished.

    I have one apple ID for purchases and then my mobile me ID where I use for email.  So I have set my cloud with my mobile me name, while keeping my purchases the original name.  Will my purchases be recognized as purchases when backup is finished.

    Welcome to the Apple community.
    So long as you are logged into the iTunes Store, using the correct ID and password (settings >store), then you will always have access to your apps, books, music, TV shows etc etc bought via the iTunes Store on that account.

Maybe you are looking for

  • Save as PDF not working

    I used to to save all my emails or anything else to a "save as PDF" or "export to PDF" and now its not working it tells me the the file name is too long, over 31 characters not supported (all my other files are longer before) then I make it shorter,

  • Press enter to continue...

    hi all, in my server /client model the clients log on and register ina vector class..since im working on distributed computing, time is important. so in my simulation, i wait for all the clients to log on and after i press enter, the server sends out

  • Tv to pc connection

    hi, when i tried to connect my dv 6733tx laptop to my sharp aquos tv with hdmi cable the computer crash dumps on startup. any solutions to this. patane 1

  • 2 Errors

    I have two problems that have come on suddenly: 1. When I hit shift-Enter for a line break, instead <!-- MENU-LOCATION=NONE --> is inserted. 2. When I try to save a file, the following error messages come up tice each: While executing onLoad in Date_

  • Enhancement spot PT_ABS_REQ - BADi not being called

    Hi, I wondered if anyone can help. I need to change colours in the team calendar viewable in MSS. In SPRO under Personnel Management>employee self service>service specific settings>working time>team calendar>BADi.controlprocessing of leave requests -