How do I change the package name of a live wallpaper in eclipse?

Discussion in 'Archive - LWC 2.1' started by stollo770, Oct 25, 2012.

  1. stollo770 LWC Major

    Member Since:
    Feb 2, 2012
    Message Count:
    236
    Likes Received:
    64
    Trophy Points:
    200
    I am trying to give settings functionality to the users of my free apps because I recently integrated ads and I feel like full settings control would make up for it a little. I have been successful in putting ads into the full version of my live wallpapers buy google play won't let me upload it as an update to the free live wallpaper. The error is that the package names differ, with the full one being (for example) livewallpaper.apk and free one livewallpaperfree.apk. I have tried to change the package name in eclipse from livewallpaper to livewallpaperfree but when I build it and attempt an install I get an error saying that the package could not be phrased correctly, so obviously I am doing something wrong. How do can sucessfully change the package name of a livewallpaper in eclipse so Google play will accept it as an update? Please help.
  2. stollo770 LWC Major

    Member Since:
    Feb 2, 2012
    Message Count:
    236
    Likes Received:
    64
    Trophy Points:
    200
    Somebody please help me....
  3. Vas Origin

    Member Since:
    Jan 4, 2012
    Message Count:
    770
    Likes Received:
    175
    Trophy Points:
    500
    Guide by Alex:

    Refactoring a project to a different package name in Eclipse is a haste and can corrupt your files if not done correctly. Here's a quick step-by-step guide on how to do so properly.
    In fact, this procedure is handy when starting a new project using an previous project as a template.
    1. Rename Application Package (step 1 of 2):
    Right-click on root project node in eclipse and select Android Tools>Rename Application Package
    Type your new package name here and click OK. Confirm again when it asks you to change launch configurations.
    2. Rename Application Package (step 2 of 2):
    Right-click on the src package name node and select Refactor>Rename...
    Type the same package name as you typed in the preveous step and make sure only the 1st checkbox is checked. Click OK.
    Confirm by clicking OK if anything pops up.
    3. Now open the Android Manifest.xml and manually rename any occurances of the old package name to your new package name
    4. Then open the lwp_resource.xml (if you have it in your project tree) and rename the android:settingsActivity attribute of the wallpaper tag
    to reflect the path to your settings java file like so: android:settingsActivity="<packagename>.LiveWallpaperSettings".
    5. Finally open the strings.xml and rename the application_name and service_name element values to reflect your project name.
    (this is not your package name, this is the name the users sees. Both values should be the same)
    stollo770 likes this.
  4. Maximus Seasoned Vet

    Member Since:
    Jan 16, 2012
    Message Count:
    122
    Likes Received:
    42
    Trophy Points:
    100
    I was JUST looking for this, thanks guys!
    Vas likes this.
  5. stollo770 LWC Major

    Member Since:
    Feb 2, 2012
    Message Count:
    236
    Likes Received:
    64
    Trophy Points:
    200
    Thanks Vas!
  6. wladca Active Member

    Member Since:
    Mar 20, 2013
    Message Count:
    50
    Likes Received:
    4
    Trophy Points:
    50
    How I can open my apk file ?

    When I open File-> open file -> mywallpaper.apk ?

    please help
  7. Vas Origin

    Member Since:
    Jan 4, 2012
    Message Count:
    770
    Likes Received:
    175
    Trophy Points:
    500
    What are you trying to do? You can open APK files on an Android device or emulator.

Share This Page