Search Unity

uLiveWallpaper - Develop Android Live Wallpapers with Unity!

Discussion in 'Assets and Asset Store' started by ZimM, Dec 20, 2015.

  1. Codest19

    Codest19

    Joined:
    Nov 24, 2012
    Posts:
    5
    I'm also getting just a black screen using Unity 2017.1.0f3. I export to Android Studio, run on device, and then it just shows a black screen with the "Settings" and "Set As Wallpaper" buttons. The buttons don't respond initially, but after pressing the back button they both work like normal. I tried using all three build systems (Internal, Gradle, ADT) with no different results.
     
  2. Fahrettin

    Fahrettin

    Joined:
    Mar 10, 2014
    Posts:
    81
    I finally make IsPreview property work from old replies with a simple script.
    Normally i use playmaker. When you check IsPreview property with playmaker it works when you open wallpaper in preview mode but after setting wallpaper it continues where it is left off. (Stays like in a preview mode)
    I cant find a solution for playmaker.
     
  3. again

    again

    Joined:
    Mar 3, 2013
    Posts:
    17
    Thank you.
    You check the isPreview propery like Fahrretin mentioned, with this you can manage to create the settings menu easily with unity completely.
    Implementing IAP is the tricky part as live walllpapers doesnt have activity and unity IAP need one to work.
     
  4. Magixapps

    Magixapps

    Joined:
    Mar 4, 2017
    Posts:
    55
    Hi
    I can download Demo for test ulivewallpaper ?
    if you have a link...
    Thank youuuu ^^
     
  5. droid4unity

    droid4unity

    Joined:
    May 10, 2017
    Posts:
    4
    I followed ZimM suggestion about IAP (Google) and created a plugin specifically for uLiveWallpaper. If anyone is interested in this plugin please go here and check the video :)
     
    1skription likes this.
  6. Magixapps

    Magixapps

    Joined:
    Mar 4, 2017
    Posts:
    55
  7. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    954
    Good news everyone!

    uLiveWallpaper 1.4.3 is now live on Asset Store!

    Change log:

    Improvements and fixes
    • Unity 2017.1 support.
    • Fixed a regression that caused Unity's built-in permission request dialog to be used when building from Unity 5.6.
    • Gradle build system is now used instead of ADT for generating the staging project when updating.
    • Fix incorrect path to proguard-ulivewallpaper.txt in created projects, preventing the release building from completing.
    • Fixed incorrect Unity Activity style on Unity 5.5 and older.
     
  8. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    954
    Please try the latest 1.4.3.0 version, the issue should be gone.
    As @trelobyte has said, it seems like something is not right with your setup. Please update everything to the latest versions and check if that solves the problem.
    Can you please check the black screen issue on the latest 1.4.3.0 version?
    Not sure what do you mean, could you please elaborate? There is no android.jar file in uLiveWallpaper.
    Standalone Unity Activity sends custom events to Unity when certain Activity lifecycle events occur, the full list is in the manual. You can subscribe to the LiveWallpaper.CustomEventReceived event and then you'll be able to know if Unity Activity is currently active.
    It seems like you've checked the "Create Unity Activity" checkbox while creating the project. If you don't need the Unity Activity, you'll now have to remove it manually from AndroidManifest.xml. "Update Project" only updates the Unity content for the project in order to prevent destructive changes to the project structure.
    Unity 2017.1 is now fully supported in the latest 1.4.3.0 version, black screen issue should be gone as well.
    Congratulations on the job well done! I'll keep it on my phone :)
    What kind of settings, native Android settings of Unity UI based? In both cases, it isn't really anything specific to uLiveWallpaper. Native Android settings are standard for Android, therefore, you can use any Android tutorials on that subject. Official documentation:
    http://developer.android.com/guide/topics/ui/settings.html
    As for Unity UI based settings - just approach them as you would approach settings in any game. You just have to subscribe to the LiveWallpaper.PreferenceActivityTriggered event and switch your settings UI GameObject on/off.
    Unity 2017.1 is now fully supported in the latest 1.4.3.0 version, black screen issue should be gone as well. Tested with 2017.1.0p2.
    My guess is that you are checking and storing the result of IsPreview only once. That value changes over time, though, so you have to put it under Update.
    The link is not available anymore, but I do send the evaluation package via email. Which email was yours? I think I've sent the evaluation package to everyone who asked... But I could have missed yours somehow.
    Wow, this is very nice :) Keep up the good work.
     
  9. Fahrettin

    Fahrettin

    Joined:
    Mar 10, 2014
    Posts:
    81
    Thanks for all the replies :)
     
  10. Zoryth

    Zoryth

    Joined:
    Dec 5, 2016
    Posts:
    50
    so I cant just add IAPS like in a regular Unity game?

    can you send me the evaluation version? thank you very much.
     
  11. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    954
    No, because usually all IAP expect there to an Activity, and live wallpapers are not bound to an Activity, instead they act as a service. So you'll probably need to do some Java programming on Android side. You might also want to look into IAP4LiveWallpapers by @droid4unity, which is specifically built for uLiveWallpaper.
    As for the evaluation version - sure, just send me a PM with your email, and I'll send you the evaluation version there.
     
  12. unitywlp

    unitywlp

    Joined:
    Jan 3, 2014
    Posts:
    146
    @ZimM i am using plugin to open gallery it require me to call jar method but when i build the apk i was not able to call
     
  13. Magixapps

    Magixapps

    Joined:
    Mar 4, 2017
    Posts:
    55
    Hi, thank you for the evaluation version, i have buy the complet version, really easy to use!

    For setting i have add your sample script (LiveWallpaper.PreferenceActivityTriggered) work perfect but when setting are on the screen and i go out, setting are on my wallpaper, you have sample script for that problem please?

    Thank you!!
     
    Last edited: Sep 2, 2017
  14. kiaxseventh

    kiaxseventh

    Joined:
    Jan 24, 2015
    Posts:
    6
    Hi @ZimM
    check your Skype please ;)
    I have problem with LiveWallpaperCompatibleUnityPlayerActivity becuse it is a Activity

    I need LiveWallpaperCompatibleUnityPlayerActivity extend froam AppCompatActivity

    AppCompatActivity supported more feature

    Thank you guy
     
  15. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    954
    Could you please elaborate? There is no problem in using third-party .jar libraries in live wallpapers.
    Just check the value of LiveWallpaper.IsPreview, and if it is false, hide the settings panel. That way settings could only be seen in preview mode.
    Since you have uLiveWallpaper Pro, you can just change the base class in the source code yourself. I won't probably include it with the plugin, since AppCompatActivity depends on Android Support Library, which is quite a beast, and very few people need that anyway for a live wallpaper.
     
  16. Dekata

    Dekata

    Joined:
    May 20, 2016
    Posts:
    46
    Hi @ZimM !
    I unable to run OnmouseUp() function in android side, but its ok when use onpointerup(). Hope you fix it soon
     
  17. Magixapps

    Magixapps

    Joined:
    Mar 4, 2017
    Posts:
    55
    I have this code but not work.
    If my wallpaper on my phone is the created wallpaper and i touche setting, my parametre not turn active.
    Can you correct that code please? Thank you! ^^


    import LostPolygon.uLiveWallpaper;

    class SettingOpen extends MonoBehaviour
    {
    public var TriggeredGameObject : GameObject;

    function Update()
    {
    if (LiveWallpaper.IsPreview == false)
    {
    LiveWallpaper.PreferenceActivityTriggered -= LiveWallpaperOnPreferenceActivityTriggered;
    }
    }

    function OnEnable() {
    LiveWallpaper.PreferenceActivityTriggered += LiveWallpaperOnPreferenceActivityTriggered;
    }

    function OnDisable() {
    LiveWallpaper.PreferenceActivityTriggered -= LiveWallpaperOnPreferenceActivityTriggered;
    }

    function LiveWallpaperOnPreferenceActivityTriggered() {
    TriggeredGameObject.SetActive(!TriggeredGameObject.activeSelf);
    }
    }
     
  18. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    954
    uLiveWallpaper has nothing to do about these events, they are handled by Unity. uLiveWallpaper merely passes the events. I also remember using OnMouseUp() without any issues, so perhaps you might be doing something wrong?.. Does it work for you in a regular Unity build?
    Your code is incorrect, you don't have to unsubscribe from the event when not in preview mode. Instead, just deactivate the GameObject. Something like this:
    Code (JavaScript):
    1.  
    2. import LostPolygon.uLiveWallpaper;
    3.  
    4. class SettingOpen extends MonoBehaviour
    5. {
    6.     public var TriggeredGameObject : GameObject;
    7.  
    8.     function Update()
    9.     {
    10.     if (LiveWallpaper.IsPreview == false)
    11.     {
    12.     TriggeredGameObject.SetActive(false);
    13.     }
    14.     }
    15.  
    16.     function OnEnable() {
    17.         LiveWallpaper.PreferenceActivityTriggered += LiveWallpaperOnPreferenceActivityTriggered;
    18.     }
    19.  
    20.     function OnDisable() {
    21.         LiveWallpaper.PreferenceActivityTriggered -= LiveWallpaperOnPreferenceActivityTriggered;
    22.     }
    23.  
    24.     function LiveWallpaperOnPreferenceActivityTriggered() {
    25.         TriggeredGameObject.SetActive(!TriggeredGameObject.activeSelf);
    26.     }
     
  19. oukaitou

    oukaitou

    Joined:
    Jan 10, 2014
    Posts:
    6
    Hello

    I got this error when creating the project, please help
    (Unity 2017.1.1f1, .Net 4.6)

    Code (CSharp):
    1. XmlException: The ':' character, hexadecimal value 0x3A, cannot be included in a name.
    2. System.Xml.XmlDocument.CheckName (System.String name) (at <611e64636ff745389933c69c817b2d4a>:0)
    3. System.Xml.XmlAttribute..ctor (System.Xml.XmlName name, System.Xml.XmlDocument doc) (at <611e64636ff745389933c69c817b2d4a>:0)
    4. System.Xml.XmlDocument.CreateAttribute (System.String prefix, System.String localName, System.String namespaceURI) (at <611e64636ff745389933c69c817b2d4a>:0)
    5. System.Xml.XmlDocument.ImportNodeInternal (System.Xml.XmlNode node, System.Boolean deep) (at <611e64636ff745389933c69c817b2d4a>:0)
    6. System.Xml.XmlDocument.ImportAttributes (System.Xml.XmlNode fromElem, System.Xml.XmlNode toElem) (at <611e64636ff745389933c69c817b2d4a>:0)
    7. System.Xml.XmlDocument.ImportNodeInternal (System.Xml.XmlNode node, System.Boolean deep) (at <611e64636ff745389933c69c817b2d4a>:0)
    8. System.Xml.XmlDocument.ImportNode (System.Xml.XmlNode node, System.Boolean deep) (at <611e64636ff745389933c69c817b2d4a>:0)
    9. LostPolygon.uLiveWallpaper.Editor.LiveWallpaperProjectBuilder.InsertXmlToDocument (System.Xml.XmlDocument document, System.String xmlFragment, System.String parentNodeName) (at G:/PROGRAMMING/Repos/BitBucket/uLiveWallpaper/UnityProject/Assets/uLiveWallpaper/Source/Internals/Editor/BuildPipeline/LiveWallpaperProjectBuilder.cs:685)
    10. LostPolygon.uLiveWallpaper.Editor.LiveWallpaperProjectBuilder.AddServiceNodeToManifest () (at G:/PROGRAMMING/Repos/BitBucket/uLiveWallpaper/UnityProject/Assets/uLiveWallpaper/Source/Internals/Editor/BuildPipeline/LiveWallpaperProjectBuilder.cs:480)
    11. LostPolygon.uLiveWallpaper.Editor.LiveWallpaperProjectBuilder.InjectLiveWallpaper () (at G:/PROGRAMMING/Repos/BitBucket/uLiveWallpaper/UnityProject/Assets/uLiveWallpaper/Source/Internals/Editor/BuildPipeline/LiveWallpaperProjectBuilder.cs:431)
    12. LostPolygon.uLiveWallpaper.Editor.LiveWallpaperProjectBuilder.PostProcessProject () (at G:/PROGRAMMING/Repos/BitBucket/uLiveWallpaper/UnityProject/Assets/uLiveWallpaper/Source/Internals/Editor/BuildPipeline/LiveWallpaperProjectBuilder.cs:224)
    13. LostPolygon.uLiveWallpaper.Editor.LiveWallpaperProjectBuilder.BuildProject () (at G:/PROGRAMMING/Repos/BitBucket/uLiveWallpaper/UnityProject/Assets/uLiveWallpaper/Source/Internals/Editor/BuildPipeline/LiveWallpaperProjectBuilder.cs:112)
    14. LostPolygon.uLiveWallpaper.Editor.LiveWallpaperBuildGuiUtility.CreateLiveWallpaperProject (LostPolygon.uLiveWallpaper.Editor.Internal.ProjectSettingsContainer projectSettings) (at G:/PROGRAMMING/Repos/BitBucket/uLiveWallpaper/UnityProject/Assets/uLiveWallpaper/Source/Internals/Editor/LiveWallpaperBuildGuiUtility.cs:132)
    15. LostPolygon.uLiveWallpaper.Editor.LiveWallpaperBuildWindow.CreateLiveWallpaperProject () (at G:/PROGRAMMING/Repos/BitBucket/uLiveWallpaper/UnityProject/Assets/uLiveWallpaper/Source/Internals/Editor/LiveWallpaperBuildWindow.cs:602)
    16. UnityEditor.EditorApplication.Internal_CallDelayFunctions () (at C:/buildslave/unity/build/Editor/Mono/EditorApplication.cs:118)
    17.  
     
  20. Dekata

    Dekata

    Joined:
    May 20, 2016
    Posts:
    46
    This issue only happen after i update uliveWallpaper, the pre version work well
     
  21. Fahrettin

    Fahrettin

    Joined:
    Mar 10, 2014
    Posts:
    81
    Hi again ,
    When i build apk from android studio it doesn't get app icon and app name from unity build settings.
    Do i need to change icon and app name from android studio (I know i can do it but unity is more easy for me) or do you know any solution for this problem ?
    Time to time my wallpaper restarts itself. I don't know why. Do you have any problem like restart ?
     
    Last edited: Sep 18, 2017
  22. Magixapps

    Magixapps

    Joined:
    Mar 4, 2017
    Posts:
    55
    IAP work with ulivewallpaper? on unity editor that work nice, but when i send on google play alpha version that not work, my button is 50% transparent and not work
     
  23. SolusNZ

    SolusNZ

    Joined:
    Jan 6, 2014
    Posts:
    5
    Is it possible to revert back to using non-emulated offset handling?

    When I drag over the "DefaultWallpaperOffsetEmulator" component, and uncheck "Emulation Enabled", it simply disables all offset handling altogether. I just want to use the Android reported offset, and maybe give the user the option to enable emulation if the offset isn't working. Any ideas?
     
  24. izul

    izul

    Joined:
    Mar 20, 2015
    Posts:
    2
    Hi,

    So, what is the difference between indie and pro, before i purchase this.
    Thanks :)
     
  25. Zumx

    Zumx

    Joined:
    May 12, 2014
    Posts:
    5
    It says in this thread at the very start and on the products if you read the descriptions.

    "Indie version has full functionality, but does not includes the plugin source code, which is available in Pro version." "Pro version includes full plugin Java and C# source code."
     
    izul likes this.
  26. Keitaro3660

    Keitaro3660

    Joined:
    May 20, 2014
    Posts:
    86
    wow what's with the support? i have sent email and message since 16 sept, but still no response.
    i hope you don't answer with "i don't get notification" :/
     
  27. izul

    izul

    Joined:
    Mar 20, 2015
    Posts:
    2
    Thank you, i choose to purchase indie license :)
     
  28. Magixapps

    Magixapps

    Joined:
    Mar 4, 2017
    Posts:
    55
    IAP not work, link with button http:// not work to?
     
  29. rerwandi

    rerwandi

    Joined:
    Dec 8, 2014
    Posts:
    531
    Is it possible to play video from Unity Video Player ?
     
  30. JAYDEEPs

    JAYDEEPs

    Joined:
    Sep 7, 2017
    Posts:
    1
    how can i get setWallpaper and Settings Button event?
     
  31. seven_

    seven_

    Joined:
    Sep 30, 2014
    Posts:
    34
    Hi,

    for those interested in another Wallpaper created with this plugin, we have just released the Live Wallpaper for our latest fish game: https://play.google.com/store/apps/details?id=com.bitbros.android.fishfarm3.googleplay.wallpaper.

    We decided to provide the Wallpaper as a separate app (using some data exchange between both apps), as the switching between the wallpaper and the "real" Unity activity took too long (heaps of textures and stuff might need to be unloaded and loaded) and was not properly reported in some of our advanced tests.

    Thanks a lot to ZimM for creating this plugin, making it possible to finally provide a Live Wallpaper with Unity!
     
  32. Gssev7

    Gssev7

    Joined:
    Jul 9, 2014
    Posts:
    9
    Hi, I Installed the plugin to Unity 2017.1.0f3. I created an android studio project for the virtual box demo and opened it in Android studio version 3. after a few gradle sync issues I got it to build successfully using gradle 4.1 and android plugin version 3.0.0 . when I tried running it on my phone it created the apk and did open it on my phone but with nothing showing. I tried just building the apk and transferred it to my phone and installed manually but just the same. I also tried downgrading the sdk tools to version 25 but that just did the same.
    The demo apk from the unity store works great so what is not working in my setup?
     
  33. Gssev7

    Gssev7

    Joined:
    Jul 9, 2014
    Posts:
    9
    Working now after the latest update of ulive wallpaper by the developer who was very helpful. It is working on android studio 3 with grable 4.1 and with the 2.3.3 plug-in.
     
    Synean likes this.
  34. Gssev7

    Gssev7

    Joined:
    Jul 9, 2014
    Posts:
    9
    Ulivewallpaper makes any unity scene wallpaper easily . I'm using Playmaker and I can get a settings panel to open on preview/settings mode with tapping twice easy enough but when I set wallpaper ,my unity object settings panel is still there. I put a button on it to use to deactivate it but I want that to happen when I press the set wallpaper option which is an android button. Can this be done with playmaker? I tried using (is in live wallpaper ) playmaker action with a true event switching the object off but it doesn't seem to be working.
     
  35. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    954
    Please update to the latest uLiveWallpaper version, the issue is fixed.
    Can you please elaborate what exactly are you trying to do? You also mention "Android side", but Android has no OnMouseUp or OnPointerUp.

    Please update to the latest uLiveWallpaper version, the issue with project building is fixed.
    As for the wallpaper restarting itself - I never heard of an issue like that. Can you please send me logcat logs for when the restart occurs, so I can investigate the issue?
    I'm truly sorry. I remember reading your email and doing some research on the subject you asked, but somehow I forgot to actually give you a reply. Well, that thing is now included in uLiveWallpaper anyway :)

    How are you integrating IAP? All regular IAP implementations expect there to an Activity, and live wallpapers are not bound to an Activity, instead they act as a service. So you'll need to do some Java programming on Android side. You might also want to look into IAP4LiveWallpapers by @droid4unity, which is specifically built for uLiveWallpaper.
    As for the links - just use LiveWallpaper.OpenURL instead of the Application.OpenURL.
    Yes, video plays without any problems in latest Unity versions.
    You're welcome :) That is really nicely done, congratulations on the release!
    Hm, that should work. The way I would do is use the LiveWallpaperIsInPreviewMode action, enable "Each Frame" and disable the object on the false event.
     
  36. Gssev7

    Gssev7

    Joined:
    Jul 9, 2014
    Posts:
    9
    Thanks
    Using livewallpaperisinpreviewmode did work , I'd not ticked the each frame previously!
     
  37. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    954
    uLiveWallpaper is currently on Mega Sale for 30% off! If you ever dreamed of making live wallpapers with ease, this is a good chance to start doing that :)


    The 30% discount also works for Indie → Pro upgrade, so if you own the Indie version... You know what to do next :)
     
  38. JustZht

    JustZht

    Joined:
    Apr 5, 2015
    Posts:
    16
    Hi, ZimM
    I am using your plugin to create a Mapbox based LWP and it's pretty easy thanks to your effort, and I want to implement the WallpaperColors API (documentation : https://developer.android.com/about/versions/oreo/android-8.1.html#wallpaper) in my app. Since I am using the indie version, I can't directly change the UnityWallpaperService behavior, could you please add this feature? Thanks. :)
     
  39. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    954
    You don't have to directly change the UnityWallpaperService. Just implement this functionality in the generated LiveWallpaperService class, it is inherited from UnityWallpaperService. Just because sources for UnityWallpaperService are not available in Indie doesn't means inheritance stopped working :)
     
  40. JustZht

    JustZht

    Joined:
    Apr 5, 2015
    Posts:
    16
    I tried it last night and now the code in LiveWallpaperService looks like this:

    Code (CSharp):
    1. public static WallpaperService.Engine engine;
    2.  
    3. public Engine onCreateEngine() {
    4.         return new LiveWallpaperService.UnityWallpaperEngine();
    5.     }
    6.     public final class UnityWallpaperEngine extends UnityWallpaperService.UnityWallpaperEngine
    7.     {
    8.         public void onCreate(SurfaceHolder surfaceHolder) {
    9.             super.onCreate(surfaceHolder);
    10.             LiveWallpaperService.engine = UnityWallpaperEngine.this;
    11.         }
    12.  
    13.         public void onDestroy() {
    14.             super.onDestroy();
    15.             LiveWallpaperService.engine = null;
    16.         }
    17.  
    18.         @Override
    19.         public WallpaperColors onComputeColors()
    20.         {
    21.             if (Build.VERSION.SDK_INT >= 27)
    22.             {
    23.                
    24. Bitmap b = Bitmap.createBitmap(getSurfaceHolder().getSurfaceFrame().width(), getSurfaceHolder().getSurfaceFrame().height(), Bitmap.Config.RGB_565);
    25. // do some magic stuff from getSurfaceHolder().lockHardwareCanvas() to copy the screen content to the bitmap
    26.                 WallpaperColors colors = WallpaperColors.fromBitmap(b);
    27.                 return colors;
    28.             }else
    29.             {
    30.                 return super.onComputeColors();
    31.             }
    32.         }
    33.     }
    Currently I have a problem accessing live screenshot from the live wallpaper engine. It seems that getSurfaceHolder().lockHardwareCanvas() can get me a canvas but it can't directly draw to a bitmap. Is there any method to do it on the Android side without getting screenshot from Unity and passing it to Android? Thanks :)
     
  41. jerry2157

    jerry2157

    Joined:
    Mar 23, 2014
    Posts:
    17
    Hi everyone, just a tip in the futue, if someone has an alert in unity but it compile, uLive will not show the liveWallpaper, it will just open the app like any other game but the Live Wallpaper will jus not work. I found this because in my adventure optimizing my size apk and launch scene time i unselect 'Read/Write' from 3dModels, and unity show me like 20 red alerts but it was compiling, but when i tried to compile the live wallpaper in android studio it wasn't working. so it's a tip for the future.
     
  42. abotrix

    abotrix

    Joined:
    Oct 21, 2015
    Posts:
    5
    Hello. In the UnityPlayerActivity.java it says:
    /**
    * Override this method to implement custom layout.
    * @return the {@code SurfaceView} that will contain the Unity player.
    */
    protected SurfaceView onCreateLayout() {
    // I can't use this...
    //setContentView(R.layout.fragment_main);

    return super.onCreateLayout();
    }
    How do I go about using my own xml layout to put on top of the Unityplayer? Thanx
     
    Last edited: Jan 14, 2018
  43. sisaka

    sisaka

    Joined:
    Sep 24, 2015
    Posts:
    1
    Touch input doesn't work, for unity does not receive any input on unity 5.4.5 projects, also unity 5.6.4 has an issue where I'm unable to implement onActivityResult on the preferenceactivity, for whatever the reason onActivityResult never gets called, right when startActivityForResult is called, it closes the preferenceactivity and re-opens the live wallpaper preview activity.
     
    Last edited: Jan 29, 2018
  44. unity_PLHfJs-vCd4KHA

    unity_PLHfJs-vCd4KHA

    Joined:
    Jan 17, 2018
    Posts:
    2
    Is there any demo version of uLiveWallpaper?
     
  45. mahdi_rad

    mahdi_rad

    Joined:
    Jan 21, 2018
    Posts:
    1
    hi
    great work but in my country(Iran) 60$ is a little high price...
    Can you give me a little discount?
    tanks
     
  46. Graham-B

    Graham-B

    Joined:
    Feb 27, 2013
    Posts:
    225
    When I try to build for PC Standalone, I get the error "Assets/uLiveWallpaper/Source/Exposed/WallpaperOffsetEmulatorBase.cs(4,60): error CS0246: The type or namespace name `SingletonMonoBehaviour' could not be found. Are you missing an assembly reference?"

    How can I build to other platforms besides Android?

    Thank you.
     
  47. wechat_og5za0vr5ZmPscZOh3SEmnoMKzWE

    wechat_og5za0vr5ZmPscZOh3SEmnoMKzWE

    Joined:
    Dec 24, 2017
    Posts:
    1
    Hi,
    Can I set the wallpaper without showing the preview page? Is there a function to set the wallpaper? I'm now developing an app and there will be a button like "set wallpaper" (It's just a normal button in a page in my app, not the button in that preview page). Once I clicked this button, the wallpaper is set. Can I do that?
    If I can't, can I change the text "set wallpaper" on that preview page?
     
    Last edited: Feb 19, 2018
  48. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    954
    My feel is that no, Android can't directly access the Unity's canvas since it's GPU-accelerated and entirely separate from how Android does things. It's not that hard to pass the screenshot to Android, though - you can pass it just as a byte[].
    You can use setContentView just fine. Just make sure to have a SurfaceView in your layour, and return it in that method:
    Code (JavaScript):
    1.     protected SurfaceView onCreateLayout() {
    2.         setContentView(R.layout.activity_main);
    3.         return findViewById(R.id.surfaceView);
    4.     }
    5.  
    The input problem was a problem in some Unity versions. It was a Unity issue, not of uLiveWallpaper. Just update Unity.
    Unity version in entirely unrelated here. PreferenceActivity is pure Android. However, the reason PreferenceActivity gets closed is because of this bit of code in onPause:
    Code (CSharp):
    1.         // Close the Activity. This is required because preferences could be changed from Unity,
    2.         // but values in Activity won't be refreshed. By closing the Activity each time when it goes
    3.         // into background, we can be sure it'll always have up-to-date values.
    4.         finish();
    If that behavior interferes with what you arr trying to do, you are free to modify the template code however you need.
    Yes, there is. Contact me via email of PM and I'll send you an evaluation version.
    Sorry, I don't offer personal discounts, but in any case - personal discounts are not possible on Asset Store, unfortunately.
    Please try uLiveWallpaper 1.4.6. The issue should be fixed there.
    You can't. It is an Android security restriction, there is nothing to be done about it. The wallpaper preview screen is part of Android, so no, you can't change the "Set wallpaper" text either.
     
  49. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    954
    Good news everyone!

    uLiveWallpaper 1.4.6 is now live on Asset Store!

    Change log:
    • Fixed not being able to build a project when using uLiveWallpaper Indie and build platform other than Android.
    • Unity 2018.1 support.
    • Bumped minimal Unity verrsion to 5.3.1.
     
    abotrix and ArturMaciag like this.
  50. oukaitou

    oukaitou

    Joined:
    Jan 10, 2014
    Posts:
    6
    Hello

    I got a problem when using uLiveWallpaper with Custom Activity (Not sure if it's a bug)

    I created an Activity inherit from LiveWallpaperCompatibleUnityPlayerActivity, when I opened Activity and Set Wallpaper then press back button everything works fine, but when I pressed home button to return to Launcher, live wallpaper will not pause when screen off or launch other applications.

    I checked the log and found when pressed home button 'visibleHoldersCount' is 2 (wallpaper and activity), I think that's the reason.
     
unityunity