עזרה באנדרואיד
-
מהמניפסט אין לי בעיה:
<activity android:name=".MainActivity"> <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" /> <action android:name="android.hardware.usb.action.USB_ACCESSORY_ATTACHED" /> </intent-filter> </activity>הקוד לא רלוונטי לדעתי. כי זה קוד של יצרן חומרה כלשהו. (מתאם RS232 ל USB).
זה משהו שיעבוד ספציפי עם חומרה מסויימת.אבל כל קוד שניגש ל- USB, יהיה מתאים.
אין לי קוד כזה. אנסה לחפש משהו. -
זה אולי קוד רלוונטי (של מוצר אחר לא קשור אבל הרעיון הוא אותו רעיון):
https://sdgsystems.com/blog/android-usb-permissionsאני מצטט:
Suppose we’re writing a device driver for a USB device, implemented as an Android Service. Our driver checks to see if it has permission to access the device. If it doesn’t, it calls UsbManager.requestPermission, and a window like this pops up:
We click “Use by default for this USB device” and press “OK”. Here’s what Android did in response: Android gave our app temporary permission to access the USB device by updating UsbUserSettingsManager.mDevicePermissionMap. Android saved our app’s package name and the USB device’s information in the file “/data/system/users/0/usb_device_manager.xml”. Now, if we reboot the Android device, we would expect Android to repopulate UsbUserSettingsManager.mDevicePermissionMap by reading the “usb_device_manager.xml” file for each user. But does it do this? No. Here’s what really happens. -
זה אולי קוד רלוונטי (של מוצר אחר לא קשור אבל הרעיון הוא אותו רעיון):
https://sdgsystems.com/blog/android-usb-permissionsאני מצטט:
Suppose we’re writing a device driver for a USB device, implemented as an Android Service. Our driver checks to see if it has permission to access the device. If it doesn’t, it calls UsbManager.requestPermission, and a window like this pops up:
We click “Use by default for this USB device” and press “OK”. Here’s what Android did in response: Android gave our app temporary permission to access the USB device by updating UsbUserSettingsManager.mDevicePermissionMap. Android saved our app’s package name and the USB device’s information in the file “/data/system/users/0/usb_device_manager.xml”. Now, if we reboot the Android device, we would expect Android to repopulate UsbUserSettingsManager.mDevicePermissionMap by reading the “usb_device_manager.xml” file for each user. But does it do this? No. Here’s what really happens. -
@מנצפך >נסה למצוא את קוד המקור של האפליקציה הזאת https://play.google.com/store/apps/details?id=com.jrummy.root.browserfree
שלום! נראה שהשיחה הזו מעניינת אותך, אבל עדיין אין לך חשבון.
נמאס לכם לגלול בין אותם הפוסטים בכל ביקור? כשנרשמים לחשבון, תמיד תחזרו בדיוק למקום שבו הייתם קודם, ותוכלו לבחור לקבל התראות על תגובות חדשות (בין אם במייל, ובין אם בהתראת פוש). תוכלו גם לשמור סימניות ולפרגן ב-upvote לפוסטים כדי להביע הערכה לחברי קהילה אחרים.
בעזרת התרומה שלך, הפוסט הזה יכול להיות אפילו טוב יותר 💗
הרשמה התחברות