No serial library Processing for smartphone. Help

click the three dots in the top right and choose tools, then add library, then follow the menus.

1 Like

hi how you doing

i did import many libraries before but this looks different

1 Like

click the three dots in the top right

1 Like

For example, here there is a jar file with the same name of the library, but in Android serial Library does not exist


You can just add the jar to android using your pc or downloading using your phone. Apde does allow you to browse.

Three dots>tools>manage library>three dots>install compressed lib

1 Like

I have got this

1 Like

Gotta make sure the lib has a zip extension otherwise not sure how else to help

1 Like

Usually I follow this procedure

  1. If the library is in a ZIP or other type of compressed file, then extract it.
  2. Copy the extracted folder to the libraries folder in the Sketchbook folder and rename it to the desired name of the library., e.g. “path/to/Sketchbook/libraries/Ketai/”.
  3. Ensure that the library JAR file is located in the “library” folder in the library’s folder with the same name as the enclosing folder, e.g. “Ketai/library/Ketai.jar”. Copy any additional JAR files to this folder.
  4. Optionally, ensure that the library’s examples are located in the “examples” folder in the library’s folder, e.g. “Ketai/examples/”.
  5. Optionally, ensure that the “library.properties” file is located at the root of the library’s folder, e.g. “Ketai/library.properties”.
  6. Create a new folder at the same level as the “library” folder with the name “library-dex”, e.g. “Ketai/library-dex/”.
  7. Open APDE and navigate to (action overflow) > Tools > Import Library > Manage Libraries > (action overflow) > DX Dexer. Note: The library should already appear in the list, but it has not been fully installed yet.
  8. In the “Input File” text box, enter the path to the library JAR file, e.g. “path/to/Sketchbook/libraries/Ketai/library/Ketai.jar”. You may use the file select button to aid in locating this file.
  9. In the “Output File” text box, enter the same path as above, but change the “library” folder to “library-dex” and change the library JAR file to " libraryName -dex.jar", e.g. “path/to/Sketchbook/libraries/Ketai/library-dex/Ketai-dex.jar”.
  10. Press the “Dex” button. Wait for the dexing process to complete.
  11. Repeat steps 7 through 10 for any additional library JAR files.
  12. When the dialog closes, the library has been fully installed. It will now be automatically added to any sketch with the import statements at the top.
1 Like

That would appear to be correct, not sure what else to suggest if that fails though

1 Like

@paulgoux

thanks for your response :heart: :heart: :heart:

2 Likes

@ZENAR57

i think you do not need to generate this tow files they are already existing in the library it self you need to modify them

here is the location on window

libraries\AndroidSerial\usbSerialExamples\src\main
libraries\AndroidSerial\usbSerialExamples\src\main\res\xml

here is the location on android


modify?
everything inside the files is correct.
I have seen these files in libraries, but when programming in android I do not see any use of information from these files. I can break the actually created apk of the project, see what’s inside, and see the real manifest. (APKEditor)

@ZENAR57

how did you import the serial library to APDE

1 Like

The manifest is required to inform android about the activities present in the sketch and other things. The code inside can get a lot more involved especially as you can use it to create buttons a gui elements.

A beginners guide in android is a good place to start and if you can wrap youre head around intent context fragment and activity it will deffo help.

However most of this is somewhat unecessary, most of the android code ive put together makes use of these things yet i do not know 100% what things go where, and have found that appying simple programming logic about variables and methods leads to something that will work.

In any case youll always need an xml file to pass info to your main activity.

3 Likes

@ZENAR57 which one you download

@paulgoux you are true but the serial library has unclear documentation

what this mean if you can explain to me and how to do it

Add jitpack.io repository to your root build.gradle:

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

and this what is it and how to do it

Add library to dependencies

dependencies {
    implementation 'com.github.mik3y:usb-serial-for-android:3.3.1'
}
1 Like

these are my files, downloaded from GitHub for a long time

@ZENAR57 give me the link of it

1 Like