I want to build an alarm application for iphone. I want to ignore iphone device state and volume buttons state. I want to play sound anyhow in full volume and also want that user cant modify volume using iphone hardware buttons while sound is played. Does anybody know how to implement it? Please post the code here.......
Thankx in Advance.......
This is not possible (without jailbreaking).
You cannot force the iPhone to change its volume or intercept the hardware buttons. Also you cannot "ignore device state", as you cannot run background apps. So if your app is not running you can't execute any code
Related
When I use the build button in xcode to run my cordova app on the phone, if the build process take too long I get a "Device locked" error.
Is there a way or any hack I can do to keep my iphone unlocked when it's building? Is there a way to tell xcode to keep my phone unlocked?
The easiest fix for this is to disable sleep mode (for up until ~1hr) for your phone. Then you won't have to worry about it locking.
Open the Settings app.
Tap Display & Brightness.
Tap Auto-Lock.
If this option is grayed out, visit this Lock screen settings tip to
learn what to do. Set the lock feature to a time that works for you.
To fiddle with the phone's auto lock duration whenever you're working, and then changing it back to normal is not ideal for me since I use my primary phone for testing apps too. My workaround was to run a youtube video on silent and let iOS switch it to my testing app whenever the build is ready!
I want to display emergency contact on lock screen of iPhone.
I've found one link to an app Launch emergency App/Do emergency call without screen-unlocking the iPhone but it is saying that apple will not approve this,
I saw some other applications on the AppStore:
https://itunes.apple.com/US/app/id317958642?mt=8&ign-mpt=uo%3D4
https://itunes.apple.com/us/app/ice-in-case-of-emergency/id380234187?mt=8
Can any body tell me how to do this?
Easy, the ones in the app store create an image with the emergency numbers on them.
Then the user can set this image as there lockscreen. I've create an app like this.
But there is no way to make a swipe/click call the number from the lock screen.
It is impossible to set the Lock Screen wallpaper programmatically without jailbreak.
However, you can change the lock screen appearance by playing a sound track with customized album cover, which is the emergency image.
See MPNowPlayingInfoCenter for more information.
Note that this approach may burn a lot of battery, and user cannot enjoy other music while using your app.
Use " Emergency info screen" iPhone app. It's awesome and simple to use.
I've been using the emergency info screen app and its simple and flexible to my needs.
https://itunes.apple.com/au/app/emergency-info-screen/id657684240?mt=8
With iOS 8 and later you can use the Health.app to define your medical ID and store emergency contact details with it. Then, from the Health.app, you can tell iOS to display this information from the emergency lock screen.
See here for a step by step guide.
I an interested in making animated wallpaper apps for the iPhone. This means that, once I click the app to open, it should not open up a view, and it should change the current wallpaper of the iPhone to the an animated wallpaper(which I have designed), while the App is running.
If I close the app, it should bring the iPhone back to the initial wallpaper.
How do I go about this ?
How can I modify changes to the wallpaper of the iPhone with my app.
How can I place my customized wallpaper in a way that the iPhone operates normally and you can scroll to other apps and stuff while the background wallpaper is animated ?
What tools are needed for that animation ?
If I understand you correctly, you want to create an application that swaps out the background wallpaper.
This can only be a jail broken app.
We do not have access to the springboard wallpaper on a normal device with the SDK. So this type of app can only be a jail broken app an a jail broken device and in a jail broken marketplace.
The methods you should implement are pretty simple. Would probably be an NSTimer that chooses randomly from an array of image names and sets the background wallpaper.
I do not know the immediate functions to use, and they are probably undocumented.
Background process app that is always running (like Mail).
In the function the timer calls, just make a UIView animation block that shifts the previous image where ever you want and shifts the new one into the view.
What I would suggest is get the functionality you want running in a project. Once that is all done, look into making it a jail broken app and running in the background (this is probably going to be the bulk of the work, and really really hard)
Currently you can not change a users wallpaper programatically, file a feature request with apple like many of us have :)...However you can do it on jailbroken phones...
When this app (douban.fm) is running, the default volume bar could control it playing/next instead of the iPod app. and there's a play icon in the status bar. and I believe the headset control could control the app as well.
I'm developing a similar music app and wondering how to accomplish this functionality that when my app is running, users could use the control bar or headset control to play/next?
the play icon in status bar (near the battery icon)
https://picasaweb.google.com/nicoster/201134?feat=directlink#5580079059148648786
system music control now controls douban.fm
https://picasaweb.google.com/nicoster/201134?feat=directlink#5580079159380140162
see this question. I think it'll help :)
How to enable iPod controls in the background to control non-iPod music in iOS 4?
i'm using the code of this link: http://blog.stormyprods.com/2008/09/proper-usage-of-mpvolumeview-class.html
it is working on an ipod touch, but NOT on iphones.
what can be the reason for that?
Two things:
I think iPhone OS 3.0 does a better job of syncing the MPVolumeView slider with changes to the system volume received from the buttons on side. So the workaround on that blog (listening for NSNotifications) may no longer be necessary.
On the iPhone, volume changes are contextual. If your app is currently playing sound, then hitting the volume buttons (or, presumably, MPVolumeView) affects the volume level of your app's audio. But if your app isn't producing sound, then you are just changing the ringer volume. This might explain why your current code works on touches, which don't have ringers.