Skip to content

Commit e8d0ca8

Browse files
committed
Merge branch 'main' of github.com:mobile-next/mobile-mcp
2 parents f7a4bb2 + 01f5dc0 commit e8d0ca8

2 files changed

Lines changed: 13 additions & 7 deletions

File tree

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ This server allows Agents and LLMs to interact with native iOS/Android applicati
3333
</a>
3434
</h4>
3535

36-
https://github.com/user-attachments/assets/c4e89c4f-cc71-4424-8184-bdbc8c638fa1
36+
37+
https://github.com/user-attachments/assets/bb084777-beb3-4930-ae6f-8d3fe694ddde
38+
3739

3840
<p align="center">
3941
<a href="https://github.com/mobile-next/">

src/android.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -519,13 +519,17 @@ export class AndroidRobot implements Robot {
519519
export class AndroidDeviceManager {
520520

521521
private getDeviceType(name: string): AndroidDeviceType {
522-
const device = new AndroidRobot(name);
523-
const features = device.getSystemFeatures();
524-
if (features.includes("android.software.leanback") || features.includes("android.hardware.type.television")) {
525-
return "tv";
522+
try {
523+
const device = new AndroidRobot(name);
524+
const features = device.getSystemFeatures();
525+
if (features.includes("android.software.leanback") || features.includes("android.hardware.type.television")) {
526+
return "tv";
527+
}
528+
return "mobile";
529+
} catch (error) {
530+
// Fallback to mobile if we cannot determine device type
531+
return "mobile";
526532
}
527-
528-
return "mobile";
529533
}
530534

531535
private getDeviceVersion(deviceId: string): string {

0 commit comments

Comments
 (0)