Android Tutorial Android Live Wallpaper tutorial

magarcan

Active Member
Licensed User
Longtime User
Which device are you using?
I'm using a Samsung Galaxy S with Onecosmic's ICS ROM. Could this be the problem?

I've tested some other live wallpaper and detect correctly changing between Desktops...
 

FJS

Active Member
Licensed User
Longtime User
Help with this topic

I see, the readonly property of wallpaper.xml is removed when it is zipped. I've added a comment about it in the first post.

You will need to unzip the project again and set wallpaper.xml to be readonly.

I have the following error, and I dont know how to solve it. Could you help me??
I have follow the previous steps but...

thank you in advance for your support

Best regards
 

Attachments

  • Error2.jpg
    65 KB · Views: 350

JonPM

Well-Known Member
Licensed User
Longtime User
is it possible to create a live wallpaper with 3d animated objects? any pointers?
 

boten

Active Member
Licensed User
Longtime User

I tried to do what you prescribed. for testing puposes there was no "setting screen" in the main app. Yes, when choosing this LWP I got the "settings...] button, in addition to the "set wallpaper" button, and pressing the "settings..." brought back the main app (which it should)

My question is how to make it appear as "configure..." in the list of LWPs?
 

boten

Active Member
Licensed User
Longtime User
strange: "configure..." appears when running on phone, but does NOT appear when running on emulator.

addition: the "configure..." appears only when android:settingsActivity="xxx.yyy.main"

if I create another activity (say "setup") in the app and change wallpaper.xml to include:

android:settingsActivity="xxx.yyy.setup"

the "configure..." does not appear ??!!??
 
Last edited:

FJS

Active Member
Licensed User
Longtime User
Load pictures to live wallpaper

Good night,

Please, I would like to made a livewallpaper, with several pictures, like a "colage". The main idea is adding two pictures, xxx.jpg and yyy.jpg (with their propities) and then adding movements (increase the size, rotation, or lineal moment), but I dont know how to load and use it...

Please, do you have any example??

PS: it will be a sorprise for a friend

Thank you very much for your help and support

Best regards
 

boten

Active Member
Licensed User
Longtime User
@Erel,
stam1 is a very simple LWP - it shows the "settings..." button when activated and ALSO the "configure" option in the list of wallpapers. pressing either "settings..." or "configure" shows the main activity msgbox.
the wallpaper.xml file has the line:
android:settingsActivity="boten.stam1.main"


stam2 is very similar except that there's extra activity "parm", and its wallpaper.xml has the line:
android:settingsActivity="boten.stam2.parm"

both are READ ONLY.

stam2 does NOT shows the "configure" option in the wallpaper list, but DOES show "settings..." button. But when pressing it, the app stops unexpectedly (error in walpaper.livepicker).

The unfiltered log is also attached, line 25 points to the problem. Now how do I solve this?
 

Attachments

  • stam1.zip
    6.8 KB · Views: 388
  • stam2.zip
    7.3 KB · Views: 344
  • unfilterlog.zip
    1.2 KB · Views: 344

boten

Active Member
Licensed User
Longtime User
I'm on 1.7 - what to do there?
Tried to unmark "do not overwrite..." , compile once, then changed the xml file to reflect what is needed (as per the tutorial"), same problem.

my "new" androidmanifest.xml is:
B4X:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="boten.stam2"
      android:versionCode="1"
      android:versionName=""
     android:installLocation="internalOnly">
      <uses-sdk android:minSdkVersion="7" />
      <supports-screens
          android:largeScreens="true"
          android:normalScreens="true"
          android:smallScreens="true"
          android:anyDensity="true"/>
    <application android:icon="@drawable/icon" android:label="stam2">
       
        <activity android:windowSoftInputMode="stateHidden" android:launchMode="singleTop" android:name=".main"
                  android:label="stam2" android:screenOrientation="unspecified">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <service android:name="wallpaperservice"></service>
<receiver android:name="wallpaperservice$wallpaperservice_BR">
</receiver><activity android:windowSoftInputMode="stateHidden" android:launchMode="singleTop" android:name="parm" android:label="parm" android:screenOrientation="unspecified"></activity>

<!-- Add the internal service declaration (you can change android:label) -->
        <service android:name="wallpaperservice"></service>


   <service
            android:label="stam2" 
            android:name="anywheresoftware.b4a.objects.WallpaperInternalService"
            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/wallpaper" />
   </service>
<!-- End of internal service declaration -->

    </application>
   

</manifest>
 
Last edited:

boten

Active Member
Licensed User
Longtime User
You should uncheck the "do not overwrite" option and compile your app. You will see the declaration in the manifest file.
That's what I did (my previous post). The "new" androidmanifet.xml DOES contain the lines:

B4X:
<activity android:windowSoftInputMode="stateHidden"
 android:launchMode="singleTop" android:name="parm"
  android:label="parm" android:screenOrientation="unspecified"></activity>
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…