(iOS) Is there a way for an app to open the iTunes music player app (preferably going straight to the Now Playing screen)? - iphone

I would like to be able to launch the iTunes app from my app when I tap a button (note that I mean the actual music player, NOT the iTunes Store or App Store). Preferably I'd like it to go straight to the Now Playing screen. Is there any way to accomplish this?

Yes, it is possible to open the iTunes music player to the "now playing" screen using the music:// URL scheme. Found this out rather incidentally while reading this post on how to quickly launch apps using Siri.
Also, here are a few sites that you might find handy if you ever need to answer the question "Can I open Application X with a url?"
handleOpenURL - a searchable database of iOS apps that accept URLs (and the URL schemes they take). You can submit your apps here.
Adrian Kosmaczewski's Wiki lists quite a few iOS app url schemes as well.
app lookup blog has more.

Related

Do i need to write extra code for newly added youtube video in iphone?

I am new in iPhone development. I want to create an app which will show youtube videos those i will upload in my account.
I will have admin panel in my app, from where i could control my videos. Suppose i developed the app and launched on app world.
Now after some time I want to add new videos to my account , should i need to write extra code or it will reflect automatically via used link in iphone app?
Speaking generally, you could have the application find your newest videos released in Youtube and display them in the app. Therefore, you would not need to have any more code.
There would be no code for any video within your app. Instead, have your app get the list of the videos from Youtube and play them.

Creating links on a web page that tell a mobile device to play the media such as mp4 rather than download it. (android / iphone)

Is there a way to specifically format a link on my page to tell a mobile device such as an Android phone or an iPhone that when a user clicks a link to a mp4 file (for example) to go ahead and play it (or ask the user if they want to play it) using their phone media player?
I'm working on a web app with mixed results, most of the times the device just goes straight into download mode, and attempts to save the file to the downloads folder, but what I would like is to make it so the device starts automatically playing the file as soon as possible.
My app is basically a file sharing app that creates qr codes and thus allows you to share media to mobile devices... the thing is, when it comes to video files and maybe images, I want the phone to automatically display the media and not just download it.
Any help would be greatly appreciated. You can see the app here http://scan2see.me
You could always use a <video> tag to make your videos play instead of just linking to them.
FYI iOS devices never download anything, unless jailbroken and with Safari Download Manager plugin (or other one like it) installed. So even if you just link, it will always play. And the reason why all videos play at full screen is because the iOS instantiate Quicktime to play it.

Can you open apps within other apps, with no URL scheme?

Is it possible to open another app, like Camera, from a third-party app? I know there are URL schemes - http://wiki.akosma.com/IPhone_URL_Schemes - but I just want to open an app, not send any data to the app.
Unfortunately, no. Launch Services is private API on the iPhone. You application can launch another app only through trying to open a URL registered by that app or a file document the app understands. However, as far as I know, your app has no control over or knowledge about which app exactly will handle the URL or the file.
One way to fire up the camera from within your app, of course, is the UIImagePickerController class.
http://developer.apple.com/iphone/library/documentation/uikit/reference/UIImagePickerController_Class/UIImagePickerController/UIImagePickerController.html
It's not quite what you're asking, but it might be as close as you're going to get.

Launching a native application from a link of website on iPhone

I have a query regarding launching a native application from a link of website on iPhone.
I will explain.
Generally a web based application is used to work online without using any feature of iPhone device (such as GPS, Camera, Accelerometer etc.)
I have a iPhone specific website which performs many tasks online.
Now while keeping all the functionality same, I want to add a feature of taking a picture from iPhone in-built camera.
i.e. when user clicks a button on website "Take Picture", my native application should be launched, which will take a picture and do specific tasks..
How to capture a event of button click which is performed on website?
Should I use UIWebView or Safari?
I know that using URL Scheme we can launch Safari from native application.
But how to achieve the opposite as explained above?
All other functionality works great on website, so I don't want to convert the whole website into native application.
(Otherwise I will have to deal with web services). Only this functionality needs to be added.
Register a URL Handler, then have a link on your site to myapphandle://some.parameters.here/
A la: http://iosdevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html

Add media from iphone (outside of iPod library) into iTunes

Is there a way for my iPhone app to add media (mp3s) not in its iPod library to iTunes once the user plugs/syncs to a desktop such that the media will get sync'd back into the iPhone's iPod library?
I know the question is rather general, but if it is indeed possible, can anyone nudge me in the right direction?
Who wants to write a sync app for mac and windows? Try serving a bonjour discoverable upload page from the iPhone. I got cocoahttpserver up and running in a few minutes.
No, it's not possible to do this using anything provided by the iPhone SDK. The only way to do something similar would be to store the media in your iPhone application's local storage, write an OS X application that discovered your iPhone via Bonjour, synced the content via WIFI, and then added it to iTunes.
Take a look at "Things" (an iPhone todo list application) if you'd like to see an example with sync-to-desktop functionality.
there is a way, i've done it through an app and it wasn't complicated. sadly I forgot and am currently looking for where I found the answer and thats how I stumbled upon this.