processing-android icon indicating copy to clipboard operation
processing-android copied to clipboard

android studio example crashes at startup

Open paulgoux opened this issue 3 years ago • 13 comments

The example provided on the android processing site does not work.

https://android.processing.org/tutorials/android_studio/index.html

I think it might have something to do with permissions. Any help would be great, I have tried things for the last week and nothings worked.

I have even tried the solutions in the migrating to androidX issue request and am pointing the program to processing build 4.11

paulgoux avatar Oct 23 '20 14:10 paulgoux

Dear Processing team, I am having the same problem. I've found out that processing doesn't support higher API's. By using androidx instead of android and adjusting the code should solve this problem

sorrowcode avatar Oct 24 '20 10:10 sorrowcode

ive found an alternative, I had to resolve the permissions issue in processing to get it to work on android 10 so now no need for android studio

paulgoux avatar Oct 28 '20 00:10 paulgoux

@paulgoux @eoao the latest release of the mode and core library has been updated to support Android 10 and the AndroidX packages, please confirm if this issue has been solved by the update. Thanks!

codeanticode avatar Jan 04 '21 13:01 codeanticode

Just create a new project in android studio, added implementation 'org.p5android: processing-core: 4.2.0' and nothing works! Can't you do it and check everything, or does everything work?

PApplet shown in red import processing.core.PApplet; shown in red

import processing.core.PApplet;

public class AAAAAAA extends PApplet {
    @Override
    public void settings() {
        size(displayWidth, displayHeight);
    }

    @Override
    public void setup() {

    }

    @Override
    public void draw() {

    }
}

GENTEK05 avatar Jan 10 '21 14:01 GENTEK05

Hi @GENTEK05

There's a helpful explanation @ranaaditya has mentioned in #640 for the kind of issue that you are facing. I hope this resolves the issue.

rupeshkumar22 avatar Apr 07 '21 20:04 rupeshkumar22

Android Studio examples in the tutorials probably need to be revised/updated. They were written some years ago.

codeanticode avatar Apr 29 '21 19:04 codeanticode

I agree some updates are needed to keep this part of processing relevant. As much as a may disagree with the direction that people want processing to head in, I also see the potential to create a great fast prototype and deployment platform unrestricted by Android studio.

I am in the process of creating a library to add simple basic functionality, out of the box, ie keyboard text input, gui, with sliders etc and user request prompts. I understand you can use context and to access some android functions but again, it feels like thats a big departure away from processing.

This library will allow users to code to android using processing without having to worry about any android specific code.

paulgoux avatar May 12 '21 08:05 paulgoux

@paulgoux thanks for your comments. By direction you mean what's exposed through the core library or the functionality of the Android mode itself? The idea of your library sounds interesting, keep us posted!

codeanticode avatar May 12 '21 20:05 codeanticode

I agree some updates are needed to keep this part of processing relevant. As much as a may disagree with the direction that people want processing to head in, I also see the potential to create a great fast prototype and deployment platform unrestricted by Android studio.

I am in the process of creating a library to add simple basic functionality, out of the box, ie keyboard text input, gui, with sliders etc and user request prompts. I understand you can use context and to access some android functions but again, it feels like thats a big departure away from processing.

This library will allow users to code to android using processing without having to worry about any android specific code.

@paulgoux this seems to be interesting idea, please keep us posted about the development !

ranaaditya avatar May 12 '21 21:05 ranaaditya

I tried updating some tutorial code to the android website sources here if you haven't reviewed it yet @codeanticode

rupeshkumar22 avatar May 12 '21 22:05 rupeshkumar22

Here is the start of my project. There is more to come. Here is read write and permissions in android. In the following few months I hope to add the rest of Noels examples. This should provide a good basic foundation for most coding projects. Also I'll look into adding serial usb and bluetooth as some have had difficulties with this. Bear in mind that I already have a custom gui with tabs sliders, menus, buttons, dropdowns, windows, file browser, and dock. They are a long way from polished but for now at least allow quick access to sketch variables.

Currently completed:

Camera access camera flash

file write file read image write image load; file browser %90

do bear in mind that it might not yet appear in the fileWriter.jar as I'm migrating some old code, to a new fresh project. Do check in periodically as I will keep updating whenever I can.

Android has a lot of native code and I will also be adding that in as the Android native look and feel will suit them more. If anyone is interested in helping out, it would be greatly appreciated.

https://github.com/EmmanuelPil/Android-java-code-utilities-widgets-for-Processing-for-Android

https://github.com/paulgoux/fileWriter-Android/tree/main/fileWriter

paulgoux avatar May 14 '21 03:05 paulgoux

@paulgoux @eoao the latest release of the mode and core library has been updated to support Android 10 and the AndroidX packages, please confirm if this issue has been solved by the update. Thanks!

Sorry I didnt reply. Yes I've seen it and am making full use of it!

paulgoux avatar May 14 '21 03:05 paulgoux

I tried updating some tutorial code to the android website sources here if you haven't reviewed it yet @codeanticode

I will look at it soon, thank you!

codeanticode avatar May 16 '21 14:05 codeanticode