How to detect programmatically if "Android App" is running in chrome book or in Android phone

dex

Since Google has announced that chromebook also support "Android Application" so I also wanted to support my app on chromebook although it is running fine with few exception which I need to fix.

I want to write code in such a way that that is will execute only for chromebook and will not execute for android phones and tablet.

I have check with Chromebook documentation in android developer site, I didn't get any such API which tell that your app is running in chrome book environment.


Suggestion from ARC Beta documentation did not work:

If you need to check if your app is running on Chrome OS, look for chromium as the android.os.Build.BRAND and android.os.Build.MANUFACTURER.

Both return google on an ASUS Chromebook.

dex

Finally I figure out a way to know if app in running in ARC:

context.getPackageManager().hasSystemFeature("org.chromium.arc.device_management");

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

How to detect installed Chrome version from my Android App?

分類Dev

How to detect installed Chrome version from my Android App?

分類Dev

How to programmatically determine if an Android app is put to sleep on Samsung Galaxy?

分類Dev

Clearing Cache in android App Programmatically

分類Dev

How can we programmatically detect which iOS version is device running on?

分類Dev

Android App installation on phone for testing : Suggestions

分類Dev

React Native: Error while running the android app

分類Dev

How to getContext() in LIBGDX android app

分類Dev

How to start an Android phone camera using a java code running on PC?

分類Dev

Android App is not running. Emulator says it keeps shutting down

分類Dev

Can I make an Android app that runs a web view in Chrome 39?

分類Dev

How to close an Android app using UiAutomator?

分類Dev

Android app crashed without stack : how to debug?

分類Dev

How to choose best layout for my android app?

分類Dev

How to add app icon to Xamarin Android app

分類Dev

How to display unread count to the android app icon?

分類Dev

How to limit broadcast to its own Android app

分類Dev

How to limit broadcast to its own Android app

分類Dev

How to hook system calls of my android app

分類Dev

How to access standard input from android app?

分類Dev

How to send android app logs to remote server?

分類Dev

Go - how can i detect if the users PC is running some prerequisite tools such as Google Chrome for example

分類Dev

Windows Phone 7 "back button" how to detect?

分類Dev

Fetch Facebook friends information like email id and phone number from android app version 4.4

分類Dev

Retrieving list of users in my Android App through Parse that match my Phone Contact List

分類Dev

How to find the time it will take to travel between two places in an android app

分類Dev

How to send push notifications FROM an android app with Firebase?

分類Dev

How many singleton classes can we use in one android app?

分類Dev

How to separate two different user in firebase android app?

Related 関連記事

  1. 1

    How to detect installed Chrome version from my Android App?

  2. 2

    How to detect installed Chrome version from my Android App?

  3. 3

    How to programmatically determine if an Android app is put to sleep on Samsung Galaxy?

  4. 4

    Clearing Cache in android App Programmatically

  5. 5

    How can we programmatically detect which iOS version is device running on?

  6. 6

    Android App installation on phone for testing : Suggestions

  7. 7

    React Native: Error while running the android app

  8. 8

    How to getContext() in LIBGDX android app

  9. 9

    How to start an Android phone camera using a java code running on PC?

  10. 10

    Android App is not running. Emulator says it keeps shutting down

  11. 11

    Can I make an Android app that runs a web view in Chrome 39?

  12. 12

    How to close an Android app using UiAutomator?

  13. 13

    Android app crashed without stack : how to debug?

  14. 14

    How to choose best layout for my android app?

  15. 15

    How to add app icon to Xamarin Android app

  16. 16

    How to display unread count to the android app icon?

  17. 17

    How to limit broadcast to its own Android app

  18. 18

    How to limit broadcast to its own Android app

  19. 19

    How to hook system calls of my android app

  20. 20

    How to access standard input from android app?

  21. 21

    How to send android app logs to remote server?

  22. 22

    Go - how can i detect if the users PC is running some prerequisite tools such as Google Chrome for example

  23. 23

    Windows Phone 7 "back button" how to detect?

  24. 24

    Fetch Facebook friends information like email id and phone number from android app version 4.4

  25. 25

    Retrieving list of users in my Android App through Parse that match my Phone Contact List

  26. 26

    How to find the time it will take to travel between two places in an android app

  27. 27

    How to send push notifications FROM an android app with Firebase?

  28. 28

    How many singleton classes can we use in one android app?

  29. 29

    How to separate two different user in firebase android app?

ホットタグ

アーカイブ