APDE USB / OTG communication

@ZENAR57 i am trying but i have some health issue

the library needs files organization the structure of it is not like other libraries i try 1 file but did not know how or where to move it

1 Like

1 Like

Have you also had a coronavirus?
I will not torture you. Answer when you feel good!

I do not know either. I thought @paulgoux knew.
I have a lot of them.

You are afraid that it will infect you, :kissing_heart: :kissing_heart: :kissing_heart: :kissing_heart: :kissing_heart: :kissing_heart: no not the Coronavirus

it is toothache and swollen face causing difficult to read

1 Like

I have already been ill twice that year and this year.

I suggest you pause and continue in a few days!

@ZENAR57 this is the library i am using 0.1.0-alpha

download it and use the dx dexer 3 times once for each jar file there is 3 jar files inside it

now you have correct library and working examples make the steps glv said to you

1 Like



1 Like

when you download the library keep name of it AndroidSerial

even the library shown without doing dx dexer it wont work you have to make dx dexer for the 3 jar files

1 Like

Yes.
three days ago.
not working.
crash programs.
0-1-0_alpha

import org.slf4j.*;
import org.slf4j.helpers.*;
import com.yourinventit.processing.android.serial.*;
import com.hoho.android.usbserial.util.*;
import org.slf4j.spi.*;
import com.hoho.android.usbserial.driver.*;
import org.slf4j.impl.*;

Serial port;
 float val = 0;
 int temp=1;
 void setup() {
 size(800,800);
 background(0,100,0);
 
 
 delay(4000);

 if (Serial.list(this)[0] ==null){temp=0;}
 
 
 //port = new Serial(this,Serial.list(this)[0],57600);
 //port.bufferUntil('\n');
 
 }
 void draw() {
 
 if (Serial.list(this)[0] ==null){temp=0;}
 fill(0, 250,50);
 ellipse(40,40,70,70);
 fill(255, 50,50);
 text(temp, 300,300);
 //text(received, 100,200);
 }
 /*
 void serialEvent(Serial port) {
 val = float (port.readStringUntil ('\n'));
 
 if ( port.available() > 0) { // если есть данные, 
 received = port.readStringUntil('\n'); // считываем данные } println(received); //о��ображаем данные
 
 }
 
 }*/

since in the function "setup " you can’t draw, I had to insert for clarity and understanding delay (4000); , it can be clearly seen in the video.

NO ELLIPSE!

@ZENAR57
this means that no issue with the library

1 Like

@ZENAR57 one of the versions gives you this when you import it like this one 0.1.0-alpha this works with pc do not use it

import com.yourinventit.processing.android.serial.*;

use the version which gives you this when import it

io.inventit.processing.android.serial

and make once again dx dexer 3 times once for each jar file there is 3 jar files inside it

1 Like

@ZENAR57 now the library sure working and you have examples and the error massage confirms that the issue in the manifest i mean my sketch

here is it 0.2.0

update 26/5/21

this issue APDE USB / OTG communication makes all stop at this point

  • if something is plugged
  • if a use-feature tag pointing at USB.HOST was inserted in the android manifest

try glv method that is what you can do every thing now is to manifest modify

The execution of arduino-Firmata samples, slightly modifies to adapt to android-serial lib constraints (use of Serial.list(this) instead of Arduino.list()), leads to a crash and the closure of the activity if an Arduino with standardfirmata is connected to the USB

if nothing is connected you get a warning asking to check

  • if something is plugged
  • if a use-feature tag pointing at USB.HOST was inserted in the android manifest
  • if something is plugged
  • if a use-feature tag pointing at USB.HOST was inserted in the android manifest
  • if something is plugged
  • if a use-feature tag pointing at USB.HOST was inserted in the android manifest
  • if something is plugged
  • if a use-feature tag pointing at USB.HOST was inserted in the android manifest

This seems to be possible to correct through the insertion, in the Manifest, of the “use-feature” tag mentioned above and pointing at USB.HOST port. Unfortunately, this is not possible with APDE since the manifest is re-generated from the sketch properties at build time
Tested (KO) on

  • Android 5.1 /APDE 0.51
  • Android 6/APDE 0.51
    Is there a known workaround?

Impossible to grant access to USB port through AndroidManifest · Issue #84 · Calsign/APDE · GitHub

1 Like

@jafal
Yes. I tried the 0_2_0 library, I didn’t like it - the program selection window disappeared when usb was connected.
But you have more experience, so I think you are right about 0_2_0. I need to completely uninstall APDEV5.1 (it interacts very badly with libraries) and try neighboring versions. I also found a person who understands libraries, but he is very busy with his project, I need to wait until he is free, maybe he can tell me how I can convert any inappropriate to the correct format.
Rest, get well, health is more expensive than computer technology.

This is the link if you would like to make a lib for android, you also then need to make use of eclipse to compile them.

In order to get it running you need to amend the files in the resources folder, and you need to rename the project.txt file in the first folder, to “.project”. This file also needs to be opened and amended.

For guidance change anything that says fileWriter with the name you want to give your library.

In build.properties
change these two lines
Make sure this is pointing to the correct location
sketchbook.location=${user.home}/Documents/Processing

Point to where you want your folder to be, then add project name and lib
classpath.local.location=D:/current workSpace/fileWriter/lib

allso make sure this is correct
classpath.libraries.location=${user.home}/Documents/Processing/libraries

this file also has other instance of the project name which need to be changed to your own project name.

and make sure you add the android jar file found in the android studio sdk location, I’m currently using api 30.

Do understand that my understanding of java is still very limited so I can only make simple changes to libraries.
I unfortunately cannot help much further than this, again hardware restrictions.

1 Like

Just like to make it clear that I am happy to help, however I’m a hardware constrained and also this thread is tedious to read, I asked that we start a new thread so that we could keep it consice and on topic, and here we are 135 messages later and we still dont seem to be reaching our goal.

Please keep you responses appropriate to the thread, a lot of responses have offered info on completing the process from a pc, which is not what OP stipulated, and is therefore irrelevant for this thread, and will likely add to more confusion.

And also when you can please do provide an answer especially if it can limit the amount of messages we need to send to get to the conclusion.

The question which Lib should be used was asked many times and seemingly ignored which I’m sure is frustrating.

So please keep your communications concise and to the point, otherwise anyone who wants to add or follow the thread will have a difficult time.

2 Likes

@paulgoux
For some reason, someone forbade me to edit my first post on this thread. I took your words into account in the previous topic and created a big first post specifically for this, to make it convenient. but now I cannot edit, but the truth is now I have to read the topic for a long time and tediously. (can anyone help me access my post?)

We have all come a long way and have done a lot, I think that in 36 ± 12 hours there will be a victory.
I left APDE 5.1 ​​and installed a different version, it got better, I saw my USB list, but new obstacles. I go to victory at the speed of a pregnant turtle, but I do not stop. This topic will be closed very soon.
Now the problem is the same as at the very beginning of the first topic, namely a viable, working, installable library for APDE.
For all other problems, a solution or workaround has been found.

Eclipse installing on android system, on a smartphone?

Eclipse is pc only unfortunately, which is why i was confused with your request.

1 Like