Task: To create interfaces for an Android Video Player
Background: We have created an Android Player whose code is based on the Open Source MPlayer. The code is naturally in C++. We have made a significant change to the way files are opened in this Player. The Player reads an “.L3” file in a certain way and also reads a “key file” containing decryption keys. If the decryption keys are not present, the file will not play. If the keys are present, the stream from the file is decrypted and piped into the player as normal (as if a regular video file had been opened).
What is needed: We need to complete the following interfaces immediately.
Instead of reading the key file to get the decryption keys, the software needs to contact a WebService which will return the key as a string. This string must be parsed according to a simple rule, and then passed on to the appropriate class as is being done now. In other words, substitute the code to read the key file with code to read the same from a WebService. The WebService is already written and working and returns XML data.
1. Before reading the key file, there will be a “Payment Step”. When the user opens the file, the file header will be read, decrypted according to a standard algorithm (which will be provided to you) and data extracted from it. The data will include the Title, Description etc. plus License Rules and a Content ID. Using the Content ID, a local encrypted license file will be checked to see if a license already exists for this file. If it does, the video will start playing. If not, a popup will appear showing the License Rules that have been read from the file. The diagram to the left shows an already working version in our Windows version of the Player. The Popup in Android may look different. The license rules will be in XML format. A license rule gives a specific license – examples are:
• Single Play
• Unlimited Plays for 3 days
• Purchase (Unlimited Plays)
When the user picks one of the rules, another Popup (or the same Popup) will offer four choices:
a. Pay from L3 account
c. Pay via Credit Cards/PayPal etc.
d. Free with Ads
If a or b are chosen, another popup will ask for a login to a subscription or account. The login will be checked against the above described WebService. If the login is correct, the software will proceed to get a key to play the file using the code in step 1 above.
If c is chosen, a mini Web Browser will be opened and redirected to our URL where payments steps will be completed. The web interface for payment is already complete and working. After successful payment, the web interface returns a code which must be read by the software. This code will show whether the payment was successful or not. If successful, the software will proceed to get a key to play the file as above.
For now, ignore d. If chosen, a message can say something like “Not available at this time”.
If the Payment Step is not successful, appropriate redirection happens and error messages must be displayed. On successful payment also, some message must be displayed (which disappears after a short while or when the mouse is moved).
Parameters: Needless to say, tight security in accessing the code will be required. Therefore, we cannot give you the code. You will login using TeamViewer or VNC or equivalent to view and modify the code. You will need to set up the programming environment on my computer as well.
Additional/Future: We will want additional work done on the UI in which a list of files in our format will be displayed and the user can pick any file and it will play or go through the Payment Step.