How to Make Adobe Air as a Java Library - java

I have an Adobe Air project for Android written in ActionScript on Flash Builder. I was wondering if I can somehow make this Air project to a java library so that another of my Android project written in Java on eclipse can use it?
I have been looking into the Adobe Air native extension with Java. But it seems what the native extension doing is to run native Java code in Adobe Air. I want to do the opposite.
I look into JNI but it can be used to call c/c++/assembly, didn't see the approach to call actionscript.
Just found out there may be a way to call Air stand alone project from Java through java.lang.Runtime. But it may take 1-10 sec to open the stand alone Air project. Is there anyway I can integrate Air application into Java?
If I have to call the stand alone project from Java, then the next problem came, my Air stand alone project will play rtmp live stream. However, that needs to have Flash Player which Android/iOS device do not support it. Is there any way to play rtmp rather than using VLC player? I heard VLC player have 1-2 second delay.
Updates:
So someone told me to look into Haxe. It can compile AS3 to jar and Java can use it. http://www.haxe.org
https://forums.adobe.com/thread/1541206

Related

how to write an android app with languages other than java

my title is a little different than what i try to say, i couldnt exactly tell what i mean.
as far as i know we develop android apps with android studio(and there were support for other ide s like eclipse before) you code it and make a gui app with drag and drop.
recently i tried to open source code of few android apps like whatsapp. i extracted the classes.dex file and checked the source code. it was written with java. but when i google "whatsapp" it says it is written with erlang.
my question is, how the code written with erlang turns to a java code? as far as i know you can make android apps with c++ too. since we dont have a translator for languages, how is this being possible?
WhatsApps backend is written in Erlang, not the app
https://www.quora.com/Is-WhatsApp-fully-written-in-Erlang
Android uses the Java Virtual Machine (JVM) runtime. To run Android apps on a phone you either need to write them in a JVM language (Java, Kotlin, Scala), or write them in another language and that has a rumtime interpreter on the device (Javascript + Android Webview, Flutter + Flutter Runtime)
You can write your app in just c++, but then you won't have any of the Android SDK available to you. You'd have to rebuild the entire view plaform (among other things). Flutter does this.
If you have more specific questions I'd be happy to answer them

Is it possible to run a java program inside a C# on a windows phone?

I'm in 2nd year of bachelor and working on my final project which is on the end of 3rd year.. But the project is on Java. I want to make it run in my laptop and on my phone. But I have a Microsoft Lumia 640. And I know how to create apps for my phone just in C#. Is it possible to design a mini software, and run it inside a C# app in my phone?
No, natively Windows Phone doesn't support Java but you can take a look to codename one where in their manifesto says that you will able to make mobile application for any platform only using java.
If you habe the java application as a jar lib you can use ikvm (a jvm for .net) and then you can theoretically run java bin code on the windows phone... you will need to take a look because maybe the issue will be how to deploy that jar to your phone at runtime

real time turn by turn navigation using Skobbler APIs on a Java app

I am trying to develop a java app that will run on a Raspberry PI. Raspberry PI will be mounted on a vehicle and I will know my position through a gps device. To solve this, I’ve been thinking on a solution like this:
Use a Webview on my JavaFX app and use your javascript API to build a real-time turn by turn navigation app. However, I’ve seen that your web API is not as complet as mobile platforms APIs. My question is: Is what I am trying to do feasible using your APIs? If so, could you please give me a brief description how to do it?
Thanks!
The Javascript API is not a turn by turn API - that is currently something a bit too heavy for javascript to handle (it could be feasible but it's not commercially attractive right now).
In theory you could integrate directly with the C++ code of the SDK as that should be able to run on Linux (depends here on the gcc version used and the OpenGl support offered - send an email to dev#telenav.com with your scenario and they will advise you).
Or if you can run Android on the device then you can use directly the Android SDK.

Questions regarding Windows/Android development (Java:APK/JAR)

I'm planning to write a software (with GUI and sounds) that should run under Android and Windows 7/8
I guess the best approach for this is to use Java?
I am new to Android and Java development so my questions are:
-So can I use one development platform to create both (APK & JAR), namely Java?
-As far as I understand for Android I need to compile (from same source?) a .APK file and for Windows a .JAR file ?
(The .JAR will run in the Java Runtime that is installed in Windows)
-If I use Java what would be the best IDE, something like Google's Android Studio (will it allow to create .JAR?) or Oracle's JDK (Java SE Development Kit) ?
thank you
I don't think it is possible to write an app that will run on both OS's, since all GUI components are part of different frameworks (Android SDK for Android, SWT/Swing/... on Windows), and not compatible with all OS's.
You best bet is probably a web-based app. You can run it in the browser on dektop and either on a mobile browser on Android, or package it as a fullscreen WebView running your web app. The best part is it would also work on iOS.
You could also write your app for desktop in Swing and then convert it to an Android app, you can find questions on StackOverflow on the subject, such as this one.
Hope this helps ;)

Is there a framework that allows playing of video without any pre-installed drivers ? (H264)

I've been looking all over the web to find something that allows me to play H264/Mpeg4 videos in java. The videos are recorded on an android device and i would like to attach a java programm to my app that the user can move/copy to his/her harddrive and execute to play the video on the computer (bigger screen, mouse input etc).
I did find xuggler, vlcj, ffmpeg, gstreamer.
They all say that they require some driver etc to be installed on the computer. But i need something that runs in pure java and that can be put into the jar that i will put into my app or website dl.
It has to be as simple as that, user dl the jar and executes and is able to watch the video that is stores on the android device (i realize that it requires the user to have java installed, but thats the only thing i want to burden them with).
Links or tutorials are welcome.
(i work a lot with android but hardly with plain java, so the lack of multimedia abilities is kinda throwing me off balance)
JCodec is a recent project aimed at providing a pure-java implementation of video and audio decoders, worth a try.

Categories