שיעורים מקוננים |
---|
enum | Sl4aBluetoothUtil.BluetoothAccessLevel Enums עבור רמת הגישה למכשיר Bluetooth אשר מבוססים על BluetoothDevice.java |
enum | Sl4aBluetoothUtil.BluetoothConnectionState Enums עבור מדינות חיבור Bluetooth אשר מבוססים על BluetoothProfile.java |
enum | Sl4aBluetoothUtil.BluetoothPriorityLevel Enums עבור רמת עדיפות פרופיל Bluetooth אשר מבוססים על BluetoothProfile.java |
enum | Sl4aBluetoothUtil.BluetoothProfile Enums עבור פרופילי Bluetooth אשר מבוססים על BluetoothProfile.java |
שיטות ציבוריות |
---|
boolean | changeProfileAccessPermission (ITestDevice primary, ITestDevice secondary, Sl4aBluetoothUtil.BluetoothProfile profile, Sl4aBluetoothUtil.BluetoothAccessLevel access) שנה הרשאת גישה לפרופיל Bluetooth של המכשיר המשני במכשיר הראשי על מנת שהמכשיר המשני יגיע למכשיר הראשי בפרופיל הנתון |
boolean | connect (ITestDevice primary, ITestDevice secondary, profiles) connect (ITestDevice primary, ITestDevice secondary, profiles) חבר את המכשיר הראשי למכשיר המשני בפרופילי Bluetooth נתונים |
boolean | disable (ITestDevice device) השבת את Bluetooth במכשיר היעד |
boolean | disableBluetoothSnoopLog (ITestDevice device) השבת את יומן ה- snoop של Bluetooth |
boolean | disconnect (ITestDevice primary, ITestDevice secondary, profiles) disconnect (ITestDevice primary, ITestDevice secondary, profiles) נתק את המכשיר הראשי מהמכשיר המשני |
boolean | enable (ITestDevice device) אפשר Bluetooth במכשיר היעד |
boolean | enableBluetoothSnoopLog (ITestDevice device) אפשר יומן סנאפ Bluetooth |
String | getAddress (ITestDevice device) קבל את כתובת ה- MAC של Bluetooth של מכשיר היעד |
| getBondedDevices (ITestDevice device) קבל סט של כתובות MAC של Bluetooth של ההתקנים המחוברים (המשויכים) בהתקן היעד |
boolean | pair (ITestDevice primary, ITestDevice secondary) התקן מכשיר ראשי למכשיר משני |
void | setBtConnectionTimeout (Duration timeout) |
void | setBtPairTimeout (Duration timeout) |
boolean | setProfilePriority (ITestDevice primary, ITestDevice secondary, profiles, Sl4aBluetoothUtil.BluetoothPriorityLevel priority) setProfilePriority (ITestDevice primary, ITestDevice secondary, profiles, Sl4aBluetoothUtil.BluetoothPriorityLevel priority) שנה את הגדרת העדיפות של הפרופילים שניתנו במכשיר הראשי כלפי מכשיר משני |
void | startSl4a (ITestDevice device, File sl4aApkFile) הפעל במפורש את לקוח SL4A עם המכשיר הנתון וקובץ ה- apk SL4A. |
void | stopSl4a () עצור את לקוחות SL4A שכבר נפתחו. |
boolean | unpairAll (ITestDevice device) בטל את התאמת כל ההתקנים המשויכים למכשיר הנוכחי |
שיטות מוגנות |
---|
void | finalize () נקה את כל חיבורי SL4A |
בוני ציבור
Sl4a BluetoothUtil
public Sl4aBluetoothUtil ()
שיטות ציבוריות
changeProfileAccessPermission
public boolean changeProfileAccessPermission (ITestDevice primary,
ITestDevice secondary,
Sl4aBluetoothUtil.BluetoothProfile profile,
Sl4aBluetoothUtil.BluetoothAccessLevel access)
שנה הרשאת גישה לפרופיל Bluetooth של המכשיר המשני במכשיר הראשי על מנת שהמכשיר המשני יגיע למכשיר הראשי בפרופיל הנתון
פרמטרים |
---|
primary | ITestDevice : מכשיר רשות שינוי |
secondary | ITestDevice : התקן שניגש מכשיר עיקרי על הפרופיל הנבחר |
profile | Sl4aBluetoothUtil.BluetoothProfile : פרופיל Bluetooth גישה |
access | Sl4aBluetoothUtil.BluetoothAccessLevel : רמת הגישה, לראות BluetoothAccessLevel |
החזרות |
---|
boolean | נכון אם ההרשאה השתנתה בהצלחה |
זורק |
---|
DeviceNotAvailableException | |
לְחַבֵּר
public boolean connect (ITestDevice primary,
ITestDevice secondary,
profiles)
חבר את המכשיר הראשי למכשיר המשני בפרופילי Bluetooth נתונים
פרמטרים |
---|
primary | ITestDevice : מכשיר לחיבור מ |
secondary | ITestDevice : מכשיר להתחבר |
profiles | : יש צורך בחיבור קבוצה של פרופילי Bluetooth |
החזרות |
---|
boolean | נכון אם החיבור מצליח |
זורק |
---|
DeviceNotAvailableException | |
להשבית
public boolean disable (ITestDevice device)
השבת את Bluetooth במכשיר היעד
פרמטרים |
---|
device | ITestDevice : מכשיר היעד |
החזרות |
---|
boolean | נכון אם Bluetooth מושבת בהצלחה |
זורק |
---|
DeviceNotAvailableException | |
השבת BluetoothSnoopLog
public boolean disableBluetoothSnoopLog (ITestDevice device)
השבת את יומן ה- snoop של Bluetooth
פרמטרים |
---|
device | ITestDevice : אל יומן סנופ להשבית |
החזרות |
---|
boolean | נכון אם הושבת בהצלחה |
זורק |
---|
DeviceNotAvailableException | |
לְנַתֵק
public boolean disconnect (ITestDevice primary,
ITestDevice secondary,
profiles)
נתק את המכשיר הראשי מהמכשיר המשני
פרמטרים |
---|
primary | ITestDevice : מכשיר לביצוע הניתוק במבצע |
secondary | ITestDevice : המכשיר ינותק |
profiles | : נתון של פרופילי Bluetooth נתון נדרש לנתק |
החזרות |
---|
boolean | נכון אם נותק בהצלחה |
זורק |
---|
DeviceNotAvailableException | |
לְאַפשֵׁר
public boolean enable (ITestDevice device)
אפשר Bluetooth במכשיר היעד
פרמטרים |
---|
device | ITestDevice : מכשיר היעד |
החזרות |
---|
boolean | נכון אם Bluetooth הופעל בהצלחה |
זורק |
---|
DeviceNotAvailableException | |
אפשר BluetoothSnoopLog
public boolean enableBluetoothSnoopLog (ITestDevice device)
אפשר יומן סנאפ Bluetooth
פרמטרים |
---|
device | ITestDevice : לאפשר יומן סנופ |
החזרות |
---|
boolean | נכון אם הופעל בהצלחה |
זורק |
---|
DeviceNotAvailableException | |
getAddress
public String getAddress (ITestDevice device)
קבל את כתובת ה- MAC של Bluetooth של מכשיר היעד
פרמטרים |
---|
device | ITestDevice : מכשיר היעד |
החזרות |
---|
String | מחרוזת כתובת MAC |
זורק |
---|
DeviceNotAvailableException | |
getBondedDevices
public getBondedDevices (ITestDevice device)
קבל סט של כתובות MAC של Bluetooth של ההתקנים המחוברים (המשויכים) בהתקן היעד
פרמטרים |
---|
device | ITestDevice : מכשיר היעד |
החזרות |
---|
| סט כתובות MAC של Bluetooth |
זורק |
---|
DeviceNotAvailableException | |
זוג
public boolean pair (ITestDevice primary,
ITestDevice secondary)
התקן מכשיר ראשי למכשיר משני
פרמטרים |
---|
primary | ITestDevice : מכשיר ליצור התאמה בין |
secondary | ITestDevice : מכשיר הזוג כדי |
החזרות |
---|
boolean | נכון אם הזיווג מצליח |
זורק |
---|
DeviceNotAvailableException | |
setBtConnectionTimeout
public void setBtConnectionTimeout (Duration timeout)
setBtPairTimeout
public void setBtPairTimeout (Duration timeout)
setProfilePriority
public boolean setProfilePriority (ITestDevice primary,
ITestDevice secondary,
profiles,
Sl4aBluetoothUtil.BluetoothPriorityLevel priority)
שנה את הגדרת העדיפות של הפרופילים שניתנו במכשיר הראשי כלפי מכשיר משני
פרמטרים |
---|
primary | ITestDevice : מכשיר עדיף סט על |
secondary | ITestDevice : מכשיר עדיף סט עבור |
profiles | : פרופילי Bluetooth לשינוי הגדרת עדיפות |
priority | Sl4aBluetoothUtil.BluetoothPriorityLevel : רמת עדיפות |
החזרות |
---|
boolean | נכון אם נקבע עדיפות בהצלחה |
זורק |
---|
DeviceNotAvailableException | |
startSl4a
public void startSl4a (ITestDevice device,
File sl4aApkFile)
הפעל במפורש את לקוח SL4A עם המכשיר הנתון וקובץ ה- apk SL4A. בדרך כלל שיטה זו אינה נדרשת, מכיוון שחיבור SL4A תמיד ייווצר לפני פעולות בפועל.
פרמטרים |
---|
device | ITestDevice : המכשיר להיות מחובר באמצעות SL4A |
sl4aApkFile | File : ה- APK SL4A האופציונלי להתקנה ולשימוש. |
זורק |
---|
DeviceNotAvailableException | |
stopSl4a
public void stopSl4a ()
עצור את לקוחות SL4A שכבר נפתחו. זה בעצם מספק דרך לנקות לקוחות מיד לאחר שהם כבר לא בשימוש
unpairAll
public boolean unpairAll (ITestDevice device)
בטל את התאמת כל ההתקנים המשויכים למכשיר הנוכחי
פרמטרים |
---|
device | ITestDevice : מכשיר נוכחי לבצע את הפעולה |
החזרות |
---|
boolean | נכון אם ביטול התאמה מוצלחת |
זורק |
---|
DeviceNotAvailableException | |
שיטות מוגנות
לְסַכֵּם
protected void finalize ()
נקה את כל חיבורי SL4A
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2021-10-04 UTC.
[]
[]