Using SVGZ files without a server. (Local iOS/Android) - android

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.

Related

Android application using html

When you say android application I understand its a .apk executable. But When you say developing android application using html, does it mean we still get a .apk file or when we develop using html, is it then called as android web development, which means you won't get a .apk file. But you get a html file that runs on android browser. Is that a correct statement. Because apart from Java and C# Xamarin which will produce a .apk file, I dont think html--->.apk file never happens.
So .apk file means apps similar to windows applications, and using html means we
create a mobile web application?
does it mean we still get a .apk file or when we develop using html
It can, if you are using tools like PhoneGap.
or when we develop using html, is it then called as android web development, which means you won't get a .apk file
An HTML5 Web app, particularly with offline caching, can feel a bit like an app. However, it would be written as a Web site or Web app and distributed as such, not distributed in the form of an APK.

restrict swf file from playing on its own

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

Best options for archive library for Android

I'm creating an Android app that will handle collections of image files.
I'm looking for an archive format (and library) similar to .zip or .tar that meets these requirements:
Open source
Allows extraction of a single file without extracting
all files
Capable of containing image and text (probably json) files
I'm looking for something that is well supported on Android. Something that works for Android and IOS would be a plus.
What about Gzip? Open source and it has native support on Android.
For iPhone, you could use the ZipArchive library, though it may also have native support. (Search the SDK, I don't know how!)

How exactly does Sencha Touch wrap the native app?

When I compile my web app to a native iOS and Android app, how will it work? Will it be a regular web view that runs my app, which is in my server? Or it will place all the images, HTML and CSS files inside folders in the app project on Xcode and read them locally?
The latter. It will copy all files to the device, and run a webview which will load from the local directory. Think of it like you have some web files on your PC and point your browser to localhost to access them. It will load all the local pages/images even when offline, but you will face errors connecting to external resources unless online. Plenty of web apps are made without ever touching the developer's servers, also many times a simple restful solution will suffice.

How to play local video files in a browser

Am looking for the way to play video inside my android browser locally. There may be two or more video's in a local page (like facebook contains video's).
Can anyone please help me out..
Without actually reading about the specifics of the Android built in browser I would safely say, you can't. Well, if you run a local html file it might work, but if you intend to have an external page from which you can play local videos it shouldn't work. I say shouldn't because in the early days of browsers some of them actually did give you access to the local file system. Javascript for example could use file://, something I used myself for image previewing before upload. But this was a major security concern and all modern browsers prevent this.
The difference is if you run a local file or a file on your own local web server. Since then, your local file system is actually part of the web servers file system and the web server can serve your local files.

Categories

Resources