No serial library Processing for smartphone. Help

1 Like

https://forum.processing.org/two/discussion/17375/android-processing-app-crashes-when-using-usb-processing-serial-library-serial-list-this-probs

1 Like

http://arduino.ru/forum/processing/processing-na-planshete

1 Like

Thank you so much. I will teach and understand everywhere.
thank_you

fails to initialize.

everything works at the terminal, the data goes. cable is connected!
at the same time, on the APDE problem

port = new Serial(this,Serial.list(this)[0],57600);// causes crash start if icommented out this string, it is not destroyed at startup

copilation-OK
scratch_one-s_head

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