Skip to content

android studio example crashes at startup #611

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
paulgoux opened this issue Oct 23, 2020 · 14 comments
Closed

android studio example crashes at startup #611

paulgoux opened this issue Oct 23, 2020 · 14 comments
Labels
Milestone

Comments

@paulgoux
Copy link

paulgoux commented Oct 23, 2020

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

@sorrowcode
Copy link

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

@paulgoux
Copy link
Author

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

@codeanticode
Copy link
Contributor

@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 codeanticode added this to the 4.2.1 bugfix milestone Jan 4, 2021
@GENTEK05
Copy link

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() {

    }
}

@rupeshkumar22
Copy link
Contributor

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.

@codeanticode
Copy link
Contributor

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

@paulgoux
Copy link
Author

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.

@codeanticode
Copy link
Contributor

@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!

@ranaaditya
Copy link
Member

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 !

@rupeshkumar22
Copy link
Contributor

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

@paulgoux
Copy link
Author

paulgoux commented May 14, 2021

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
Copy link
Author

@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!

@codeanticode
Copy link
Contributor

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
Copy link
Contributor

Reorganized the project structure in the main branch, to follow more closely the Android standard. It should be enough to import the root folder of the repo to be able to run the sample apps and debug/develop the core, VR, and AR libraries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants