Convert HTML/javascript AIR app to flex-based AIR app?
Hi all,
I've already built an AIR app using HTML/javascript that I
would like to monetize.
I would like to use O2app's E-Commerce framework, which right
now only supports Flex-created AIR apps.
My question: Is there a simple way to "convert" an
HTML/javascript AIR app to Flex 3 format? I'd rather not have to
rebuild the app from scratch in Flex 3 if I don't have to. :)
Thanks,
Al
Hi,
There's no simple way to convert an HTML AIR app to flex.
But it is possible to create HTML Root windows from a Flex
AIR App. By root window, I mean the same kind of window that is
launched when you launch an HTML AIR App.
For more info, look at the HTMLLoader.createRootWindow()
call. (This will be available from a Flex AIR app as well)
Similar Messages
-
Can I run an html/javascript AIR app on Android or iOS?
Is it possible to compile an already-existing HTML/javascript app to install/run it on any mobile OS (Android or iOS, in particular)? I haven't found anything that says it's possible, only instructions for doing it with a Flash/Flex based AIR app.
I have a large html/javascript app, with a lot of value put into it, and my client would like to be able to package it for use on tablets. Ideally, I'd like to be able to not only have it run there, but also be able to "hide" the html/js code from prying eyes, if there's a way to do that.
Thanks much in advance... I've done considerable research trying to get an answer to these questions.
- JackHi Ross,
the certificate used for APK files is a self-signed one so at this point, no need to use Google Console yet.
See http://helpx.adobe.com/digital-publishing-suite/kb/publishing-process-android-amazon-mobil e.html (Create a certificate file using Keytool)
Testing is only a matter of installing the APK file on the device where you should be able to test.
The Android developer account will be useful for testing if you have in-app purchases matching 'retail' folios. -
HTML/ Javascript Air App as Screensaver
I am trying to find out how to use a Air app developed using HTML/ JS as a screensaver. All the information I have found has been in other dev platforms, ie flex or AS, and I am unable to translate it to what I am doing.
Any help pointing me in the right direction as far as docs/ api's to read would be greatly appreciated.
Thank you in advance for your help.There's no direct support for creating screensavers with AIR. (Now if you are talking about a fullscreen application, that is, of course possible -- look at the Stage displayState property in the ASLR: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/Stage.htm l#displayState -- but that's not really a "screensaver" per se.)
-
Convert HTML & Javascript to EXE
I have a html page and , the html page is link with a javascript file. I would like to convert both of them to exe.
Is is possible for me to create a window form application in visual studio, and link the html page to window form?You may want to take a look at the WebBrowser control:
https://msdn.microsoft.com/en-us/library/system.windows.forms.webbrowser(v=vs.110).aspx
It would be greatly appreciated if you would mark any helpful entries as helpful and if the entry answers your question, please mark it with the Answer link. -
AIR apps developed using HTML+Javascript
Hi…
I am working on Adobe AIR.
And now I have 3 options to develop AIR applications 1)Flex
2) Flash 3) HTML+javascript.
But can you please explain me when do I exactly use Flex Or
HTML+JS Or Flash.
One of the reason I know is Flex used for Rich UI
applications
Is there any list of requirements for which one of the 3
option is most suitable to use.
And I have some more questions.
1) Can AIR applications(developed using HTML+Js) invoke a web
service running on a different server
2) Can AIR application(developed using HTML+Js) detect the
connectivity of USB drive (I have developed 1 application that can
detect the Network connectivity and periodically reports the status
I want the same in case of USB(plug & play) connectivity)
3) I have one AIR application that has one HTML form on click
of button I am posting the form Data to Java Servlet using
“air.sendToURL()” as shown
<script src="AIRAliases.js" />
<script>
function sendURL()
var url = "
http://localhost:8080/InvokingServlet/Registration";
var variables = new air.URLVariables();
variables.username = document.f1.username.value;
variables.password = document.f1.password.value;
var request = new air.URLRequest(url);
request.data = variables;
air.sendToURL(request);
alert("Data has been added to Remote DB...");
</script>
The data goes to Servlet and then Servlet thru Jdbc
Connectivity adds the data to database “MySQL” database
named “user”
If I read the data from database and print in Servlet it
displays that to “tomcat server window(log)” But I want
the data from Servlet to send back to HTML page where I can display
it on the same HTML page where user entered his details. So even if
I put the result into some Scope like session or request, but Can I
read that it in HTML+Javascript page .
[email protected]quote:
Originally posted by:
pravinpatil23
But can you please explain me when do I exactly use Flex Or
HTML+JS Or Flash.
This question gets asked about once a week. You
can find my latest answer
here
and a little searching will dig up more opinions.
quote:
Can AIR applications(developed using HTML+Js) invoke a web
service running on a different server
An AIR application isn't hosted on a server, so all web
servers are "foreign" to your AIR application. An AIR app does get
downloaded from a server, most of the time, but it doesn't maintain
some kind of special connection to that server.
Because of this, there are no cross-domain restrictions in
AIR like you have in a regular web browser.
quote:
Can AIR application(developed using HTML+Js) detect the
connectivity of USB drive
AIR does not allow low-level system access, and has very
little in the way of platform-specific capabilities. So, you'd have
to use a high-level, platform-agnostic way of checking for the
drive, such as by looking around to see what files are available.
Things like USB insert notifications are way outside the scope of
AIR.
quote:
I want the data from Servlet to send back to HTML page where
I can display it on the same HTML page where user entered his
details.
That question isn't on-topic here. Ask on a forum dealing
with JSP servlets. -
Flex Based AIR application & remote HTML
The question is ....from a flex based AIR application do you
always have full access to all of the HTML content loaded from a
remote site via the DOM (htmlLoader.window.document), or is the
'context' of what you can see limited to what the initial url
requested can see - i.e. the context is as if it were javascript
running in the page corresponding to the initial URL.
As far as i can see if i request say the page
http://www.abc.com/page1.htm
and it has content along the lines of
<IFRAME src="
http://www.xyz.com/page3.htm"
id="remoteframe" />
<IFRAME src="
http://www.abs.com/page2.htm"
id="localframe" /?
then using the htmlControl.htmlLoader.window.document i can
successfully navigate the DOM for the initial page loaded and
localframe, but
not remoteframe.
I've seen various comments about sandboxes, bridges and
applicationdomains in the documentation but i don't see how this
can help me.
Can someone please shed some light on this? Can i from the
AIR application access all of the DOM, or am i restricted to the
initially loaded page and pages referenced from the same domain in
the page?
Thanks
JamieHi,
From your AIR application, you can only access "exposed
properties" in remoteframe.
You expose a property by using the sandbox bridge mechanism:
http://livedocs.adobe.com/air/1/devappshtml/help.html?content=security_5.html#1092959 -
AIR HTML+JavaScript app vs. hardware accelerated composing
I'm developing an HTML application for mobiles and desktops. The application is optimized for WebKit based environment. To improve a rendering speed I'm using hardware accelerated layers (something like -webkit-transform: translateZ(0); etc...).
This works great on my iOS devices (using PhoneGap aka Cordova to package a "native" app).
On Windows and OS X I'm using Adobe AIR 3.5 to package a captive runtime HTML/JavaScript based application. I have found this to be the best solution (for now) even though I have tried many others (Cordova for Windows 7 / OS X, TideSDK, ...).
The point is that the HTML rendering in Adobe AIR seems not to be hardware accelerated. Does anyone of you have experience with this? Is here any possibility to enable hardware accelerated layers in AIR HTML rendering?
Thanks a lotThanks a lot, actually I tried AIR SDK 3.6 yesterday and it seems it still doesn't support an acceleration. In a browser it works just fine even in fullscreen (zoomed page). It seems that the best way to achieve my goal will be using Cordova wrappers for OS X and Win Desktop. But as an AIR developer I really want to use AIR SDK So I will do some more tests..
Thanks,
Pavel -
I have a current Flex based application and my boss want it to transfer to html/css based.
Is it possible to do that easily? I mean if there is a plug-in or tool can do this conversion quicker. Already google but could not find one.
What do you think the level of effort estimate to make this conversion?
I don't know how to report to my boss...if it can only be converted manually and it is huge...
ThanksIf the app is huge and your boss wants HTML/CSS, better suggest he gets his story straight with the accountant as to why he is spending all that money degrading a perfectly good application.
There are no automated tools, just hard work ahead. Think of the overtime. -
Hello,
I have an issue with OData based BASIC authentication for iOS App created using HTML, JavaScript, SAP UI5, OData and Apache Cordova/PhoneGap.
Please check the post here http://scn.sap.com/thread/3527245
Request you to kindly reply on the above given link.
Thanks and Regards,
Suraj KumarHello Prathik,
The code which I am using for OData based BASIC Authentication, for my Mobile App is as below.
var onSuccess = function(data) {
alert("We are Through"); //Just to check that the OData request was sucessful
var onError = function(err) {
switch(err.response.statusCode) {
case 403 : {
window.alert("Error Code - 403, Service unreachable ");
break;
case 401 : {
window.alert("The credentials are incorrect or missing!");
break;
// dataUserName and dataPassword are the two variables, in which I am storing my Username and Password, respectively.
var connectionRequest = {
requestUri: "ODATA SERVICE URL GOES HERE/",
headers: { Authorization : 'Basic ' + Base64.encode(dataUsername + ":" + dataPassword) },
method: "POST"
OData.request( connectionRequest, onSuccess, onError); -
Embedding swf into HTML+JS AIR app
Hi
I'm trying to embed swf into HTML+JS AIR app with no luck.
First, I created flash library with this class in default package.
package
import mx.controls.Alert;
public class Utilities
public function Utilities()
//asdfasdf
Alert.show("asdasd","");
Then I compiled the project with Flash Builder and got library.swc as result. Then I extracted swf file.
After this is added required code into my html:
<html>
<head>
<script type="text/javascript" src="AIRAliases.js"></script>
<script type="text/javascript" src="AIRIntrospector.js"></script>
<script type="text/javascript" src="jquery-1.6.2.js"></script>
<script src="library.swf" type="application/x-shockwave-flash"></script>
<script type="text/javascript">
$(document).ready(function () {
alert('loaded');
air.Introspector.logError("aaa");
var v = new runtime.Utilities();
</script>
</head>
<body>
</body>
</html>
Then after I run application, I get error that result of expression is not constructor, function etc.
Could you help me please? Thanks in advance.
Here is sample code:
http://depositfiles.com/files/jztpnlb3aNo. I mean that the Flex framework makes certain assumptions about the environment it is running in -- like having a stage to work with. The Alert function, for example, works by creating a sprite and adding it to the Flash display list. Since your embedded SWF is not on a stage, there's no way for it to work.
You can can possibly use certain non-visual parts of the framework, such as the rpc package, but I can't guarantee it. -
When to use Flex Or Flash Or HTML-Javascript
I am Experimenting with Adobe AIR. I know AIR Applications
can be developed either using Html-Javascript Or Flex Or Flash.
But can anybody HELP me understand when do i exactly use Flex
or HTML-JS.
Well i know one of the reason to use Flex is to build
RIA's.What are the other Possible reasons ?? can i draw a Decision
Boundry between them??The best reason to choose one tool over the other is that you
have something working in that language already, and are just
extending it into the AIR world.
If you're starting a new project, you then have to balance
tools you have and know how to use against the strengths of the
tools. A tool you don't know has to have some pretty compelling
strengths to make you take the time to learn it, unless you're just
doing it for fun. If not for fun, the effort has to pay off, yes?
Very generally speaking, here are the strengths of the tools,
as I see it.
For HTML + Javascript, just look at what you see on the web
today. People are pushing browsers pretty hard these days with web
apps, so that gives you a good first-order idea of the power of
this tool set. The AIR environment does give you some more power,
not just in the AIR APIs, but also in having a single modern
browser to develop for, so you don't have to limit yourself to IE6
compatible code. Still, it's not yet the equal of the other tools
in some areas.
Flash's main advantage over the others is in applications
with lots of graphics and animation. The reason for this is purely
because that's what the Flash authoring environment is geared to
produce. It's not got a very good ActionScript editor, and as a
consequence there's a practical limit on how much code you want to
write in a given project. It's not a question of whether you
can write a 20,000 line ActionScript program within the
Flash environment, it's a question of whether it's better done in
another tool.
One of the best "other tools" when you end up with lots of
code is Flex. With the "Builder", you get Ecipse, and without, you
are presumably using some other worthy programming environment.
But, you give up the graphic and animation tools from Flash, and
you give up a lot of the simplicity of HTML + Javascript.
You can combine them, of course. You could build a whizzy GUI
control in Flash to use in a Flex application which is hosted
inside a web page, for instance. -
How can I run a .bat file from an html/javascript adobe air installation package?
I write an html/javascript code which works completely true
but when I made the installation package by air-sdk
it dosent work properly
my code is:
<html>
<head>
<title>Hello World</title>
<script type="text/javascript">
function appLoad() {
air.trace("Hello World");
</script>
</head>
<body onLoad="appLoad()">
<h1>Hello World</h1>
<br />
<button onclick="window.open('file:///C:/Windows/notepad.exe')"> Launch notepad </button>
<button onclick="window.open('file:///D:/opennotepad.bat')"> Launch batnote </button>
</body>
</html>
Chapter 5: Creating your first HTML-based AIR application with the AIR SDKSeems to be security violation. You can't execute bat or cmd
-
How to create and use Data Vault with HTML/JavaScript (SAPUI5) for Mobile Apps?
Hello,
I am creating a demo Enterprise Mobile App, for cross platform and I want to use the Data Vault.
I am not able to figure out how to implement the Data Vault with HTML/JavaScript i.e. SAPUI5 for cross platform mobile apps I have a tutorial, but it is for Android based apps. Where as I want it for iOS as well. I guess, in this case, implementing the Data Vault using SAPUI5 over HTML and JavaScript would be better.
If anyone has any links or sample code to implement Data vault in HTML/JavaScript (SAPUI5) or specific for iOS apps, it would be great.
Thank you.Hi,
This is the "SAP Mobile Documents" community, so this seems to be the wrong place for asking your question related to Data Vault / SAPUI5.
Maybe you should post your question here: http://scn.sap.com/community/developer-center/front-end.
best regards,
Ingo -
Microphone record, playback in AIR html js desktop app
hi,
I want to record, save and playback the microphone audio in an HTML/JS AIR desktop app.
I can't find any examples so my code is based on AS3.
But the app crashes almost right away when the SampleDataEvent handler function is called.
Should it be in a while loop sames as AS3?
$(function(){
var mic;
var soundBytes = new air.ByteArray();
$("#btnRecord").click(function(){
mic = air.Microphone.getMicrophone();
mic.rate = 44;
mic.addEventListener(air.SampleDataEvent.SAMPLE_DATA, sampleEvent);
function sampleEvent(e){
while (e.data.bytesAvailable) {
var sample = e.data.readFloat();
soundBytes.writeFloat(sample);
$("#btnStop").click(function(){
mic.removeEventListener(air.SampleDataEvent.SAMPLE_DATA, sampleEvent);
$("#txtActivity").val("");
$("#btnPlay").click(function(){;
for (var i = 0; i < 8192 && soundBytes.bytesAvailable > 0; i++) {
var sample = soundBytes.readFloat();
e.data.writeFloat(sample);
e.data.writeFloat(sample);
//we write the data twice because there are 2 channels (stereo)
thanks,
Jeff.this works on my macbook. But on my Windows 8.1 machine the audio gets played back twice as slow as normal.
Not a lower pitch, just twice as slow. Any idea why this is?
$(function(){
var s;
var sc;
var nowRecording = false;
var nowPlaying = false;
var recordedBytes = new air.ByteArray();
// air.SoundMixer.audioPlaybackMode = window.runtime.flash.media.AudioPlaybackMode.VOICE
var mic = air.Microphone.getMicrophone();
mic.rate = 44;
mic.gain = 70;
mic.setSilenceLevel(0);
$("#btnRecord").click(function(){
if (!nowRecording) {
air.trace("recording");
recordedBytes.clear();
mic.addEventListener(air.SampleDataEvent.SAMPLE_DATA, getMicAudio);
nowRecording = true;
$(this).val("Click me to stop")
else {
air.trace("recording stopped");
mic.removeEventListener(air.SampleDataEvent.SAMPLE_DATA, getMicAudio);
nowRecording = false;
$(this).val("Click me to record")
function getMicAudio(e){
recordedBytes.writeBytes(e.data);
$("#btnPlay").click(function(){
if (!nowPlaying) {
air.trace("playing");
recordedBytes.position = 0;
s = new air.Sound();
s.addEventListener(air.SampleDataEvent.SAMPLE_DATA, playAudio);
sc = new air.SoundChannel
s.play();
sc.addEventListener(air.Event.SOUND_COMPLETE, stopPlayback, false, 0, true);
nowPlaying = true;
// $(this).val("Click me to stop playing")
else {
sc.stop();
stopPlayback();
function stopPlayback(e){
air.trace("playing stopped");
s.removeEventListener(air.SampleDataEvent.SAMPLE_DATA, playAudio);
nowPlaying = false;
function playAudio(e){
if(!recordedBytes.bytesAvailable > 0)
return;
for (var i = 0; i < 8192; i++) {
var sample = 0;
if(recordedBytes.bytesAvailable > 0) sample = recordedBytes.readFloat()
e.data.writeFloat(sample);
e.data.writeFloat(sample); -
How to Set cookie in AIR with HTML/Javascript
Can someone explain or post example code as to how I can go
about setting a cookie in AIR using HTML and Javascript?
I have an AIR app that requires the user to login on a form
that lives in a non-applicationSandbox. I know how to
create/modified/delete cookies using JS and a web browser, but the
same code returns a cookie with a null value. I'm sure I'm just
missing one line/word of code to make this happen.
The stripped down basics of setting and reading a cookie
using Javascript:
document.cookie("myCookie = yummy");
var taste = document.cookie;
What am I doing wrong?quote:
Originally posted by:
anirudhs
> So if I want to use cookies in AIR html/javascript the
end user will need to have http access, whether it be from a public
or private server?
Yes.
Though I am curious to why you are using cookies to store
state on the client? This is AIR and you have access to the
filesystem, local SQLite DB, encrypted local store, etc.
Thanks for your previous answer anirudhs. Finally got a
cookie thru Air! :P
Some scenario's do require login via cookies for our webapps
(in my case, chat w/ nicks which also logs users by serverside js +
php, thereby allowing the same access method for web-browser login
to the same chat rooms). It might be a bit of a stretch for some of
us to attempt to code filesystem/SQlite/localStore updater for our
web-users via js + php, although I know we could perhaps embed a
hidden flash to do the localStore, and pass data back and forth
from js, but that's lot of extra lifting, whereas browser cookies
are naturally designed for such logins.
I'm confused by the safari wording thou.. does the webkit
security model in Air only work via user activated http (ie.
clicking links), or is there some way Air can initiate an http
connection (say using loader) to set or get cookies? It seems a
pain to need to force the Air user to click and open a dead link
just to activate a cookie session, even if it's only to a hidden
frame.
Maybe you are looking for
-
Simple Java Sound Question...
Can I draw waveforms while capturing data? If yes, how. If no, why. Thanks. I need the answer ASAP, please help.
-
I need to add a new computer to my homesharing
I can't remember my security quiestions and the old email address that its sending my reset to is defunct! HELP
-
E7 maps went just broken after program update
Hour ago, I had E7 running firmware 25.007. All features were running fine including Maps application. Under Menu - Apps - Program updates, I found new Nokia Maps application (Nokia Kartat). Selected and let it update. After successfull installation,
-
Hi, Suppose if the user reports slowness in the database in a production environment what are all the things which we have to look over and check.please explain me .what are all the dynamic performance views which we have to check .please give me a n
-
Hi Our database trigger raises an error (RAISE_APPLICATION_ERROR(-20111,'My message'). The application of HTML DB generates a page with error messages on it. OK. The first message is displayed as it is defined in the template ("Error Page Template Co