Generate Java android project with sencha - java

My question is:
It is possible to generate a java android project structure (with uncompiled classes .java) with Sencha Cmd?
I think Sencha Cmd must do that to generate an APK. It's the Android SDK that generate the APK.
I need to modify the android project before build it because Sencha is limited in interaction with the phone. (It's impossible to download a file form a generated APK by exemple... I need to do that)
If it's possible, what command or manipulation do I need to do?
Thank you for any help that can head me to the solution.

I finally used Cordova to compile my application, it responded to my needs.
Cordova allows to download and execute files.

Related

Flutter Example Starter code with Main.Dart vs. .java

If an example app has both a main.dart file and .java & build.gradle files does that mean that there are two redundant ways for the example app to be run on an emulated Android device?
I can currently run the main.dart file on an emulated device in Android Studio, but when I try running the .java file it give me the error "Error: Gradle project sync failed. Please fix your project and try again."
It seems like the .java and gradle files directly compile to an Android .apk program when run, but my intuition was that the Dart code could also be compiled to an apk or ipa program.
When you make a new Flutter project it generate dart, android and iOS (if on a mac) code. For the most part we dont have to touch the underlying Java code.
But if you must you can open just the android folder in android studio and let gradle sync and build the project. You may also want to write platform specific code for either android or iOS.
Here is a guide on how you can do that https://flutter.dev/docs/development/platform-integration/platform-channels
tl;dr;
flutter generates native code for your dart code. You can also access native hardware by writing platform specific code.

can i use java library(Swiss Ephemeris) in xcode project for ios developmenat?

I am building an IOS app in which i want to use Swiss Ephemeris library which is a jar file. But i am new in Xcode and swift both . My concern is how i can use jar file in my Xcode project for IOS development.
I downloaded jar file from the http://www.th-mack.de/international/download/
Any help would be greatly appreciated.
a JAR file is a Java Archive which means you need to have Java installed on the system you want to use it (You cannot open or use a jar file on Windows or on macOS, unless you have Java installed). Same goes for iOS. For using a jar file in your app, iOS needs to have Java installed which it doesn't. And if it did, you couldn't even access the library functions because it's Java and not Swift.
The library is written in a different language than the app. While in some cases, such as C++ code being able to run on iOS, java isn't able to.
This is because Java runs inside of the JVM (Java virtual machine). It runs the compiled java byte code. However, iOS doesn't have the JVM on it at all, so the iPhone in question wouldn't be able to understand at all what this "jar" file is.
For that reason, you will not be able to use this library - or for that matter, any Java library while writing an iOS app.

Can I edit xml/java codes of my android app on Brackets Editor?

I am new to Android app development. I have a source code and would like to modify some xml/java codes. Can I use the Brackets editor for this? I don't want to use Android studio as it's a bit complicated for me.
If you really want to, you can edit source files in an editor of your choosing and build the app manually via terminal. Actually, this is how it's done on Continuous Integration systems.
Typically Android projects are using Gradle build system, and come with Gradle wrappers. After you are done editing, you can just invoke it to assemble the release APK signed with proper keys as discussed in How to create a release signed apk file using Gradle? thread. Note that it would require you having downloaded Android SDK and configured your paths properly, which would be tricky for a beginner, yet completely automated in a proper IDE.
If you are unlucky, it could be an old Eclipse project, or using some less popular build system, like Ant.
As you are new to Android development, I think you should go the more simple route and just download Android Studio and import your project.

Android Studio - How does a library project used in an app follow with the app-release.apk

I'm using a library (https://github.com/PhilJay/MPAndroidChart) for plotting data in an android app. When app-release.apk is created by the program it is ready to be installed on the tablet I use for testing.
What is puzzling to me is how the parts of the library, which i use, follow with the release. In other scenarios, for example in Visual Studio and c# - program being installed on Window machine, libraries require dll files to be installed and registered on each targeted machine. In my scenario the library is written specifically for Android, but if I somehow managed to include a c++ or a c# library in my Android app using tools like libstdc++ or MONO, would it work the same way when it comes down to app-realease.apk?
Are all classes in a library included in the app-release.apk or just the parts that I use?
Thanks in advance and please let me know if the question is unclear before downvoting it!
Normally, when you build your APK, all the libs you have imported (jars) are included and transformed to dex files, as the rest of your code. So, yes all the classes are included, even if you don't use them.
You can use Proguard to remove them from the APK. Look at this post :
Use Proguard for stripping unused Support lib classes

How to integrate PhoneGap into an Ant build?

I've been reading up on PhoneGap and really like it. I'd like to see if I can use it with GWT to write Java apps that deploy to many different platforms (web, mobile web, android, iphone, winphone, etc.).
It looks like the PhoneGap SDK comes with different versions of cordova.js for each native platform you want to support. So it looks like the Ant build will have to somehow package the GWT-generated JavaScript to the correct version of cordova.js:
3098DJU39I4F9IF9.html + cordova-android.js
3098DJU39I4F9IF9.html + cordova-iphone.js
3098DJU39I4F9IF9.html + cordova-windows-phone.js
I'm generalizing here, and I know those aren't the correct file names (although, obviously, 3098DJU39I4F9IF9.html is the GWT-generated code).
But then something has to kick-off PhoneGap's ability to take each of those pairings and produce the correct packaged container: an APK, IPA or XAP for each platform respectively.
So I first ask: how does a PhoneGap developer normally go from 3098DJU39I4F9IF9.html + cordova-android.js to having a myapp-android.apk, or from 3098DJU39I4F9IF9.html + cordova-iphone.js to having a myapp-iphone.ipa? Does the PhoneGap SDK have a command-line tool that does this?
Once I understand that much, I'm trying to figure out how to automate this packaging/binding process from an Ant build. Are there any known Ant tasks that already do this? Or do I need to kick off a shell from inside Ant and just run the shell commands? Thanks in advance!
#rooftop is right, you have to build the native app using native SDK even if you are using Phonegap. The benefit lies in creating the UI and behavior of the app using HTML5, CSS and JS.
So, if you are not using any of the native functionality or custom Phonegap plugins, you can just have a bare minimum package structure of native apps for each of the platforms and then simply move the correct files into the concerned folders (in Android it is assets folder) of those package structures using copy task of ant. Thereafter, you can use command line compile and build tools specific to each platform to build and package the app.
Hope this helps.
EDIT: Added more details about other platforms
Basically, all SDKs contains command line tools. In fact I used to compile and build from command line, to automate the process, even for standard Windows apps (Console, Web Apps etc) which are usually performed via Visual Studio's easy to use environment. You can see this for extended tools over standard SDK for Windows phone development.
Similarly iOS is based on UNIX so there we get the power of majority of command line tools for compile, build and automation and XCode provides command line tools for building.
Further for Android, you may find this helpful.
You should really be using Cordova, the renamed version of PG that is an Apache project now. Command line tools were recently released for Cordova. I have not used them so I am not sure if they will help you with building or not. Typically the way you woul create the binary for the device, say an IPA file for iOS would be to actually use Xcode and the native SDK to compile and package your app. This means you need all of the native tools and SDK for each platform. There is also a hosted service from Adobe that will build the native bits for you for a fee. It used to be called phone gap build, not sure if that is still the name. You might want to look at IBM Worklight, as it does many if the things you asked about. The developer edition is free an Eclipse based for the IDE.

Categories

Resources