Is it possible to write an application that plays music in the background on iOS using Adobe Packager for iPhone? - iphone

I would like my application to be able to remain running while the user goes and uses another application. (It will be playing music) Additionally, does anyone know about how to communicate w/ Cocoa Touch from this environment?
If you think this is not possible, which platforms are capable of this (other than the obj-c mac x-code route, which I am trying to avoid)?
Edit:
After a week, no answers at all. Very disappointing. I don't normally ask questions - this is my first! Isn't there anyone from Adobe here?

Having seen a project that I wrote being ported by someone else to work on iOS, using the iOS packager, I can say that it's totally possible that sounds playing in the AIR app can play even after you "close" the application whether you intend them to or not (continued playing in this case was not the desired situation). As long as the application exists somewhere, playing sounds appear not to stop without an explicit command otherwise.

Related

Headphone jack changes and pauses songs

I shake my iphone headphone jack and it changes the song on my nano iPod 7th gen and I move it in circles and it also changes the song or pauses it I take out lint get still does it I don't understand is it programmed to act this way I use any other headphones doesnt act the same way I've already used two iPhone head phones still does it if the headphones aren't Apple related it won't do it
Are your headphones the kind with a build in mic/controller? I had a similar issue happen to me with my iPhone recently - it was to do with a poor connection or fraying within the headphones themselves. After trying a new set, the problem stopped. If as you say it only happens with one set of headphones - the issue is likely the headphones, rather than the iPod/iPhone.
Check also that the headphones you have are designed for use with Apple devices - it seems a bit much, but recently with more functionality being allowed via a simple interface, different manufacturers (ie: Samsung/Apple) have different standards for how they treat different events from this controller.
Finally - note that this is a community site for developers - aspiring and professional alike (I fall into the former at the moment!). your question perhaps may be better suited to the Apple website forums, rather than here. Hope this helps all the same.

How to mute iPhone running iOS 5

I know this question is already asked quite some time. And I read all the topics at stackoverflow.
But there isn't a satisfying answer to my problem.
I'd like to mute my iPhone running iOS 5 programmatically. Many would say it isn't possible with public frameworks. I'm aware of that. The App I'm planning to code is for personal use only. I do not intend to sell it over the AppStore (yet?).
My research brought me to the conclusion, that there my be several ways to achieve muting an iPhone programmatically.
Use private frameworks
Hook functions or methods which are playing sounds
Replace default sounds (like ringtone, MailSent, iMessage, usw...)
Some thoughts to the above mentioned methods:
I class-dumped all headers of the private frameworks (in my Xcode-Installation) and didn't find functions which indicate (by their function name) to the wanted behavior
I think it's possible, but I do not know the functions to be hooked. Therefore, it would be quite some effort for to make this work (and I think I do not want to do this)
Giving it a second thought, this might not be a good solution. Maybe you can change the sounds. But then the phone isn't mute at all (games, YouTube,...)
I had given AVSystemController a chance using the methods changeActiveCategoryVolumeBy and setVolumeTo but those won't mute my phone but set the minimal volume of the ringer to 0.06 (or something).
There has to be a way to completely mute the iPhone, RingToggle (jailbroken app) is doing it quite good.
Does anyone has a idea how to do it?
I don't think you'll be able to mute the phone from a sandboxed app, even using private frameworks.
What RingToggle probably does is hook into the springboard and use springboard's methods to mute the phone; they are probably using a MobileSubstrate extension.

Find focus in OS X

Is it possible to create an app for the mac (and iphone afterwards) that does something when it detects that the focus is on a certain object in the screen?
Meaning, the program runs in the background, and when it detects that the focus (or cursor) is on an edit box, it will run something.
Hopefully I made myself clear!
Thanks!
You can do this on the mac by using the Accessibility Framework.
Note that users will have to manually enable assistive devices and you will not be able to distribute your app on the Mac App Store due to Apple's soon-to-be-implemented sandboxing restriction.
On iOS, you can detect focus to certain but not all elements using specialized delegate methods such as textViewDidBeginEditing:. That said, as users use taps to navigate iOS apps most of the time, simple tap handling seems like a much better approach.
On the iPhone, you can only detect focus within your own app, there's no way to observe other apps from the background.
On the Mac, as 0x90 noted, the closest you'll get are the Accessibility APIs. The UIElementInspector sample code may help you to get started.

Create voice recognition app

I need to develop an App witch detects voice when it´s running (not what are they saying, just if someone speaks) and if so, I need to launch an especific mp3 from my sd.
I never developed for android/iphone but I need to especify my boss in how many hours it could be done.
Is there any easy way for voice recognition? and... I think that the answear could be yes but, is ther a way to listen a specified mp3 from my code?
(no plataform specified yet, it could be android or iphone)
Thanks very much in advance
Try looking at this question. It might help a bit. if you got back something valid from the google servers, then you could cause it play an MP3, I suppose.
EDIT: Also, it's important to remember that android phones don't do the "voice recognizing" themselves. The sound is streamed to Google servers (like a phone call) and the servers "recognize" what you're saying, and send that back to the phone.

Is it possible to run Safari in the background on the iPhone and monitor a user's location?

Is it possible to run Safari in the background on the iPhone?
Specifically, our client would like to monitor a user's location via HTML5 GPS capabilities and measure the speed of movement.
The reason for avoiding native implementation in iOS is because the client wishes to create a cross-platform service using HTML5.
Is this possible?
I don't believe Safari continues to execute when it's backgrounded. (This is supported by a recent thread on the Apple discussion board.)
That said, it would be fairly trivial to do this in a proper iOS application, although you'd obviously need existing knowledge of Objective-C, some of the main Cocoa/UIKit classes, the Xcode environment, etc.)