Is there `hot reload` feature in Android Studio native Java app development? - java

Does Android Studio have hot reload feature for native Java app development?
I am working on somewhat large application and it takes long time to rebuild so I am searching for some way to make it faster.

There is something really similiar called Instant Run for target devices that run Android 8.0 or later. In Android Studio there is a button right next to the run icon and it will apply your changes without rebuilding the entire app from scratch. In newer AS versions the button is simply called Apply Changes.
However, speaking from personal experience this feature is nowhere near as reliable and fast as for instance, Flutters "Hot Reload" and sometimes it will simply not work. In such cases you will have to rebuild the entire app.
Here is the official documentation for Apply Changes.

Related

IntelliJ JNI debugging

I have an android application which does some real time sound processing. Since this task is time critical, I wrote the code that does the processing in C++, the rest of the application is Java. Android Studio supports JNI debugging no questions asked which made it easy for me to write the code. Then, I left the code alone and decided in the meanwhile to get rid of Android Studio and to use IntelliJ instead.
Now, I had an issue in the native code and wanted to debug the C++ code, when I suddenly realized that I was unable to set breakpoints in the C++ code.
I also tried to set a breakpoint in the java code just before the native call and hoped that by hitting "Step in" it would go inside the native code but instead, InteliJ just skipped over it.
Also, the run configuration with dual debugging enabled (which I created in Android Studio back then) does not seem to work (Android Studio used to load a ton of libraries when launching the native debugger, IntelliJ does not do that).
This seems odd to me, as - according to JetBrain's official blogpost - IntelliJ has all of Android Studio's features except for the project setup wizard. What am I missing here?
Btw I am aware of this question but its answers are outdated.

How to make an Android app without using Android Studio?

I downloaded the Android studio and installed it. When I launched it, it's all "graphical". My screen reader is reading nothing on it.
I'd prefer if I could use my Notepad app, but the "stand alone" tutorials are too tiresome, and not many tutorials on the web have instructions making apps using Notepad. I wanted to know if there is an alternate IDE, or another way to code Android apps?
The Java IDE Eclipse is also not very compatible with my screen reader. I use JAWS screen reader by Freedom Scientific. I used to code Java desktop software using my Notepad, so I'm familiar with programming using Notepad.
Also, if I somehow figure out how to make Android apps using Notepad, how am I going to test them? Do I need a phone? I'm sorry for all these beginner questions, but I'm a beginner :)
You can follow this link:
http://developer.android.com/tools/building/building-cmdline.html
If you only want to build, not run, you don't need a phone. If you want test without a phone you can use an emulator by running"AVD Manager.exe" in Android SDK folder.
The good thing since the transition to android studio is that now the building of an android project is done using Gradle and can be piloted entirely by command line. So technically, you don't need an IDE at all.
Basically, every project has at least a build.gradle file that contains the instructions to build it. You only have to launch Gradle with the appropriate command to compile your app.
Yelliver mentionned the tools to build the app from the command line, there are also tools to create the project structure and the basic build files: http://developer.android.com/tools/projects/projects-cmdline.html (this documentation appears not to be entirely up-to-date, though, as it mentions the old project.properties format)
Having a phone to run your app is certainly going to be nicer and faster to develop. The emulator is far from perfect, quite slow, and sometimes not responsive. It is also easier to install other apps on your phone than on the emulator, in case your app interacts with other apps.
I wrote two small scripts for Android development without using Android Studio. They are building apk and installing it on the connected device and opening the logcat with the output of the installed application. This two scripts not even near to complete when to think all the features of the Android Studio but they are allowing to at least run the project on your phone.

Android Studio and Eclipse - which one I should use?

I want to develop some Android applications. I have had Google trying to find out how I should choose between Android Studio and Eclipse, but I don't know how I should choose between these two IDEs.
On many websites, I see developers more likely to use Eclipse than Android Studio, or it is because Android Studio was just released?
So which one should I choose?
Important: Support for the Android Developer Tools (ADT) in Eclipse is ending, per our announcement. You should migrate your app development projects to Android Studio as soon as possible. For more information on transitioning to Android Studio, see Migrating to Android Studio.
Reference for the quote.
So definitively, you should use Android Studio
You still may be more productive with Eclipse at the time of writing, as Android studio is relatively new and some obvious features (like Unit testing, for instance) are kind of present yet you just cannot get them working. It will pass many years till Android 6.0 applications you can develop with Eclipse no problem will no longer run on majority of devices on the market.
But as Android studio will likely to improve over time, and new features will be available only there in the future, I would recommend to start from that IDE for a complete beginner. Even better it may be to understand how the command line development works as this may allow to use any flexible enough IDE, does not matter is it officially supported on not.

How to take a picture of in panaroma mode?

I want to make an application that allow the user to take a picture of text either from android device Gallery or from android Camera application in a Panorama mode .But i can not find any source or tutorial to do this.How can i do this in my application? how to make an application that take picture from android camera application in a panaroma mode?
Thanks in advance.
I don't know if it's still actual for you, but hope it will be helpful for someone.
Panorama feature is already implemented in standard android camera at least since Android 4.0 (perhaps it was available in even earlier versions but I'm not sure, you can check it), so since source code is open for everyone, it might be the easiest way just to copy required functionality.
Although you can download source of apps from https://android.googlesource.com/ (you want LegacyCamera or Camera), you can't just open project of any standard app in Eclipse or other IDE. For example, LegacyCamera depends on Gallery2 and other dependences that might be hard to be resolved.
I spent several days trying to move panorama feature to separate project. You can download it from here: https://github.com/yankeppey/PanoramaSample . Several remarks:
Functional core (creating one panorama image from several ones, progress notices, etc) is on native part.
I used java code from from LegacyCamera which was used in Android 4.0-4.1, not 4.2, because it was significantly easier for me. Native part is taken from 4.2, it has only minor changes inside and almost the same JNI interfaces.
This project is just to help you move panorama feature to your own app, it's not like kind of library, don't expect clean code without bugs, it's just pretty dirty and buggy project. If I have time I'll try to make it cleaner, but there is no warranty :)

Java Application on Smartphone

What alteration should be made in a Java Application to be able to install it on Java Enabled Smartphone?
I tried using a random app of mine to see what happens, when I open it on the cell, it says Install? I say yes, and it says invalid file.
Now I was wondering what alteration should be made?
My smartphone (Samsung S8500) runs on bada which is more or less the same as Android, but alterations in the General.
You need different SDK for smartphones. Like for Android, you need Android SDK 1.5 or any other version. You just cannot install the same application. You need to develop using the resources provided by the SDK.
If your application is Java based mobile application then you can use some tools to convert it for Android. Doesn't work every time but worth a try.
In your case, Bada OS is not like Android what i learn from here. So, you need to develop the application using J2ME .

Categories

Resources