I'm creating a app for android using flash AS3. In my app, there are external swf files which are mostly games and slides. What I'm concerned about is, if you have apk file then you can extract swf files from it . So how can i restrict that swf file from playing if it is used without the main app. Is it possible without using another software ?
What you are saying is impossible there is no trick for complete avoidance of reverse engineering. if your user gets his hands on your apk file he can easily extract it and get the swf files you put there .
You can use a hack for naive users you can set your frame 2 to go back to frame 1 ie make a loop from frame 1-2-1-2... and start your actual file from frame 5 making it hard to see what's inside, And use it accordingly in your app.
use tools to encrypt or obfuscate SWF files see this though even this is not full-proof method.
Check everything in your swf that will allow it to run only on a particular OS ie sniff the OS it is running on if it is not the desired OS destroy stage and close . This can be done using flash.system.Capabilities class
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/system/Capabilities.html#version
Related
I am developing a digital media app using Google's flutter framework which contains songs, movies and etc. The main focus is, these media content should be accessible only through the app and not by outside methods (eg: media players, file browsers).
Eg: A music file which was downloaded through the app should only be played within the app and not by any media player. In that case, there should be an encryption method which should be used to lock these files from outside world.
In this case, bigger files such as Movies should also be taken into consideration. The size of a file can be anywhere between few kbs to 2-3 GBs.
What should be the better approach when solving this problem?
Is it to
Store everything in a database after encrypting the bytes?
Encrypt the entire file and still keep them in the form of "file"?
The downloaded data should also be able to be consumed quickly once the user requested for it. And once the consume is done, the file should be locked again from the rest of the world.
I am not sure if this topic is too broad but somehow I would appreciate it if anyone could provide me with something to start off.
Thank you.
My understanding is that some assets within apps (like the the splash screen) can be shown right from the start / when the user opens the app for the first time because they are bundled together with the app build. Is that also the case with videos? We need some videos within the onboarding tour to be available right away, also when in offline mode.
The simple answer is yes, you can store videos this way. You put your video in a folder named 'raw' user the resources folder.
See here for some examples: Where to put the Video file in android Project
However, video are very large so you may exceed you target app size.
You also will have to update your app if you want to update the video.
Streaming the video would avoid these issues, but you do have to have connectivity.
One compromised might be to have a small simple looked video for quick start up an offline, and switch to a streamed video as soon as it is available after startup.
I am having an issue with an app I am developing using adobe flash with Air for android support. I deployed the apk on to android device and played the files which are .swf file loaded onto my parent swf. There is a next and previous button which loads the swf files in succession. Now what happens exactly is that when I load my next file the sound from my previous file still plays in the background even though I have completely removed the swf file from stage.
I have no ides why this is happening as this hapens only when i install the app on android device and play it.. During the publishing of the swf in Falsh I do not face this problem. So I am unable to figure out the reason. Can anybody guide me regarding this? Thank you
To be able to completely stop and unload a loaded SWF, you need to invoke unloadAndStop() method on the Loader instance, that holds the loaded content. Like:
var outerSwf:Loader = new Loader;
// Load.
outerSwf.load(new URLRequest("outer.swf"));
addChild(outerSwf);
// ...
// Unload.
removeChild(outerSwf);
outerSwf.unloadAndStop();
I'm working on the UI for an Android and iOS app. It will likely be built with PhoneGap (or the like) meaning the UI will be an HTML5 implementation.
For most of the images, we've decided to go with SVG files as they scale well across the various Android screens and are great for Retina on iOS.
So far, using .svg files is working fine for us and thanks to Safari and Chrome support, easy to test locally in a standard browser.
The catch is that these .svg files are going to get rather large as we turn them into sprites. As such, I'm looking into using GZIPped svg files (.svgz).
A quick test shows that a 50k SVG we are using compresses down to 8k via Gzip.
The catch, however, is that it appears that there needs to be a client/server relationship going on to decompress the SVGZ file. I can't get Safari to render the linked .svgz file when run locally (as I assume it will be when via a webview in a PhoneGap compiled app). Chrome appears to be able to render the svgz, though.
So, my questions:
Is there any way to use .svgz files locally on iOS via a PhoneGap app (I haven't gotten to the point where we're compiling via PhoneGap yet so can't test that part at this time)?
Any known issues with .svgz on Android (given it seems OK on desktop Chrome)?
Should I even be bothering with .svgz in this situation where there aren't actual download speed concerns (outside the initial app download)?
I don't know much about issues with svgz on either iOS or Android, but you definetely shoudln't worry about the size of the .svg files compared to .svgz, not even for the initial download. All the files in an Android and iOS packages are compressed anyway, so zipping those files yourself won't bring you any gain. It might actually be better for your app performance-wise to keep them un-compressed.
I've been following this blog to help me make a simple music player function with an Android app (http://simonmacdonald.blogspot.com/2011/05/using-media-class-in-phonegap.html).
All works well - but I would like some way to extract a list of all music media stored on the phone so the user can click a file and play it. Does anyone know if this is possible via phone gap? I'd need to access track name/artist etc and a link to the track.
Cheers
Paul
Prognosis is not good.... PhoneGap does not have an API for accessing the media library. So, you would have to fall back to the File API to locate music files, and then... you would have to read the binary data in the actual files to extract out the track/artist metadata. Ouch. Seems pretty impractical.
[EDIT]
By the way, PhoneGap is not the only game in town. Appcelerator seems to solve the same problem, and apparently has a richer API, which includes
access to media metadata