How to add Icon for your Live Wallpaper - android

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).

Related

Why doesn't this Glass app appear in the Glass Launcher?

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.

Live Wallpaper not showing up properly android

I have a live wallpaper and an activity that starts it. My manifest looks like this:
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.bdcorps.Striped">
<uses-sdk android:minSdkVersion="7" />
<uses-feature android:name="android.software.live_wallpaper" />
<application
android:label="B! Lite"
android:icon="#drawable/ic_launcher" >
<!-- android:theme="#android:style/Theme.Holo" -->
<activity android:name="com.bdcorps.Striped.StarterActivity"
android:label="Striped! Lite"
android:screenOrientation="portrait" android:theme="#android:style/Theme.NoTitleBar.Fullscreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service
android:label="B! Lite"
android:name="com.bdcorps.Striped.StripedMain"
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/striped"/>
</service>
<activity
android:label="#string/striped_settings"
android:name="com.bdcorps.Striped.StripedMainSettings"
android:theme="#android:style/Theme.Light.WallpaperSettings"
android:exported="true">
</activity>
<activity android:name=".EMAIL"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:configChanges="keyboardHidden|orientation">
<intent-filter>
<action android:name="com.bdcorps.Striped.EMAIL" />
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
</application>
</manifest>
Now the icon - "ic_launcher" only appears in the launcher. In other places such as live wallpaper picker, the icon is grey with "B!" written inside it(I think this is the default).
I have completely uninstalled the app and also cleaned my project but nothing is working.........
The thumbnail image and wallpaper short description (which is optional and not used since Honeycomb) should be set in xml/striped, like this:
<?xml version="1.0" encoding="utf-8"?>
<wallpaper xmlns:android="http://schemas.android.com/apk/res/android"
android:settingsActivity="com.bdcorps.Striped.StripedMainSettings"
android:thumbnail="#drawable/thumbnail"
android:description="#string/wp_description"
/>
The thumbnail image size seems to vary greatly by device, so I just make a single high-resolution jpg and put it in drawable-nodpi.

warning"No Launcher activity found, The launch will only sync the application package on the device"

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>

Android StackWidget unable to bind

I am currently trying to add a widget to my application and have been basing my implementation on this code http://developer.android.com/resources/samples/StackWidget/index.html
I have put all my stack widget related classes in their own package within my main package.
When I try to add the widget it is unable to bind and hence the cards are not displayed (it just states the default text "This is the empty view")
Below is my manifest.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.bencallis.dealpad" android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="11" android:targetSdkVersion="14" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application android:icon="#drawable/ic_launcher"
android:logo="#drawable/logo" android:theme="#style/DealPadTheme"
android:hardwareAccelerated="true" android:uiOptions="splitActionBarWhenNarrow">
<activity android:label="#string/app_name" android:name=".DealPadActivity"
android:configChanges="keyboardHidden|orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".SettingsActivity" />
<activity android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
<!-- Widgets -->
<receiver android:name=".stackwidget.StackWidgetProvider">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data android:name="android.appwidget.provider"
android:resource="#xml/stackwidgetinfo" />
</receiver>
<service android:name="stackwidget.StackWidgetService"
android:permission="android.permission.BIND_REMOTEVIEWS"
android:exported="false" />
</application>
</manifest>
Error message:
E/RemoteViewsAdapterServiceConnection(474): bind(): Unknown component ComponentInfo{com.bencallis.dealpad/com.bencallis.dealpad.stackwidget.StackWidgetService}
I am sure there is a simple mistake somewhere which is making the component info repeat com.bencallis.dealpad.
Any ideas?
It turned out it was to do with my manifest and a problem locating the service. I was missing a . in the name (which gives it the path).
Silly mistake!

Android wrong action loads

I have an android application, I'm trying to put a splash screen in via a tutorial I found and I added an additional activity to the manifest "SplashScreen", however my other activity still loads first. If I take the other one out, the splash screen will load but crashes. How can I get the SplashScreen to load first?
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="projectmp.android"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="#drawable/icon" android:label="#string/app_name" android:debuggable="true">
<uses-library android:name="com.google.android.maps" />
<activity android:name=".SplashScreen"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".MissionPlanner"
android:label="#string/app_name"
android:theme="#android:style/Theme.NoTitleBar">
<intent-filter>
<action android:name="projectmp.android.MissionPlanner" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="7" />
<uses-permission android:name="android.permission.INTERNET" />
</manifest>
Thanks
Whatever you are launching it from still thinks that it is trying to launch MissionPlanner. It may be caching an earlier definition of your application. The default home screen launcher should not have this effect, but third-party ones, or home screen shortcuts, will.

Categories

Resources