Android Question USB serial port permision dialog every start up

Discussion in 'Android Questions' started by Diego Marcelo Croatto, Oct 10, 2018.

  1. Diego Marcelo Croatto

    Diego Marcelo Croatto Member Licensed User

    Hi... how to skip the USB serial port permission dialog at every start up or reboot? (see image). Thank's
     

    Attached Files:

  2. DonManfred

    DonManfred Expert Licensed User

    Mark the chekbox when accepting the dialog?
     
  3. Diego Marcelo Croatto

    Diego Marcelo Croatto Member Licensed User

    o_O Im working in automated task... without intervention of human brain :rolleyes: ... get a serial data when system startup
     
  4. DonManfred

    DonManfred Expert Licensed User

    Answer the question once and chevk the checkbox.
    Your app should be the default then and you do not need to answer again. Or not?
     
  5. Diego Marcelo Croatto

    Diego Marcelo Croatto Member Licensed User

    Of course, but when power on or restarting the tablet, it asks again for the USB permissions when starting the program.
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    Have you added the USB device definition to the manifest editor?
     
  7. Diego Marcelo Croatto

    Diego Marcelo Croatto Member Licensed User

    Yes Erel I copy this from UsbSerialDemo example...

    AddActivityText(main, <intent-filter>
    <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" />)

    but a compiler error shows... i check the libraries... and dont know what is it!

    B4A version: 7.01
    Parsing code. (0.00s)
    Compiling code. (0.02s)
    Compiling layouts code. (0.00s)
    Organizing libraries. (0.00s)
    Generating R file. Error
    AndroidManifest.xml:31: error: Error: No resource found that matches the given name (at 'resource' with value '@xml/device_filter').

    Thank's
     
  8. DonManfred

    DonManfred Expert Licensed User

    did you added the device_filter.xml in the xml folder of the resources?
     
    Erel likes this.
  9. Diego Marcelo Croatto

    Diego Marcelo Croatto Member Licensed User

    Yes ok... a file in "res" folder.... Thank's a lot.... Don and Erel...;)
     
  10. DonManfred

    DonManfred Expert Licensed User

  11. Diego Marcelo Croatto

    Diego Marcelo Croatto Member Licensed User

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice