No serial library Processing for smartphone. Help

@ZENAR57

hi try to enable all permissions

1 Like

have you made this ???

First we have to change the AndroidManifest.xml in the project root:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package=""
          android:versionCode="1"
          android:versionName="1.0">
  <uses-sdk android:minSdkVersion="10" />
  <application android:label=""
               android:icon="@drawable/icon"
               android:debuggable="true">
    <activity android:name="">
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
        <action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
      </intent-filter>
      <meta-data
          android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
          android:resource="@xml/device_filter" />
    </activity>
  </application>
</manifest>

The blue marked lines must be added to your AndroidManifest.xml. This is not well documented in the pages of the processing lib, this info can be found on the pages of the "usb-serial-for-android" project.
And we have to add a file to

{processing project root}\res\xml

Filename: device_filter.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!-- 0x0403 / 0x6001: FTDI FT232R UART -->
    <usb-device vendor-id="1027" product-id="24577" />

    <!-- 0x2341 / Arduino -->
    <usb-device vendor-id="9025" />

    <!-- 0x16C0 / 0x0483: Teensyduino -->
    <usb-device vendor-id="5824" product-id="1155" />

    <!-- 0x10C4 / 0xEA60: CP210x UART Bridge -->
    <usb-device vender-id="4292" product-id="60000" />
   
</resources>

This file informs the application which serial adapters can start the application. The file and more info you can find here:

which is in this link ?

1 Like

not. I’m not that advanced.
I didn’t think of a manifesto.
I’ll try later, your code at night.
thank_you

Hi, you have to make quite some adjustments. Follow these instruction:

You’re AndroidManifest.xml must be correct and you need a device_filter.xml (with the correct Arduino). There’s lot of information available, just search for it.

1 Like
1 Like
1 Like

thank_you

I read everything, everything is clear, except for one.
I can’t find the files themselves, I’ve searched everything. Do you need Ruth on your phone? if yes, then I do not have a root.
af5ade365c136188a3da5a13baf396a5


All? All All?
3d5bf1461f0814e1bbf352b1355de1f0

on windows processing android mode just press ctrl+k this take you to this folder

then click on

AndroidManifest takes you here

1 Like

I haven’t had a computer in years!

maybe I was wrong again and wrote in the wrong forum thread? I came here from the library theme to make it clear and unambiguous.

Screenshot_20210508_124835

I read everything, everything is clear what needs to be done. But since I did not find a simple manifest file in the project folder, I decided to postpone what is written there until the very last moment, since it seems to me it will be very difficult.

android usb serial lib crashing app

precociousmouseprecociousmouse

December 2016 edited December 2016 in Android Mode

Hi all! Another day, another question - I am building an app that takes the content of sms and pushes it through to an arduino using the android usb serial lib here:

I am running the app on a pixel xl running nougat 7.1.1, and using the usb otg adapter to connect to an arduino uno. I have modified the manifest xml, and added in the device filter xml (ensuring that it includes the uno device id) but when I run the app it throws this error:

"Processing-Android USB Serial ERROR

Port: null Check the following items: 1. Make sure AndroidManifest.xml contains use-feature tag for android.hardware.usb.host 2. USB Serial is connected to the device"

I have checked that the manifest has the use-feature tag, and the usb cable is plugged in and supplying power to the arduino, but if I plug the cable in before starting the app, or plugging it in after the app has started, or even plugging it in before, then unplugging it when the error shows and replugging - it always throws the same error and closes when I close the dialogue.

I was wondering whether the android manifest requirements have changed since the release of nougat but that doesn’t seem to be the case. Does anyone have any ideas why this could be causing a problem?

1 Like



1 Like

Okay, just try to add. to this folder. both files.


you misunderstand me my last photos is just to show you how to locate AndroidManifest.xml and open it

1 Like

the AndroidManifest.xml in my photo refers to my own sketch each sketch got its own AndroidManifest.xml file

1 Like

modify this 2 files

with this 2 files

First we have to change the AndroidManifest.xml in the project root:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
         package=""
         android:versionCode="1"
         android:versionName="1.0">
 <uses-sdk android:minSdkVersion="10" />
 <application android:label=""
              android:icon="@drawable/icon"
              android:debuggable="true">
   <activity android:name="">
     <intent-filter>
       <action android:name="android.intent.action.MAIN" />
       <category android:name="android.intent.category.LAUNCHER" />
       <action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
     </intent-filter>
     <meta-data
         android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
         android:resource="@xml/device_filter" />
   </activity>
 </application>
</manifest>

The blue marked lines must be added to your AndroidManifest.xml. This is not well documented in the pages of the processing lib, this info can be found on the pages of the "usb-serial-for-android" project.
And we have to add a file to

{processing project root}\res\xml

Filename: device_filter.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
   <!-- 0x0403 / 0x6001: FTDI FT232R UART -->
   <usb-device vendor-id="1027" product-id="24577" />

   <!-- 0x2341 / Arduino -->
   <usb-device vendor-id="9025" />

   <!-- 0x16C0 / 0x0483: Teensyduino -->
   <usb-device vendor-id="5824" product-id="1155" />

   <!-- 0x10C4 / 0xEA60: CP210x UART Bridge -->
   <usb-device vender-id="4292" product-id="60000" />
  
</resources>

This file informs the application which serial adapters can start the application. The file and more info you can find here:

as this link instructions

1 Like

I can find absolutely any file on any device, if I have access to it and I do not need root rights.
A global search of the entire disk returned no results.

I created these two files manually, they weren’t there! but when building the APK it didn’t give any results. I then extracted apk, broke it and looked at the manifest.