WiFi scan android javascript - android

I am trying build an android application that scans for the available access points and saves it in an array.
I was able to do it using eclipse and android studio but I am unable to do it from droidscript application.
I went through WiFi demos in droidscript to no success.
Just wanna know how can I achieve this using driidscript app.

You probably need to create a DroidScript plugin to do that. You should be able to just paste your Java code into the plugin template. Note: The latest alpha of DroidScript makes it really easy to do that as it can generate the AIDE code for plugins automatically.

Related

Can I debug flutter android plugins from within VSCode?

I expect the answer is 'no' from what I've already found, but thought I'd ask the specific question.
I have a Flutter app which via a channel calls into an android plugin the java source for which is in the app source tree. Since one can also do java development in VS Code, I thought there might be a way to step into the plugin code while debugging the Flutter app, but so far no luck - the app doesn't "see" that the source for the plugin it's using is open in a VSC editor. Is there a way to configure for this? I've already installed the Java coding support extensions for VSC.
I like VSC because it's so lightweight, but if I have to use Android Studio to be able to code & debug both flutter and java plugin code in the same app that's fine. In which case how to configure for that?
Thanks!

Argon 2 library use in android

I dont have any knowledge of using c libraries, i need to use Argon2 library https://github.com/p-h-c/phc-winner-argon2 in my android application, i read alot of articles about adding c code into android app, but i cannot find the .so file of the library, i tried opening the library in visual studio to build but no luck. i tried to use the make command in cmd windows but no luck, is it possible to add the c code directly into my android app with out the need to build, or i must build an os? i am using a mac computer for my android development.
if possible, please guid me into doing it, note that we need to add same library to our ios app and c# website and server.
thank you in advance

How to debug NativeScript java code in Android Studio?

I'm quite new to NativeScript. Currently, one of my projects is using NativeScript to develop cross-platform app. It has a 3rd-party lib which is written in java. But the result is not as good as I expected. I was struggling to find the problem since the console didn't log valuable info regarding to native code.
Instead, I import the project to Android Studio which is under the folder of platform/android. But it logs error when I hit the "run" button.
I want to know:
Is it possible to debug native code directly with VS Code. At least print out java native error or cat log.
How can I debug native code in Android Studio? How to solve the problem I ran into?
I'd be very appreciated, if anyone can answer my questions. Thanks!
Let me start off by saying there's no official integration with Android Studio. All I can provide is a workaround that will make it possible.
Note: The steps provided below are tested with NativeScript CLI 3.1.1 and will probably work also with 3.2.0.
The first problem is you don't have "node" set in your global path so first of all, you need to add it to PATH. Node required for NativeScript to run. You can look at how to set it up here
If you want to be able to run the project with Android Studio you can follow these steps:
After you've done that you need to change the <app_name>/platforms/android/build.gradle file as described here
The above change will enable you to open <app_name>/platforms/android in Android Studio
Run <app_name>:clean task from gradle
Run the task default for Android Studio, that will prompt you for emulator or device on which to run:

Use .so library in Android Studio 0.8.2

I tested All previously shown answers on stackoverflow more than once. None of them working.
I use Android Studio 0.8.2 with the latest Gradle Version.
I have libfourier.so. This is a native library made in .c.
I don't have any other files.
It has been used in a previous app and did work.
I need this library because it can perform fast fourier transform without the input being a power of 2.
Is this possible? If yes, how?
Currently I have put the libfourier.so in /libs/armeabi/libfourier.so
And I call it by using
static {
System.loadLibrary("fourier");
}
But I get an UnsatisfiedLinkException stating the library could not be found.
There is no real magic. Just put it in libs/armeabi/libfourier.so like every other library.
Everybody saying otherwise is wrong.
First of all, the library was immediately found on a real device. So emulators in Android Device Manager and Genymotion cannot find this libraries apparently. Or the application is not installed as *.apk.
For the diehards, it is certainly possible to install the apk-file. But for the lazy ones like me, a real device will do the trick.
Secondly, you have to make sure your package name corresponds in the native function in the native code with the call to the native function in the android code.
If you have in Android intec.ugent.be.MyClass.nativeMethod() than your native method should be named: Java_intec_ugent_be_MyClass_nativeMethod(..). This is the case if you do not use JNI_onLoad in your native library.
Of course you have than to rebuild the jni-package with ndk-build. And add the new so-file to libs/armeabi.
So I would advice if you work with NATIVE CODE/LIBRARY just use a REAL device to RUN TEST DEBUG (do not forget to enable debugging on the device)

Opening android AOSP native applications in eclipse

I need to edit the original Android Apps from packages
in terms make my own distro/mod..
I want to make changes to the In Call screen, lock screen, contacts, calendar etc..
I understand that for doing this I will have to build everything from
source,
however I need to edit the source and to do so I need to open the OS provided apps as
eclipse projects,
When I did I saw that there are
missing imports which are hidden in the SDK (or missing)
hidden parameters within the classes..
I don't want to use reflection since the whole code is here and
available, but how do you build a platform development kit..
or PDK ?:)
Can any one help?
You start by reading the documentation.
EDIT:
If you are trying to download some single project from AOSP and compile it using the SDK, odds are very strong that it will not work, and that you will encounter problems like the ones you cite. You do not build Android by building individual apps; you build Android ("my own distro/mod") by building the entire firmware. Most AOSP applications are not designed to be compiled by the SDK, but need the whole firmware.
Please check Using eclipse to browse and edit AOSP. You can atleast edit your code using eclipse, but you will have to use AOSP build system to build your distro.
You might also check Debugging Android Java Framework services as that would help debug your changes.
Just open Eclipse,
then go to "window" +"preferences" +"android"
there you will get sdk location,then give the appropriate path of the android sdk for proper run...

Categories

Resources