This sample project demonstrates the following:
* Voice launching an app on Google Glass
* Use of the Google Glass style
* Use of a WakeLock to keep an Android device awake
* Other common Google Glass behavior
Overview
--------
You provide the input to this app by moving your head (while wearing Google
Glass). As you tip your head from left to right you will see the line also tip.
As your lean your head forward and backward you will see the line also move up
and down. The value of the lines movement is displayed on the lower corners.
Voice Launching on Google Glass
-------------------------------
The voice trigger is added in multiple steps. In the
AndroidManifest.template.xml file the following lines were added:
Inside the <intent-filter> element
<action
android:name="com.google.android.glass.action.VOICE_TRIGGER" />
Inside the <activity> element
<meta-data
android:name="com.google.android.glass.VoiceTrigger"
android:resource="@xml/voice_trigger_start" />
Right below the <%uses-permission%> line you need to add the following special
permission to use a non-standard voice trigger command.
<uses-permission
android:name="com.google.android.glass.permission.DEVELOPMENT" />
The @xml/voice_trigger_start is a reference to the voice_trigger_start.xml file,
which is also included in the project.
It is a standard XML file with the element:
<trigger keyword="Am I level?" />
Where "Am I level?" is the voice trigger keyword.
The voice_trigger_start.xml also requires deployment to the res\xml folder. This
is specified under the Project -> Deployment screen for the Android platform.
For more information on the Google Glass Voice Trigger, check out the GDK
documentation:
https://developers.google.com/glass/develop/gdk/input/voice
Use of the Google Glass Style
-----------------------------
The Google Glass style is added to a project by dropping a TStyleBook, double
clicking on it, and selecting the Google Glass style file found in the styles
folder:
C:\Users\Public\Documents\Studio\14.0\Styles\Android
Then on the form select the new TStyleBook via the StyleBook property.
The Google Glass Style provides common visual elements found on Google Glass,
for example a black background with large colorful text. For more information on
the style guidelines see:
https://developers.google.com/glass/design/style/index
Use of a WakeLock to Keep an Android Device Awake
-------------------------------------------------
The WakeLock is technically deprecated on Android, but is still the best way to
have the most granular control over when and how a device stays away from your
app.
The unit Androidapi.JNI.PowerManager.pas contains the JNI Interface for the
PowerManager and WakeLock classes. It also contains a few helper methods for
acquiring a WakeLock. It is important that your app always releases any WakeLock
it acquires. The code makes use of the Application Events Platform Service to
release and acquire the WakeLock at the appropriate times.
To obtain WakeLock Uses Permission go to Project > Options menu from within the
IDE and then Uses Permissions. At the top select "All configurations - Android
platform" and then select "Wake Lock" from the list. (It is already selected
for this sample.)
Other Common Google Glass Behavior
----------------------------------
This project uses the Google Glass skin, which is available via the dropdown
from the Design view. The skin is 427x240. The Google Glass display is 640x360
at 1.5 pixel density (640/1.5=427).
Google Glass apps typically don’t have a title bar. This is disabled in two
places. From the design surface, select the Form and change the BorderStyle
property to None and this will hide the title bar at design time.
For runtime, go to Project -> Options -> Version Info and select
"All configurations – Android platform" at the top and change the "theme" key's
value to "No TitleBar".
Glass does not have an app management interface. To uninstall your app use the
following command-line:
adb shell pm uninstall com.embarcadero.GlassLevel
You need to make sure adb is available in the path. By default it is found in
C:\Users\Public\Documents\Studio\14.0\PlatformSDKs\adt-bundle-windows-x86-20131030\sdk\platform-tools
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
60多个FireDAC官方实例 (3935个子文件)
tanks_panzer2.ase 282KB
rock_small_a.ase 63KB
rock_small_b.ase 56KB
_createDB.bat 2KB
build.bat 516B
build.bat 516B
migrate.bat 431B
migrate.bat 212B
migrate.bat 164B
createInfx.bat 40B
createTData.bat 40B
createOracle.bat 38B
createSQLite.bat 38B
createMySQL.bat 36B
createMSSQL.bat 36B
createMSAcc.bat 35B
createDB2.bat 34B
createASA.bat 32B
createADS.bat 32B
createFB.bat 30B
createIB.bat 30B
createPG.bat 30B
Clients.bdsproj 8KB
boots.bmp 528KB
ViewOfWashington.bmp 485KB
minature_rockers.bmp 439KB
winmacmachine.bmp 201KB
civil-war.bmp 193KB
gradientmask.bmp 169KB
mask.bmp 139KB
cus5.bmp 15KB
cus4.bmp 15KB
cus1.bmp 15KB
cus3.bmp 15KB
cus2.bmp 15KB
ava4.bmp 14KB
tcgauge.bmp 406B
tcgauge.bmp 406B
tcdirectoryoutline.bmp 406B
ttrayicon.bmp 406B
tcspinbutton.bmp 406B
tcspinedit.bmp 406B
tccolorgrid.bmp 406B
tibeventalerter.bmp 406B
tccalendar.bmp 406B
tperformancegraph.bmp 406B
tcdirectoryoutline.bmp 406B
ttrayicon.bmp 406B
tcspinbutton.bmp 406B
tcspinedit.bmp 406B
tccolorgrid.bmp 406B
tccalendar.bmp 406B
tcpie.bmp 322B
spindown.bmp 166B
spinup.bmp 166B
Demos.bpg 8KB
ProjectGroup1.bpg 809B
inetwinsockets.bpi 30KB
inetwinsockets.bpl 2.25MB
FireIBLite.cbproj 119KB
VideoPlayback.cbproj 90KB
TestBed.cbproj 80KB
TestBed.cbproj 78KB
BaaS_ToDoCpp.cbproj 76KB
map_cpp.cbproj 73KB
ImageListDemo.cbproj 72KB
ListViewAddThumbAndCaption.cbproj 63KB
ListViewCustomBottomDetail.cbproj 63KB
TabMapProject.cbproj 61KB
HearRateMonitorCpp.cbproj 61KB
CppMediaPlayerHD.cbproj 61KB
CppIBToGoDemo.cbproj 61KB
NotesClientProjectCpp.cbproj 61KB
FMMusicPlayer.cbproj 60KB
ProximityClient.cbproj 60KB
CameraComponent.cbproj 59KB
BeaconComponentCPP.cbproj 59KB
ColorsBeaconProximityCPP.cbproj 58KB
TetherDBClientCpp.cbproj 56KB
GlassLevelCpp.cbproj 56KB
CapitalTriviaCpp.cbproj 54KB
FireDAC_SQLite.cbproj 53KB
SearchContext_Cpp.cbproj 53KB
HttpDownloadDemo.cbproj 52KB
VirtualKeyboardDemo.cbproj 51KB
Forms.cbproj 51KB
PlayingAudio.cbproj 51KB
ConwaysLifeFMXCpp.cbproj 49KB
PhotoEditorDemo.cbproj 49KB
AccessCamera.cbproj 49KB
ClBluetoothCpp.cbproj 48KB
KeyboardToolbar.cbproj 47KB
ExplorerDevicesLECpp.cbproj 46KB
AudioRecPlay.cbproj 46KB
ListViewCheckListProject.cbproj 45KB
TabletMasterDetailwithSearch.cbproj 45KB
SensorInfo.cbproj 45KB
PullToRefreshExampleCpp.cbproj 45KB
FlashLight.cbproj 45KB
MobileControls.cbproj 45KB
共 3935 条
- 1
- 2
- 3
- 4
- 5
- 6
- 40
资源评论
- tonyduan2020-05-05真的很烂,骗分的
- loongxiao2018-04-25一星都不愿意给,就是官方整个实例,盒子上随便下载,你那么差分吗,拿这个来混分,60多个不是都是firedacd的实例,后面的人不要上当,文不对题
zwzqq
- 粉丝: 1
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功