Custom URL parameters for the beats music App - beatsmusic

The beats music App on iOS seems to support the url beatsmusic:// . I am trying to find if the App supports parameters to the URL (say track ID or playlist etc.). I tried the beats developer documentation but could not find any references to their URL scheme. Does anyone know if the App supports URL parameters and what they are?
I have already tried http://handleopenurl.com and http://wiki.akosma.com/IPhone_URL_Schemes
Update:
I was able to infer some URL parameters by looking at the "Share page" that gets generated when sharing music on beats.
Example: beatsmusic://listen/sentence/54/112/264/3
beatsmusic://listen/albums/al577721/tracks/tr580733

We do support beatsmusic:// as a protocol on mobile platforms. In general the path match the ones you'll see from the on server, like:
http://on.beatsmusic.com/users/193
http://on.beatsmusic.com/artists/ar170
is equivalent to:
beatsmusic://beatsmusic.com/users/193
beatsmusic://beatsmusic.com/artists/ar170
That same pattern works to albums, artists, playlists, users, genres, and curators.
For tracks we emulate the listen server (which shares paths with the on server):
https://listen.beatsmusic.com/albums/al6910269/tracks/tr6910289
is equivalent to
beatsmusic://beatsmusic.com/albums/al6910269/tracks/tr6910289
The sentence is a bit different, but follows the pattern
beatsmusic://beatsmusic.com/sentence/place/activity/people/genre

Related

Flex mobile project for IOS, server side proxy

I am trying to write an iphone app that loads a video from an inbuilt web server running off a camera (connect to iphone via wifi).
I am using flash builder / flex mobile project - not particularly familiar but finding it easier to understand than xcode !!
The files from the camera have the wrong file extension so will not play on the ios video app, can I set up a server side proxy in flex mobile and use this to alter the file extension and then pass this link to the ios video app ?
If so any help anybody could give me ( examples etc) would be really grateful received , I have been trying to get round this problem for a couple of weeks .
Cheers
Toby
I can explain, conceptually, what a server side proxy would do in this case. Let's say you are retrieving a URL, like this:
http://myserver.com/somethingSomething/DarkSide/
to retrieve a video stream from the server. You say it won't be played because there is no file extension; so you have to, in essence, use a different URL with the extension. Set up 'search engine friendly' URLs on the server. And do something like this:
http://myserver.com/myProxy.cfm/streamURL/somethingSomething%5CDarkSide/Name/myProxyVid.mp4
Here is some information on how to deal with Search Engine Friendly URLs in ColdFusion. Here is some information on how to deal with Search Engine Friendly URls in PHP. I'm sure Other technologies will come up in a Google Search.
In the URL above; this is what you have:
http://myserver.com/: This is your server
myProxy.cfm: This is your server side file; that is a proxy
streamURL/somethingSomething%5CDarkSide/Name/myProxyVid.mp4: This is the query string. It consists of two name value pairs. The first is the streamURL. This is the URL you want to retrieve with your proxy. The second is just random; but as long as it ends with the file extension .mp4 the URL should be seen as an 'mp4 file'
The code behind your myProxy.cfm should be something like this, in psuedo-code:
Parse URL Query String
Retrieve Stream.
Set mimeType on return value.
Return stream data
I used a similar approach on TheFlexShow.com to track the number of people who watch our screencast on-line vs downloading it first. I also used the same approach to keep track of impressions of advertiser's banner ads. For example, the browser can't tell that this is not a JPG image:
http://www.theflexshow.com/blog/mediaDisplay.cfm?mediaid=51
Based on this, and one of your previous questions; I am not convinced this is the best solution, though. I make a lot of assumptions here. I assume that the problem with playing the file does relate to the extension and not the file data. I assume that you are not actually streaming video with an open connection on both client and server to send data back and forth.

How to locate any mobile number using iPhone application

