Я разрабатываю приложение Android Inventory в Kotlin для устройств Zebra TC21, и я хотел бы настроить профиль DataWedge Proplymally. Мне нужно сканировать QR -коды с помощью интегрированного сканера, и RFID -теги с Zebra RFD4031. Я бы хотел, чтобы отсканированные данные были переданы «выводом намерений» в режиме вещания. Я также хочу, чтобы «вывод клавиши» отключил.class DatawedgeConfig {
val baseConfig = createBaseConfig()
fun initialize(context: Context) {
try {
createProfile(context)
configureProfile(context)
configureInput(context)
configureOutput(context)
Log.d("DatawedgeConfig", "DataWedge initialized successfully")
} catch (e: Exception) {
Log.e("DatawedgeConfig", "Error initializing DataWedge", e)
}
}
private fun createBaseConfig(): Bundle {
return Bundle().apply {
putString("PROFILE_NAME", DATAWEDGE_PROFILE_NAME)
putString("PROFILE_ENABLED", "true")
putString("CONFIG_MODE", "UPDATE")
}
}
fun createProfile(context: Context) {
val intent = Intent()
intent.action = "com.symbol.datawedge.api.ACTION"
intent.putExtra("com.symbol.datawedge.api.CREATE_PROFILE", DATAWEDGE_PROFILE_NAME)
try {
context.sendBroadcast(intent)
Log.d("DatawedgeConfig", "Profile created successfully")
} catch (e: Exception) {
Log.e("DatawedgeConfig", "Error creating profile", e)
}
}
fun configureProfile(context: Context) {
val intent = Intent()
intent.action = "com.symbol.datawedge.api.ACTION"
intent.putExtra("com.symbol.datawedge.api.SET_CONFIG", Bundle().apply {
baseConfig.putParcelableArray("APP_LIST", arrayOf(Bundle().apply {
putString("PACKAGE_NAME", context.packageName)
putStringArray("ACTIVITY_LIST", arrayOf("*"))
}))
})
Log.d("DataWedgeConfig", "Configuring profile: $baseConfig")
try {
context.sendBroadcast(intent)
Log.d("DatawedgeConfig", "Profile configured successfully (PACKAGE_NAME : ${context.packageName})")
} catch (e: Exception) {
Log.e("DatawedgeConfig", "Error configuring profile", e)
}
}
fun configureInput(context: Context) {
val intent = Intent()
intent.action = "com.symbol.datawedge.api.ACTION"
intent.putExtra("com.symbol.datawedge.api.SET_CONFIG", Bundle().apply {
baseConfig.putParcelableArray("PLUGIN_CONFIG", arrayOf(Bundle().apply {
putString("PLUGIN_NAME", "BARCODE")
putString("RESET_CONFIG", "true")
putBundle("PARAM_LIST", Bundle().apply {
putString("scanner_selection", "auto")
putString("decoder_rfid", "true")
putString("decoder_qr_code", "true")
})
}))
})
try {
context.sendBroadcast(intent)
Log.d("DatawedgeConfig", "Input configured successfully")
} catch (e: Exception) {
Log.e("DatawedgeConfig", "Error configuring input", e)
}
}
fun configureOutput(context: Context) {
val intent = Intent()
intent.action = "com.symbol.datawedge.api.ACTION"
intent.putExtra("com.symbol.datawedge.api.SET_CONFIG", Bundle().apply {
baseConfig.putParcelableArray("PLUGIN_CONFIG", arrayOf(Bundle().apply {
putString("PLUGIN_NAME", "INTENT")
putString("RESET_CONFIG", "true")
putBundle("PARAM_LIST", Bundle().apply {
putString("intent_output_enabled", "true")
putString("intent_action", DATAWEDGE_ACTION)
putString("intent_delivery", "2")
})
}))
})
try {
context.sendBroadcast(intent)
Log.d("DatawedgeConfig", "Output configured successfully")
} catch (e: Exception) {
Log.e("DatawedgeConfig", "Error configuring output", e)
}
}
}
< /code>
Профиль фактически создается, если его не существует, но ни один из параметров в пакете "set_config" не является. Таким образом, мое приложение не связано с созданным профилем, и вывод намерений не не включен и не настроен с данными значениями.
Я не понимаю, почему. < /P>
Подробнее здесь: https://stackoverflow.com/questions/792 ... android-ko
Как настроить профиль datawedge Zebra TC21 в приложении Android Kotlin? ⇐ Android
Форум для тех, кто программирует под Android
1756722611
Anonymous
Я разрабатываю приложение Android Inventory в Kotlin для устройств Zebra TC21, и я хотел бы настроить профиль DataWedge Proplymally. Мне нужно сканировать QR -коды с помощью интегрированного сканера, и RFID -теги с Zebra RFD4031. Я бы хотел, чтобы отсканированные данные были переданы «выводом намерений» в режиме вещания. Я также хочу, чтобы «вывод клавиши» отключил.class DatawedgeConfig {
val baseConfig = createBaseConfig()
fun initialize(context: Context) {
try {
createProfile(context)
configureProfile(context)
configureInput(context)
configureOutput(context)
Log.d("DatawedgeConfig", "DataWedge initialized successfully")
} catch (e: Exception) {
Log.e("DatawedgeConfig", "Error initializing DataWedge", e)
}
}
private fun createBaseConfig(): Bundle {
return Bundle().apply {
putString("PROFILE_NAME", DATAWEDGE_PROFILE_NAME)
putString("PROFILE_ENABLED", "true")
putString("CONFIG_MODE", "UPDATE")
}
}
fun createProfile(context: Context) {
val intent = Intent()
intent.action = "com.symbol.datawedge.api.ACTION"
intent.putExtra("com.symbol.datawedge.api.CREATE_PROFILE", DATAWEDGE_PROFILE_NAME)
try {
context.sendBroadcast(intent)
Log.d("DatawedgeConfig", "Profile created successfully")
} catch (e: Exception) {
Log.e("DatawedgeConfig", "Error creating profile", e)
}
}
fun configureProfile(context: Context) {
val intent = Intent()
intent.action = "com.symbol.datawedge.api.ACTION"
intent.putExtra("com.symbol.datawedge.api.SET_CONFIG", Bundle().apply {
baseConfig.putParcelableArray("APP_LIST", arrayOf(Bundle().apply {
putString("PACKAGE_NAME", context.packageName)
putStringArray("ACTIVITY_LIST", arrayOf("*"))
}))
})
Log.d("DataWedgeConfig", "Configuring profile: $baseConfig")
try {
context.sendBroadcast(intent)
Log.d("DatawedgeConfig", "Profile configured successfully (PACKAGE_NAME : ${context.packageName})")
} catch (e: Exception) {
Log.e("DatawedgeConfig", "Error configuring profile", e)
}
}
fun configureInput(context: Context) {
val intent = Intent()
intent.action = "com.symbol.datawedge.api.ACTION"
intent.putExtra("com.symbol.datawedge.api.SET_CONFIG", Bundle().apply {
baseConfig.putParcelableArray("PLUGIN_CONFIG", arrayOf(Bundle().apply {
putString("PLUGIN_NAME", "BARCODE")
putString("RESET_CONFIG", "true")
putBundle("PARAM_LIST", Bundle().apply {
putString("scanner_selection", "auto")
putString("decoder_rfid", "true")
putString("decoder_qr_code", "true")
})
}))
})
try {
context.sendBroadcast(intent)
Log.d("DatawedgeConfig", "Input configured successfully")
} catch (e: Exception) {
Log.e("DatawedgeConfig", "Error configuring input", e)
}
}
fun configureOutput(context: Context) {
val intent = Intent()
intent.action = "com.symbol.datawedge.api.ACTION"
intent.putExtra("com.symbol.datawedge.api.SET_CONFIG", Bundle().apply {
baseConfig.putParcelableArray("PLUGIN_CONFIG", arrayOf(Bundle().apply {
putString("PLUGIN_NAME", "INTENT")
putString("RESET_CONFIG", "true")
putBundle("PARAM_LIST", Bundle().apply {
putString("intent_output_enabled", "true")
putString("intent_action", DATAWEDGE_ACTION)
putString("intent_delivery", "2")
})
}))
})
try {
context.sendBroadcast(intent)
Log.d("DatawedgeConfig", "Output configured successfully")
} catch (e: Exception) {
Log.e("DatawedgeConfig", "Error configuring output", e)
}
}
}
< /code>
Профиль фактически создается, если его не существует, но ни один из параметров в пакете "set_config" не является. Таким образом, мое приложение не связано с созданным профилем, и вывод намерений не не включен и не настроен с данными значениями.
Я не понимаю, почему. < /P>
Подробнее здесь: [url]https://stackoverflow.com/questions/79208150/how-to-configure-a-zebra-tc21-datawedge-profile-programatically-in-an-android-ko[/url]
Ответить
1 сообщение
• Страница 1 из 1
Перейти
- Кемерово-IT
- ↳ Javascript
- ↳ C#
- ↳ JAVA
- ↳ Elasticsearch aggregation
- ↳ Python
- ↳ Php
- ↳ Android
- ↳ Html
- ↳ Jquery
- ↳ C++
- ↳ IOS
- ↳ CSS
- ↳ Excel
- ↳ Linux
- ↳ Apache
- ↳ MySql
- Детский мир
- Для души
- ↳ Музыкальные инструменты даром
- ↳ Печатная продукция даром
- Внешняя красота и здоровье
- ↳ Одежда и обувь для взрослых даром
- ↳ Товары для здоровья
- ↳ Физкультура и спорт
- Техника - даром!
- ↳ Автомобилистам
- ↳ Компьютерная техника
- ↳ Плиты: газовые и электрические
- ↳ Холодильники
- ↳ Стиральные машины
- ↳ Телевизоры
- ↳ Телефоны, смартфоны, плашеты
- ↳ Швейные машинки
- ↳ Прочая электроника и техника
- ↳ Фототехника
- Ремонт и интерьер
- ↳ Стройматериалы, инструмент
- ↳ Мебель и предметы интерьера даром
- ↳ Cантехника
- Другие темы
- ↳ Разное даром
- ↳ Давай меняться!
- ↳ Отдам\возьму за копеечку
- ↳ Работа и подработка в Кемерове
- ↳ Давай с тобой поговорим...
Мобильная версия