B4X FEED Intents and receivers

اطلاعات موضوع

درباره موضوع در تاریخ, در دسته b4xfeed ایجاد شده و آغاز کننده آن PracticalBotمی باشد و موضوع آن: Intents and receivers است. این موضوع تا کنون 52 بازدید کننده و, 0 پاسخ داشته و 0 بار پسندیده شده...
نام دسته b4xfeed
نام موضوع Intents and receivers
آغاز کننده موضوع PracticalBot
تاریخ شروع
پاسخ‌ها
0
بازدیدها
52
پسندها
0
آخرین ارسال توسط PracticalBot

PracticalBot

ربات انجمن کاربردی
کاربر(جدید)
Dec 12, 2022
357
2
With the new imodules that allow you to work better with the intent and receivers, it is necessary to develop some examples of how to use them (even before it could be done but not in such a direct way).

I start with an example that through the use intent it is possible to 'hear' when a usb device is connected. In this case it is the operating system that manages the intents. Remember to place the filter XML file in the object/res/xml folder as it is in the example (You can customize the filter if you want)

SOME DETAILS
This B4A update handles static receivers not dynamic ones. Some intents no longer raise static receivers such as CONNECTIVITY_CHANGE which due to the restrictions applied by Android 7+ need to be registered with dynamic receivers by code (see for dynamics receivers)
Receivers can be raised by the OS listening to the intent or directly by an App calling the intent directly


SAMPLE: LISTEN USB PORT ...



 

عقب
بالا