Encrypting and decrypting android expansion file - encryption

I have successfully uploaded and published my android app + apk expansion file (with format .obb but is actually a .zip) on Google Play. I would like to set up some protection to it. Are there any ways to do it to acheieve this without using external jar classes like zip4j?
In my obb file I have a few videos (of .mp4) that I need to use my mediaplayer to read it. I want to do this so that only my media player can read the obb file.
Thanks.

Related

Xamarin (Forms): how to download and use an SQLite DB file

my client has a simple SQLite DB exposed through an URL (direct download of the DB entire file).
What I have to do is to download the file and then use it in my app: Android and iOS.
I am already able to use the same DB locally: I have a copy of the same file that is online (not updated) in my assets and resource folders and I can use the data in it inside my app. The DB structure won't change; the file is updated every night to reflect the changes in their DB, so only record updates/additions/removals.
Anyone can give me any advice on how to achieve this result?
Since you already have a url of this data file, then you need to separately download this file and save it to local on each platform, and use DependencyService to call the method of each platform in your portable lib.
For the example of using DependencyService, you can refer to Saving and Loading Files.
For the downloading part, you can use some plugins for example like CrossDownloadManager, which may make your work easier.
Or if you want to complement this work in your PCL, you can add a System.Net.Http reference in your PCL, then use HttpClient to download your database file, but you still need to use DependencyService to save this file on different platforms.

simple javafx application to convert an mp4 file into mp3

I want to write a basic application that converts an mp4 file into an mp3 file using javafx, but I don't know the API's necessary to do so - if there are any.
Can you please assist me with code snippets?
You could use ffmpeg and a JavaFX gui.
But since it's "basic" as you say, you may as well use a batch command for it.

How to make an SQLite database as part of the build process - iPhone SDK

I have created a Core Data application in iPhone Simulator. Now when I am testing it on a device, my SQLite database is empty. I have some preloaded settings which I want to deploy when the application is installed.
How can I achieve that?
I have seen a few questions on Stack Overflow, but they don't exactly answer my question.
If you have an existing sqlite-store file you just add it to the app bundle just like you would any resource e.g. images, audio, etc.
If it is read only, you just use the NSBundle commands to supple a path to it inside the readonly app bundle. If you want it writable, you copy the store file from inside the app bundle to one of the writable app directories e.g. Documents or Library, and then open it there as you normally would.

Is it possible to upload a complete directory structure with Flex?

Is it possible to upload a complete folder with subdirectories and files (in the subdirectories) in Flex?
I am using a Flex / BlazeDS / Spring application. The question is not how to transfer the data to the server. The question is: if it is possible to get access to the files and subfolders (recursive) with Flex?
If you're working with AIR, then yes. Look a the File class. It is a reference to either a file or directory. You can tell if it is a directory using the isDirectory attribute. You can use getDirectoryListing to get a list of all files and subdirectories in a directory.
As far as I know, you'll then have to upload things one by one to the server, though.
If you are using Flex in a web based app, I do not believe what you're trying to accomplish is possible.
No, not if you are talking about a Flex app running in a web browser. In an AIR application it is probably possible, but not in Flash Player in a browser.
The security sandbox doesn't give that kind of file system access, files are only available when selected by a user, via some user action like clicking a button. And then you only get a reference to the file, so it can be read or uploaded, there is no mechanism to for example get the local path to the file as a string or such, and no way to check for subfolders (unless it's an app for the AIR runtime).

How to search for a file on users file system? ( Adobe Air application)

So we want to seacrch for file like exampl*.ex*mple. We want to search in all users files and folders.
I know it will take long, but steel using ONLY AS3\MXML, no native commands, no external programms - only AS3\MXML libs and classes, we can skeep all folders with sise <= 200kb
So How to search for a file on users file system? (in Air application, NOT NATIVE)
Take a look on this sample. You will have to modify it in order to add your special conditions, but it's very easy.

Resources