Please Select Your Location
Australia
Österreich
België
Canada
Canada - Français
中国
Česká republika
Denmark
Deutschland
France
HongKong
Iceland
Ireland
Italia
日本
Korea
Latvija
Lietuva
Lëtzebuerg
Malta
المملكة العربية السعودية (Arabic)
Nederland
New Zealand
Norge
Polska
Portugal
Russia
Saudi Arabia
Southeast Asia
España
Suisse
Suomi
Sverige
台灣
Ukraine
United Kingdom
United States
Please Select Your Location
België
Česká republika
Denmark
Iceland
Ireland
Italia
Latvija
Lietuva
Lëtzebuerg
Malta
Nederland
Norge
Polska
Portugal
España
Suisse
Suomi
Sverige

Simulator setup

Setup Simulator

  • Import simulator package and init it
import com.htc.viveglass.sdk.simulator.ViveGlassSimulator
ViveGlassSimulator.create(appContext)
val simulator = ViveGlassSimulator.instance()
  • Set ViveGlass adapter to simulator object

ViveGlass.adapter = simulator

  • Show simulator UI

simulator.showUI( supportFragmentManager )

  • Replace simulator resources
    • Your app must be a debug version
    • Using Android Studio/Device Explore to push files
    • Replacing Simulator Image Samples
      • Path: Transfer your file to the app files directory. Ex:/data/data/com.htc.viveglass.viveglasssample/files/image_sample.heic
      • Specs: HEIC format, 1440x1920 resolution
    • Replacing Simulator Video Samples
      • Path: Transfer your file to the app file directory. Ex:/data/data/com.htc.viveglass.viveglasssample/files/video_sample.mp4
      • Specs: video (480x856, 30 FPS) with AAC audio (44.1 kHz, 32 kbps, Stereo)
    • Replacing Simulator Audio Samples
      • Path: Transfer your file to the app files directory. Ex:/data/data/com.htc.viveglass.viveglasssample/files/audio_sample.aac
      • Specs: AAC format, 44.1 kHz, 32 kbps, Stereo
  • It can refer to sample code MainActivity.kt and ViveGlassKitManager.kt file.