honoru88 / google-glass-api

Automatically exported from code.google.com/p/google-glass-api
0 stars 0 forks source link

Live Card projects: java.lang.SecurityException: Permission Denial: starting Intent #655

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a Live Card project for Glass
2. check the "direct rendering" checkbox -or- leave it unchecked
3. run > edit configuration
4. click "Launch:" radio button
5. specify <package-name>.LiveCardMenuActivity as launch activity

What is the expected output? What do you see instead?
See error message below.

What version of the product are you using? On what operating system?
Android Studio 1.0.2/Mac 10.10/Java8

Please provide any additional information below.
a) without step #5 above a "configuration error" appears and the only way to 
resolve this error is to specify the LiveCardMenuActivity as the launch 
activity.
b) the error is reproducible because it occurs whenever I create a Live Card 
project with direct rendering

*** error message *** 
---------------------------------------------------------------
Uploading file
local path: 
/Users/oswaldcampesato2/AndroidStudioProjects/LiveCardDirect3/app/build/outputs/
apk/app-debug.apk
remote path: /data/local/tmp/com.example.oswaldcampesato2.livecarddirect3
Installing com.example.oswaldcampesato2.livecarddirect3
DEVICE SHELL COMMAND: pm install -r 
"/data/local/tmp/com.example.oswaldcampesato2.livecarddirect3"
pkg: /data/local/tmp/com.example.oswaldcampesato2.livecarddirect3
Success

Launching application: 
com.example.oswaldcampesato2.livecarddirect3/com.example.livecarddirect3.LiveCar
dMenuActivity.
DEVICE SHELL COMMAND: am start -n 
"com.example.oswaldcampesato2.livecarddirect3/com.example.livecarddirect3.LiveCa
rdMenuActivity" -a android.intent.action.MAIN -c 
android.intent.category.LAUNCHER
Starting: Intent { act=android.intent.action.MAIN 
cat=[android.intent.category.LAUNCHER] 
cmp=com.example.livecarddirect3/.LiveCardMenuActivity }
java.lang.SecurityException: Permission Denial: starting Intent { 
act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] 
flg=0x10000000 cmp=com.example.livecarddirect3/.LiveCardMenuActivity } from 
null (pid=30593, uid=2000) not exported from uid 10152
at android.os.Parcel.readException(Parcel.java:1465)
at android.os.Parcel.readException(Parcel.java:1419)
at 
android.app.ActivityManagerProxy.startActivityAsUser(ActivityManagerNative.java:
2133)
at com.android.commands.am.Am.runStart(Am.java:688)
at com.android.commands.am.Am.onRun(Am.java:271)
at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
at com.android.commands.am.Am.main(Am.java:77)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:243)
at dalvik.system.NativeStart.main(Native Method)
---------------------------------------------------------------

Original issue reported on code.google.com by ocampes...@gmail.com on 3 Jan 2015 at 12:27

GoogleCodeExporter commented 9 years ago
In comment b) in "additional information" I forgot to mention that this error 
occurs with direct rendering as well as remote rendering.

Original comment by ocampes...@gmail.com on 3 Jan 2015 at 12:29

GoogleCodeExporter commented 9 years ago
I also tweaked the package name in the output by removing my full name.

Original comment by ocampes...@gmail.com on 3 Jan 2015 at 12:30

GoogleCodeExporter commented 9 years ago
This is working as intended as the LiveCard template's menu Activity is not 
exported in the manifest.

You should not use the "launch" feature but instead invoke your Glassware 
through the "ok glass" voice menu as documented in:
  https://developers.google.com/glass/develop/gdk/voice#main_voice_commands

Original comment by ala...@google.com on 7 Jan 2015 at 5:28