I want to make an application on iPhone which locates the mobile number region(area) when the user gets a call. Can anybody give me guideline how to accomplish that task?
You can't access the details of an incoming call on the iPhone.
Crazy idea: User would define a phone number of your server (SIP, VOIP) as "forward when declined"-number. When the user gets a call, he would simply decline it, so it would be forwarded to your server. There you could extract the information and send it to the iPhone (Push Service). And finally you would redirect the call back from the server to the user's iPhone.
For anyone looking for an answer to the second part of this question (how to get the location for a number), there is a similar question (asked interestingly enough one day before this one) with several answers here:
Telephone area code to city name on iOS
I also discovered an SQLite database named calldata.db in the private framework AppSupport.framework that contains US cities, states and area codes, as well as prefixes (the three digits that come after the area code).
Using a query like this you could find out that area code 212 is New York, NY:
SELECT * FROM citycode, npanxx, npa
WHERE npanxx.npa = 212
AND citycode.code = npanxx.rate_center
AND npanxx.npa = npa.npa
I don't however know if accessing/packaging this database would violate any agreements with Apple (I do know that the Default.phoneformat file from AppSupport.framework has been packed with several apps which had no problems getting into the App Store, see comments here: https://stackoverflow.com/a/13116227/381233). Perhaps there are some methods in the AppSupport.framework that would get this information more easily, but that would definitely not be allowed in the app store.
As for the other part of this question (access the details of an incoming call), this would most likely be possible on a jailbroken phone. No doubt there's already a tweak in Cydia that does this.

In-App Notifications?

I'm trying to create functionality in my app that would allow me to release news updates (Via a server) to those using the app, similar to what is found in Doodle Jump:
http://farm8.staticflickr.com/7143/6463110847_d485681dac.jpg
Any sample code or ideas would be helpful.
You'll probably need to create an API/web service that your app calls on launch (or when entering foreground)...you could populate that with a database that just gives the entries since the last sync...or just returns some response that you've set up. The response should be JSON or XML formatted (I vote JSON) and then in your app, you call it, parse the response, and place/manipulate it however necessary
http://mobileorchard.com/tutorial-json-over-http-on-the-iphone/
There are a lot of options here. In any case you will need a web server that hosts these news postings. The route that I would take is some kind of blog site, where you can easily manage posts. Then upon launching the app you make a web service call to said blog and get the news posts. You will need to keep track locally of which posts were read by the user in order to keep the badge count correct.
You could also roll your own server, but I don't really see the point for something so simple.
Another option is a web-service such as Parse
This question is too vague for code samples as we would be essentially writing the entire solution for you in order for it to make sense.
If you have further questions into how to leverage these web services, how to load the feed, how to display it etc... Break it up across multiple questions.
There's a service doing this called Converser, if you're still looking.

Open pdf/doc/xls in other iphone app with modification acknowledgment

I know how to implement inter-app communication. I did it with some examples.
Now I need to send/share a doc/xls file with other application in my iPad/iPhone that have url schemes to open in such files.
Questions
How Can I find the list of application that has url schemes to open such files.
How can I limit the open-in in some specified application with in the above list.
Important
How can I prevent the shared document from further sharing (such as email/print).
And if the shared file is modified by that application how can I know it.
How can I get back the shared file after modification.
While sharing is there is any option to make it as read-only,read-write privilege.
In general, it is impossible to prevent a document from being shared. You can only make it more frustrating.
Everything else depends on the URL scheme you are using. For example, if it is the file:// scheme then access is controlled by the OS and filesystem. If it is the http:// scheme then access is controlled by the HTTP server, etc.

How to get the language-setting of an iPhone OS device visiting a web page?

I'm trying to create a web-page intended to be viewed by an iPhone OS device. Is there a way to retrieve the current language or some locale-specific data when a user visits on an iPhone OS device? I want to set the web-page language according to the local or language of the device. So, how can I get the language-setting of an iPhone OS device visiting my web page?
Try using the "Accept-Language" header sent by the browser to the server. It should be something like "en-us" or "fr-fr", etc. depending on the language setting for the device.
iPhone indeed sends reasonably correct Accept-Language as seen from this email.
(However, it's strange for me that it sends only fr-fr. It appears more reasonable to send fr-fr, en-us;q=0.9 and they might change into that in the future)
But the more important information for you is that you don't really need to do anything complicated in your situation. This is called content negotiation and is standard feature of Apache and other servers -- they will automatically return page in the language user prefers with minimum configuration.
You do need to create different pages at different URIs for different languages. If you don't, you're breaking the idea that any content has an URI that can be easily passed to another person and that second person will see exactly the same content even if his/her language is different.
How Apache does it. You create
example.fr.html
example.en.html
example.de.html
(and edit .htaccess file). Then /example returns page in user's language while /example.fr always returns French. As an added bonus, you don't need .html.