There is an Activity with data pulled from the remote API. The Manifest file looks like this
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.myapp.glass"
android:versionCode="1"
android:versionName="1.0">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.google.android.glass.permission.DEVELOPMENT" />
<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="15" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity"
android:enabled="true"
android:label="#string/title_activity_main">
<intent-filter>
<action android:name="com.google.android.glass.action.VOICE_TRIGGER" />
</intent-filter>
<meta-data
android:name="com.google.android.glass.VoiceTrigger"
android:resource="#xml/voice_trigger_start" />
</activity>
</application>
</manifest>
The filevoice_trigger_start works and the command from it is properly detected.
<?xml version="1.0" encoding="utf-8"?>
<trigger command="LISTEN_TO" />
The app does not crash, it works Ok, but it does not appear in the Glass Launcher. Look at the images.
All other apps I instal via the Market are here.
Why?
PS. I install my demo app via the console. It's not live app.
LISTEN_TO is one of the existing commands. The expected behavior is you'll see "listen to" menu and when you tap, you'll see your app under that menu.
<?xml version="1.0" encoding="utf-8"?>
<trigger command="LISTEN_TO" />
If you want a custom command, try keyword.
voice_trigger_start.xml
<trigger keyword="#string/your_custom_command" />
Edit
Based on your comments, try adding this in your activity tag in your manifest.
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
You might need to reboot your Glass.
Related
My application in Android Studio has separate components for mobile devices and for Google Glasses. When I attempt to load the mobile version onto a Nexus 10 (Android version 4.4.2) I get the following error:
Applications have the same package name com.example.carterpedersen.datatransfer:
mobile, glass
I can, however, load the app onto a glass device (XE19.1) with no problem.
I find this error perplexing because my app has been running with no problem for several weeks, and all of a sudden the mobile component is crippled. I did recently add a dependency on the glass R to the mobile component, but even this was a few days before this error showed itself.
I tried refactoring the mobile directory, as well as the whole package, with no success.
I have searched SO and other sources but I didn't find any duplicates; please link me if I am wrong on this point. Thanks for the help. Provided manifests are below.
Mobile manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.carterpedersen.datatransfer" >
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.carterpedersen.datatransfer.FileRetrieval"
android:label="#string/app_name" >
</activity>
<activity
android:name="com.example.carterpedersen.datatransfer.BluetoothClient"
android:label="#string/title_activity_bluetooth_client" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
Glass Manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.carterpedersen.datatransfer" >
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.carterpedersen.datatransfer.LauncherActivity"
android:label="#string/title_activity_launcher" >
</activity>
<activity
android:name="com.example.carterpedersen.datatransfer.LiveCardMenuActivity"
android:theme="#style/MenuTheme" >
</activity>
<!-- Service responsible for maintaining LiveCard -->
<service
android:name="com.example.carterpedersen.datatransfer.LiveCardDataCollect"
android:icon="#drawable/ic_glass_logo"
android:label="#string/title_activity_live_card_data_collect" >
<intent-filter>
<action android:name="com.google.android.glass.action.VOICE_TRIGGER" />
</intent-filter>
<meta-data
android:name="com.google.android.glass.VoiceTrigger"
android:resource="#xml/voice_trigger" />
</service>
<!-- For content sharing permissions -->
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="com.example.carterpedersen.datatransfer.fileprovider"
android:exported="false"
android:grantUriPermissions="true" >
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="#xml/file_paths" />
</provider>
<!-- Selects file for sharing to client. -->
<activity
android:name="com.example.carterpedersen.datatransfer.FileShareActivity"
android:label="#string/title_activity_file_share" >
<intent-filter>
<action android:name="android.intent.action.PICK" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.OPENABLE" />
<data android:mimeType="*/*" />
</intent-filter>
</activity>
<activity
android:name="com.example.carterpedersen.datatransfer.BluetoothHost"
android:label="#string/title_activity_bluetooth_host" >
</activity>
<receiver android:name="com.example.carterpedersen.datatransfer.BluetoothHost$HostBroadRec" >
<intent-filter>
<action android:name="transapps.g6.new.alert" />
</intent-filter>
</receiver>
</application>
Try using just one manifest (combined for use on both mobile and Glass - I'm assuming one apk correct?)
Just close completely the android studio and reopen it. My problem solved after this.
By the way you can try this command on cmd:
adb uninstall com.your.package
Try changing the package name in each of the AndroidManifest.xml files. So, for example, change to:
Mobile
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.carterpedersen.mobile.datatransfer" >
Glass
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.carterpedersen.glass.datatransfer" >
The package name should be unique amongst applications. Refer to the package attribute definition.
I'm making an android widget, but I got this warning from console when running my application on emulator
No Launcher activity found!
The launch will only sync the application package on the device!
Here is my AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.analogclock.android"
android:versionCode="1"
android:versionName="1.0"
>
<uses-sdk android:minSdkVersion="3" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<receiver
android:name=".AnalogClockWidget"
android:label="#string/app_name" />
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<meta-data android:name="android.appwidget.provider" android:resource="#xml/appwidget" />
</application>
</manifest>
What's the reason? Please give me a solution
This is normal as your widget does indeed not have any activity!
I am guessing you are using the Run or Debug button on Eclipse.
In this case the Run button cannot add your widget to the home screen for you, so it only install the package and give you this warning.
Check that your widget appears in the chooser, when you try to add a widget on the home screen. If it does, then it is working as expected :)
EDIT: try with this manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.analogclock.android"
android:versionCode="1"
android:versionName="1.0"
>
<uses-sdk android:minSdkVersion="3" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<receiver
android:name=".AnalogClockWidget"
android:label="#string/app_name"
android:exported="true">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data android:name="android.appwidget.provider" android:resource="#xml/appwidget" />
</receiver>
</application>
</manifest>
I followed the hello world for the map view and all I get is a blank grid that I can zoom around in:
http://developer.android.com/guide/tutorials/views/hello-mapview.html
here is my android manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="us.fubz.helloMap"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="7" />
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name">
<uses-library android:name="com.google.android.maps"/>
<activity
android:name=".helloMap"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
I generated the Api-key from my C:\Users\fubz.android\debug.keystore
I am testing it on my original droid using eclipse.
I have no idea what I am doing wrong. I double checked my code with multiple sources and I still don't understand. I think the api key is wrong but know way to prove it or know how to get a new one.
I have uploaded the android app in the android app store. The app is not visible from the mobile app store but from my browser it is visible.
The devices I have tried:
GT-S5360 (Samsung) gingerbread
A60 (Micromax) gingerbread
The AndroidManifest.xml code is
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.hyperwebenable.techpanels"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="4" />
<application android:icon="#drawable/sitelogo"
android:label="#string/app_name">
<activity android:name=".MessageList"
android:label="#string/app_name"
android:theme="#android:style/Theme.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category
android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".SecondActivity"
android:theme="#android:style/Theme.NoTitleBar" >
</activity>
<meta-data android:name="com.mobclix.APPLICATION_ID"
android:value=""/>
<activity
android:name="com.mobclix.android.sdk.MobclixBrowserActivity"
android:theme="#android:style/Theme.Translucent.NoTitleBar" />
</application>
<uses-sdk android:minSdkVersion="2" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission
android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission
android:name="android.permission.READ_PHONE_STATE">
</uses-permission>
</manifest>
Please let me know what I am doing wrong here.
I'm not sure if this could cause a problem, but your uses-sdk is defined twice (with a different minSdkVersion). Try removing the second one.
My live wallpaper has an Icon, it shows before you install it, but after you install it and you go to Wallpaper>Live Wallpaper, there is no icon in it, it's just an empty gray image.
My live wallpaper has an Icon, it shows before you install it, but after you install it and you go to Wallpaper>Live Wallpaper, there is no icon in it, it's just an empty gray image.
Here is my Manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
android:versionName="1.0" package="com.cutecats.cats"
android:versionCode="1">
<uses-sdk android:minSdkVersion="8" />
<uses-feature android:name="android.software.live_wallpaper" />
<application
android:icon="#drawable/icon"
android:label="#string/app_name">
<service
android:name=".CubeWallpaper1"
android:icon="#drawable/icon"
android:permission="android.permission.BIND_WALLPAPER">
<intent-filter android:icon="#drawable/icon">
<action android:name="android.service.wallpaper.WallpaperService" />
</intent-filter>
<meta-data android:name="android.service.wallpaper" android:resource="#xml/cube1" />
</service>
<activity
android:label="#string/cube2_settings"
android:name=".CubeWallpaper1Settings"
android:icon="#drawable/icon"
android:exported="true" >
</activity>
</application>
</manifest>
There are different types of icons for live wallpaper from what i understand. Each shows in its own time, and what you are talking about is actually a thumbnail and needs to be placed inside
<wallpaper>
tag.
Here is how i did it: i created pony.xml file with following code:
<?xml version="1.0" encoding="utf-8"?>
<wallpaper xmlns:android="http://schemas.android.com/apk/res/android"
android:thumbnail="#drawable/pony"
android:description="#string/pony_desc"
/>
Inside manifest file i have following:
<service android:label="#string/pony" android:name="my.pony.wallpaperManagement.SleepyPonyWallpaper"
android:permission="android.permission.BIND_WALLPAPER">
<intent-filter>
<action android:name="android.service.wallpaper.WallpaperService" />
</intent-filter>
<meta-data android:name="android.service.wallpaper"
android:resource="#xml/pony" />
</service>
Note the reference to pony.xml.
Also, don't forget to have your icon in appropriate size (e.g. 64x64).