Search Unity

uLiveWallpaper - Develop Android Live Wallpapers with Unity!

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

  1. Christian_Alder

    Christian_Alder

    Joined:
    Dec 7, 2012
    Posts:
    20
    Thanks again for the awesome asset, here is my first ever Live Wallpaper that I'd been wanting to make for a while. I have still a lot to learn as I would like to expand the settings to include a proper colour picker (for now it works just with a 6 char hex code)

    https://play.google.com/store/apps/details?id=net.moosecode.livewallpaper.buddha.lite

    Looking forward to keep using the asset and produce more (and hopefully better) live wallpapers; Quick question for anyone else who has made a live wallpaper this way (and with a free/paid versions) how do you manage the two versions? I used one Unity project, to build two uLiveWallpaper Android projects (Full and Lite), and just making sure to make the relevant changes and update the correct folder when updating (Or in this case, I made the fully featured one, then made another build folder with some settings disabled) It's a bit unwieldy, so I'm open to learn other approaches you might have to it.

    EDIT
    Here are 3 codes for the full version of my first live wallpaper, available from 17/12/16 to 31/12/16.

    LPHJ47G8UD9VGHK2XSRJYDR
    G33GE1UNDTMBYBV95MKY72G
    G04HS3Q50NX9EA6SY6TC774
     
    Last edited: Dec 16, 2016
  2. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    945
    It's still better to just have separate APK for different platforms. Play Store allows that easily, so you'll get both the download size reduction and x86 support.
    There is a TapToOpenSettings script included with the package. It's really simple and well documented, just open it and see how it works.
    When LiveWallpaperUnityFacade.getEventsProxy().preferencesActivityTriggered() is called on the Java side, a LiveWallpaper.PreferenceActivityTriggered event on Unity side is called. Just subscribe to that event and do whatever you need in the handler. Nothing is called automatically by default, so I'm not sure what do you mean in the last part.
    In a nutshell, live wallpapers have no Activities, but you can add a Settings Activity and put ads there. But really, ads don't work well with live wallpapers, since most of the time user only sees the wallpaper itself. I'd recommend using in-app purchases or free/paid version model instead.
    That's a really nice wallpaper! Quite minimalistic, but the quality definitely shines through. The only slightly annoying thing I've found is lack of the option to turn off the "double tap to open settings" feature, though, to be honest, I was unable to get false positives.

    As for your question, there are three options I see:
    1) Symlink the "app\src\main\" folder from one Android Studio to another. This removes the need to do the update twice, but you'll still have two different Android Studio projects.
    2) Dive into more advanced features of Android Studio and Gradle. You can, for example, make a "releaseFree" and "releasePremium" build targets, and have a variable defined on Java side depending on the build type. It's fairly easy, here are links with some examples and info:
    http://stackoverflow.com/questions/5590203/create-free-paid-versions-of-application-from-same-code
    http://stackoverflow.com/questions/35203341/build-lite-and-full-version-of-app
    After that, you'll have to write some code to read the Java variable from Unity.
    This way, you won't need two separate Android Studio project, just a single unified one.
    3) Don't have two different products on the Play Store for the Free and Full versions, instead have just one that allows purchasing Full features using in-app purchases. This is perhaps the best option: single Android Studio project, single Play Store product, no need for users to delete the Free and install the Full version if they decide to purchase, and no nee for users to manually migrate settings to Pro. But perhaps the trickiest to implement.
     
  3. Christian_Alder

    Christian_Alder

    Joined:
    Dec 7, 2012
    Posts:
    20
    Ah I completely forgot to implement that option; It will be part of an update some time :) I made it triple tap instead of double so it wasn't so easy to open.

    Awesome suggestions, thank you! I think I will look into the first or second option next time simply for ease of use as a dev; The third option would be the dream however like you said probably the trickiest (for me anyway) to implement. I could probably leverage the help from a one of the various IAP helpers (Ultimate Mobile asset, or even Unity itself has a service) which might make it easier to manage; Something I will consider and look into more in time.

    For now, it's back to making a couple of games for me; but I'm really looking forward to the next Live Wallpaper I make because using your asset coupled with Unity makes it very approachable, and fun. Thanks!
     
  4. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    945
    Probably not, if you want to have the puchase button on the settings screen - you'll have to do it using Java on Android side.
     
  5. Christian_Alder

    Christian_Alder

    Joined:
    Dec 7, 2012
    Posts:
    20
    Damn, you're right now I think about it some more. Well, looks like I got some homework to do - as that would be (like you say) the most ideal scenario for both dev and user side - just needs that extra bit of work from me before hand. Thanks for the tips :)
     
  6. ethanwgross

    ethanwgross

    Joined:
    Jun 25, 2014
    Posts:
    83
    Quick question, regarding something completely different. Is there a way to modify the tap settings with the Playmaker global event "Multi-Tap Detected"? Or is this dependent entirely on the C# script "Tap to Open Settings"?

    On a similar note, I could not find any clues in the docs or demos on how to implement that or the "PreferencesActivityTriggered" global event in Playmaker.

    Also, I am really stuck with trying to apply general fps and quality settings through a custom UI drop down. If anyone has done this successfully, I would appreciate some pointers.

    Admittedly, I tend to overlook things sometimes so apologies if this is already outlined somewhere. Thanks for your consideration in helping me out.
     
    Last edited: Dec 24, 2016
  7. Mebsoftware

    Mebsoftware

    Joined:
    Dec 21, 2015
    Posts:
    13
    Hi ZimM. When ProGuad is activated, there is a problem. I am producing apk without any problems, but the application is not working on the phone. I am using proguard.txt file which is created in android files.What is the problem? Could you check if Proguard is working?
    Unity version 5.4.2
     
    Last edited: Dec 24, 2016
  8. Mebsoftware

    Mebsoftware

    Joined:
    Dec 21, 2015
    Posts:
    13
  9. ethanwgross

    ethanwgross

    Joined:
    Jun 25, 2014
    Posts:
    83
    thank you : )! Looks Great
     
  10. Deleted User

    Deleted User

    Guest

    We would like to play a video clip in a uLiveWallpaper. We have tried Handheld.PlayFullScreenMovie(..) with a MP4-file: It works fine in a regular Unity-project running on an Android-device, but does not work in uLiveWallpaper..

    Please help.
     
  11. Christian_Alder

    Christian_Alder

    Joined:
    Dec 7, 2012
    Posts:
    20
    Love how you've approached the settings menu; that allows a lot more flexibility :)
     
  12. ethanwgross

    ethanwgross

    Joined:
    Jun 25, 2014
    Posts:
    83
    Hey there, just wanted to return some kindness for all the premium wallpapers that everyone has shared so generously. Im open to feedback but please keep in mind, I'm a beginner at this so be nice : ) Sorry about the FATness right now, getting ready to create a new build of it as ARMv64 so it should be slimmed down quite a bit. Thanks for any comments and I would really appreciate some stars and a review. ; )

    369VYTAT7CHUZCJ3RP4067J

    X4LMYCCCMW0J6HJ3DLSBLR4

    SSYDQ4CRLYJHUJ08U8DYXR0

    ZMFTNL82X8E81U558FL11U5

    QMR73TMQM85JX8K7SL631U0
     
    DRIVER1ksa likes this.
  13. grimmy

    grimmy

    Joined:
    Feb 2, 2009
    Posts:
    396
    Hi, I was wondering what are the limitations of this plugin/wallpapers. For example I want my data to be able to communicate with the web to download data. Possible? Are there known restrictions when working with wallpapers. ie limited functionality. Cheers
     
  14. neodorus

    neodorus

    Joined:
    Mar 4, 2015
    Posts:
    40
    Hey Mebans, very nice LWP you've got there, congrats.
    Would you be so kind to tell me how are you closing the menu when you hit "set wallpaper"? I've managed to open a custom unity settings screen, but I can't close it (I can use an ok button, but it's not very elegant).
    Thanks in advance.
     
  15. Mebsoftware

    Mebsoftware

    Joined:
    Dec 21, 2015
    Posts:
    13
    Hi neodorus. If there is anything else you wonder, help again.
    Code (CSharp):
    1. public Gameobject canvas;
    2.  
    3. void Update () {
    4.  
    5.  
    6.         if (LiveWallpaper.IsPreview) {
    7.                                     canvas.GetComponent<Canvas> ().enabled = true;
    8.                    
    9.     }
    10.  
    11. } else {
    12.         canvas.GetComponent<Canvas> ().enabled = false;
    13.     }
    14. }
     
    neodorus likes this.
  16. neodorus

    neodorus

    Joined:
    Mar 4, 2015
    Posts:
    40
    Thank you, sir!
     
  17. ZimM

    ZimM

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

    uLiveWallpaper 1.4.1 is now live on Asset Store!

    Change log:

    New features
    • Added LiveWallpaper.GetCurrentWallpaperPackageName() method that retrieves the package name of the currently set live wallpaper.
    • Improved PlayMaker integration. Added corresponding actions for APIs that were only available from C#. Added field for the default value to the LiveWallpaperPreferencesGet* family of actions (this is a breaking change, make sure you FSMs get values correctly). Fixed occasional bugs. Improved the demo.
    Improvements and fixes
    • Set the default value of LiveWallpaper.MultiTapDetector.NumberOfTaps to 3 in Editor for consistency with the native Java implementation.
    • UnityPlayerActivity now has the standard UnityThemeSelector theme by default.
    • Fixed an issue with LiveWallpaper state properties not being set at the very first frame.
    • Fixed Unity player not resuming immediately after setting wallpaper on some devices.
    • Fixed DefaultWallpaperOffsetEmulator fling gesture velocity being dependent on device resolution in pixels.
     
    ethanwgross likes this.
  18. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    945
    Now on to answers.
    Well, there is now in 1.4.1 :) Check out the actions list for actions to get/set the multitap detector settings. The "Tap to Open Settings" C# script is just a demo, it just uses LiveWallpaper.MultiTapDetector API as you can as well.
    The same as any other PlayMaker events. "LIVEWALLPAPER PREFERENCE ACTIVITY TRIGGERED" is the name of the event, and it is registered automatically along with other uLiveWallpaper events. What problem are you having with it, exactly?
    Custom UI dropdrops, as in, using Unity UI? Well, the general idea is to listen for drop down value changes, get the value in the event handler and then call QualitySettings.SetQualityLevel, for example. This isn't anything specific to uLiveWallpaper, all standard Unity stuff. What specific problem are you having with this?
    I've checked. Indeed, uLiveWallpaper did not included a corresponding ProGuard file, but there is also a problem on the Unity side when exporting Android projects. Basically, the ProGuard template was broken... Anyway, I've taken care of that, uLiveWallpaper now supports ProGuard correctly when creating projects in Unity 5.5 or Unity 5.6 (beta).
    Great job! I especially like how you've managed the custom preferences UI, and the amount of said preferences :)
    Handheld.PlayFullScreenMovie() won't work with a live wallpaper, since it basically opens a new Activity in front of everything, which is not something that you would want for live wallpaper anyway. If you actually want that, you'll have to do it in Android Studio using Android SDK. Otherwise, you'll have to use MovieTexture to draw the video clip inside your scene.
    Everything you can do in Unity works with live wallpapers as well. The plugin itself imposes no limitations. So of course you would be able to communicate with the web like you would usually do. The only difference is when it comes to native Android API stuff, since live wallpapers is a Service, not an Activity, so you won't be able, for example, to show fullscreen ads. But for a regular Unity project - there are no limitations.
    You can make this piece of code a bit clearer if you rewrite it this way:
    Code (CSharp):
    1.     public Gameobject canvas;
    2.    
    3.     void Update () {
    4.         canvas.GetComponent<Canvas> ().enabled = LiveWallpaper.IsPreview;
    5.     }
    6.  
     
    neodorus likes this.
  19. ethanwgross

    ethanwgross

    Joined:
    Jun 25, 2014
    Posts:
    83
    Thanks for taking some time to answer these questions. I really appreciate the update as that geared some things up for me and your answer clarified some confusion I had with the quality settings. Keep up the awesome creations.
     
  20. neodorus

    neodorus

    Joined:
    Mar 4, 2015
    Posts:
    40
    Thanks @ZimM for clarifying that piece of code.
    Does anyone have any idea what's causing this bug? It's happening when I'm rotating the screen (if I call the preview, it's getting fixed).
     

    Attached Files:

  21. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    945
    Are you using Unity 5.5.0? That version has a bug that leads to this, you must update to at least Unity 5.5.0p2.
     
    neodorus likes this.
  22. neodorus

    neodorus

    Joined:
    Mar 4, 2015
    Posts:
    40
    I have 5.5.0f3 (and there are no updates available)
    Thanks
     
  23. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    945
    That's precisely the only mainline Unity version with this bug. How are you checking updates?Unity 5.5.1 has been out for two weeks now :)
    https://unity3d.com/get-unity/download/archive
     
    neodorus likes this.
  24. neodorus

    neodorus

    Joined:
    Mar 4, 2015
    Posts:
    40
    Holy S***, that's weird, I've been trying to update it via the internal "check for updates" menu. Thanks for the hint. :B
     
  25. Mebsoftware

    Mebsoftware

    Joined:
    Dec 21, 2015
    Posts:
    13
    Hi Zimm. At the menus, I will use the input field. But when I click to write, the keyboard does not open. Is there an idea for this?
     
  26. ethanwgross

    ethanwgross

    Joined:
    Jun 25, 2014
    Posts:
    83
    ya I agree : ) personally, I have not been able to successfully check for an update via internal menu for almost 2 years. Always just says "the editor is up to date" I learned to always go to the website and just download the latest version from there.
     
    neodorus likes this.
  27. Deathfate

    Deathfate

    Joined:
    Sep 10, 2012
    Posts:
    46
    I have a problem with the activity attached to the wallpaper.

    The first time I open the app I don't have all required permissions so it asks for them and unity then starts. The problem is that the variable UnityPlayer.currentActivity isn't set in this case nor is fired the customevent "UnityActivityOnStart".

    This is a huge problem for me to be honest as a lot of plugins I use try to access to UnityPlayer.currentActivity and I get a ton of null pointers and my app crashes out. I know is a one time bug but is the first impression that the user gets.

    I repeat this doesn't happen the second time i open the app if I allowed the permissions.

    If there is any way to fix/hack this in the indie version overriding the onStart or the onResume methods?

    Thank you.

    EDIT: Im using 1.4.1.0 released this week
     
  28. kafanasiff

    kafanasiff

    Joined:
    Sep 25, 2013
    Posts:
    31
    Hi, thanks for making this plugin!

    I've been trying to get IAP working with it for a few days and was wondering if you could maybe answer some questions.

    Please correct me if I'm wrong, but I assume some additional setup in Android Studio is required to use the Unity In-App Purchasing service? It looks like at very least the billing permission is not automatically added to the manifest, and there is a library that also needs to be added to the project... I've been following the online guides about implementing IAP, including this one which talks about project setup: https://developer.android.com/google/play/billing/billing_integrate.html.

    Does anybody have any experience integrating IAP with uLiveWallpaper, and if so, am I missing something obvious? Maybe setup happens behind the scenes when creating the uLiveWallpaper project or something and I'm just messing up the implementation...

    On the unity side, I'm using a Purchaser script very similar to the one described here: https://unity3d.com/learn/tutorials/topics/analytics/integrating-unity-iap-your-game.

    I'm also using the Basic Android settings activity, trying to make an IAP when a list preference is changed. Not the sleekest implementation I know, but I'm converting old live wallpapers made with uni2lwp, which all use the basic settings. Can post some code if that would be helpful...

    Would really like to figure out the IAP implementation before I convert everything to using a Unity scene for settings instead of the basic settings menu... Is the required implementation for IAP any different using a Unity settings scene versus the basic menu? Thanks again!
     
  29. hanyabbas

    hanyabbas

    Joined:
    Jun 28, 2015
    Posts:
    5
    DevMember likes this.
  30. again

    again

    Joined:
    Mar 3, 2013
    Posts:
    12
    Hi Zimm,
    first of all I'd like to thank you and congratulate for such a great asset.

    One problem I noticed so far is that the fps settings doesnt have any effect. Not only in my wallpaper but in your exsample virtual box too. I tried to set it to 10fps as you should definitelly see the stutter with this value, but its still smooth as butter. Do you or anyone else have any advice how to make it work?

    Thanks in advance and have a nice day.
     
  31. Deathfate

    Deathfate

    Joined:
    Sep 10, 2012
    Posts:
    46
    Have you tried disabling vertical synchronization? Either in your graphic settings or using
    QualitySettings.vSyncCount = 0; in the Start() of one of your scripts
     
  32. kafanasiff

    kafanasiff

    Joined:
    Sep 25, 2013
    Posts:
    31
    I think the asset-maker might be on vacation at the moment, but just fyi I had the same issue and had to explicitly apply the changes in the graphics quality and frames per second preferences with code in the LiveWallpaperOnPreferenceChanged listener method like this:

    Code (CSharp):
    1. int quality = int.Parse(LiveWallpaper.Preferences.GetString("graphics_quality", "3"));
    2. QualitySettings.SetQualityLevel (quality, false);
    3. int fps = int.Parse (LiveWallpaper.Preferences.GetString ("frames_per_second", "30"));
    4. Application.targetFrameRate = fps;
    5.  
    You can adjust the quality levels in Project settings -> Quality Settings. Just a heads' up that I experienced a crash on my Android device when I set Texture Quality to less than Full Res, so the default Fastest setting was causing the wallpaper app to hang and I had to get rid of that option...
     
  33. again

    again

    Joined:
    Mar 3, 2013
    Posts:
    12
    @Deathfate
    Didnt tried that. Ill try, thanks for tip ;-)

    @kafanasiff
    Thank you for your solution and for the additional info. I will try that if turning vsync off wont fix it.

    Ill let you know...

    EDIT:
    Disabling vsync didnt fix it.

    EDIT2:
    well ... kafanasiff solution doesnt work too...
    The problem is not with fetching variables to the Application.targetFrameRate that works just fine ... the problem is that even if your Application.targetFrameRate is 1, it renders as much fps as your hardware can handle ...

    FINALEDIT:
    so it was just me beeing dumb ... vsync value is not shared through graphics quality presets so I had to turn it off on all of them one by one.... (not just on one which I was not actully using:)

    Thanks again for your support and have a nice day
     
    Last edited: Feb 18, 2017
  34. kafanasiff

    kafanasiff

    Joined:
    Sep 25, 2013
    Posts:
    31
    Ah thank you! I didn't realize the fps setting was only working on the graphics quality presets that had vsync disabled. Helped me find a bug in my app that I didn't even realize was there :)
     
  35. again

    again

    Joined:
    Mar 3, 2013
    Posts:
    12
    Cool, glad I could help you a bit too ;)
     
  36. Breathtaker

    Breathtaker

    Joined:
    May 21, 2015
    Posts:
    13
    Hi, ZimM! I started my new project, update uLiveWallpaper and get strange issue while build apk.

    CommandInvokationFailure: Unable to merge android manifests. See the Console for more details.
    C:/Program Files/Java/jdk1.8.0_45\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:/sdk\tools" -Dfile.encoding=UTF8 -jar "C:\Program Files (x86)\Unity 5.5.1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -

    stderr[

    ]
    stdout[
    Warning: [Temp\StagingArea\AndroidManifest-main.xml:12, C:\My Unity Proj\Projects\ProjName\ProjName\Temp\StagingArea\android-libraries\LP_uLiveWallpaper\AndroidManifest.xml:3] Main manifest has <uses-sdk android:targetSdkVersion='24'> but library uses targetSdkVersion='25'
    ]
    exit code: 1
    UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
    UnityEditor.Android.AndroidSDKTools.RunCommandInternal (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
    UnityEditor.Android.AndroidSDKTools.RunCommandSafe (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
    UnityEditor.HostView:OnGUI()

    I have indie license. Have you any ideas how i can fix that?
     
    Last edited: Feb 20, 2017
  37. Deathfate

    Deathfate

    Joined:
    Sep 10, 2012
    Posts:
    46
    I think the message is pretty clear, just change your main manifest from uses-sdk android:targetSdkVersion='24' to sses-sdk android:targetSdkVersion='25' and the problem will be solved
     
  38. Breathtaker

    Breathtaker

    Joined:
    May 21, 2015
    Posts:
    13
    I fix that issue by creating folders: Assets\Plugins\Android and put my custom AndroidManifest.

    Still don't understand why i need make such things. earlier i don't have problems like this.
     
  39. again

    again

    Joined:
    Mar 3, 2013
    Posts:
    12
    Hello guys,
    If found two dissapointing bugs:
    1#
    When I enable gyro (input.gyro.enable=true) in my unity scene (on empy gameobject in start function), then when I hit settings in wallpaper preview, the whole app stucks for like 2 seconds what is pretty annoying. Without gyro enabled its instant. Im using the invisible closing settings which allows me to create custom unity ui, that said, everytime user hits "settings" he has to wait like 2 seconds before the menu show up.

    2#
    When I multitask in landscape (from another app that allows landscape orientation) the wallpaper stays portrait but 90degree rotated, so piece of it is cut out, and the rest is flickering. This doesnt happen in provided virtualbox demo apk, so mr. Zimm definitelly knows how to solve it, however, when I open the virtualbox scene in unity, export with ulivewallpaper then build and run in android studio, this bug occurs even here.

    I would really appreciate any info about theese bugs, mainly from mr. Zimm but also from anyone who have some tips or solutions.

    Thanks in advance
     
    Last edited: Feb 24, 2017
    corpsinheretoo likes this.
  40. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    945
    That item pretty much never works :) Unity staff updates the "current" version manually in a few months after the version is released, so... Just forget about it.
    The keyboard will not open, because doing that will require opening a dialog Activity for the input. This is not something possible with live wallpapers, since they are run as a background service. You have two options
    1) Use some kind of virtual GUI touch keyboard built entirely in Unity.
    2) Use native Android settings screen for menus.
    Thank you for reporting. That does seem like a weird and elusive bug... I'll look into it.
    There is no good and reliable way that I know of to integrate IAP into Unity directly. Basically, all IAP systems for Unity that I know expect an Activity to be present. This is not the case with live wallpapers, since they run in a background service and they usually don't have an Activity that can be used at any time. I had success with Unity IAP around a year ago, but since then they've changed a lot of stuff, and now require an Activity as well.
    Basically, the only reliable option is to implement IAP on the Android side. I usually advice to put all the purchasing into the native Android settings menu (which is an Activity by itself, so it has no problems with being able to use IAP), but you want to avoid it. What I would probably do in your scenario is to implement the settings menu in Unity, but have the "Purchase" button open a special "purchase" Activity that serves a single purpose of conducting the payment. That Activity would have to be implemented entirely in native Java code, and then push the data back to Unity (via preferences, for example). It isn't exactly rockets science, but still requires some experience in Java coding for Android.
    Hm, that issue should only occur if you were already using a custom AndroidManifest.xml that had targetSdkVersion set to 24 or lower. I always keep uLiveWallpapers's Target SDK up-to-date to the latest version to ensure there won't be any future compatibility issues, and the current version is 25. For whatever reason the AndroidManifest.xml of your project had targetSdkVersion set to 24 or lower, which made it impossible to merge the manifests. You must either not have a custom AndroidManifest.xml, or set targetSdk="25" manually.
    1) I've heard about this issue, but it is entirely out of my control. Something strange is going on deep inside Unity when gyroscope is used. However, last time I've checked, I've noticed that this delay is only present in the debug builds, and not in release.
    2) This is a bug in Unity 5.5.0. Just update.
     
    kafanasiff likes this.
  41. again

    again

    Joined:
    Mar 3, 2013
    Posts:
    12
    Hi Zimm,
    nice to see you around ;)

    1) I tried release build and the delay persists. Im not sure that it must be unity side, as I am not doing anything strange at the event just activating gameobjects ... I had to make my own button that runs exactly the same piece of code without any delay so I believe the bug has more likely something to do with the event or android studio stuff.

    2) Cool that works. But still there are some delays (like 200ms maybe) while the wallpaper changes orientation, it is not the most beautifull thing. Is there a way to force the wallpaper portrait ? Tried force portrait in Unity but it has no effect.

    Thanks in advance
     
  42. kafanasiff

    kafanasiff

    Joined:
    Sep 25, 2013
    Posts:
    31
    Thank you very much for that information! I did not realize it was impossible to implement IAP on the Unity side, and will take another shot at it in Android Studio using the native Android settings menu. I've tried a few native IAP integrations already and have been unable to get IAP working following some help guides online (which is why I had switched to trying on the Unity side), but I'm still a beginner with native Android dev so I'll keep trying. By any chance do you have any sample code you could post for integrating it in the settings activity? No worries if not, I'll figure it out eventually
     
  43. corpsinheretoo

    corpsinheretoo

    Joined:
    May 13, 2013
    Posts:
    11
    Gradle error on loading empty unity project for first time. Android studio has been updated; unity 5.5
     
  44. corpsinheretoo

    corpsinheretoo

    Joined:
    May 13, 2013
    Posts:
    11
    Resolved: I had to downgrade the Gradle version by editing "Android\myProject\gradle\wrapper\gradle-wrapper.properties" line that reads: "distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip" to
    "distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip"
     
    JAMiller likes this.
  45. eason_lee

    eason_lee

    Joined:
    Jan 18, 2017
    Posts:
    2
    Hi ZimM,
    Is there any method to create many live wallpapers in a single uLivewallpaper apk?
    Thanks.
     
  46. again

    again

    Joined:
    Mar 3, 2013
    Posts:
    12
    uLiveWallpaper takes your unity project and convert it to android studio project. This converted android studio project is generated so your unity app runs on android with typical android live wallpaper behavior (after you make an app build from that android studio).

    Basically you can easily create your own wallpaper changer based on unity UI for example ... or you can connect the default android UI with your unity project ... so yea ... there is method ... I would say plenty of them ;)
     
  47. eason_lee

    eason_lee

    Joined:
    Jan 18, 2017
    Posts:
    2
    again. Thanks your reply.
    Could you please let me know your method(or an example) if I can show the many wallpapers in the android default Live Wallpaper page. That means in the default Live Wallpaper page, there are many wallpaper thumbnails I created.
    Thanks again.
     
  48. again

    again

    Joined:
    Mar 3, 2013
    Posts:
    12
    I cant, because I didnt created any wallpaper switcher in the means you imagine I think. I involved the unity UI to be able to switch 3D models, and change materials with colorpicker in real-time.
    If you want to show images and browse its thumbnails, I would use Unity UI, that should be piece of cake for you, if you have some basic unity and coding experience.
    If you want to involve android UI for browsing thumbnails, Im not sure,but should be somehow possible, more of a question for some android studio dev, Im much more Unity dev ... maybe thanks to that I believe that Unity UI is much more customizable thus more suitable for this purpose.
     
  49. corpsinheretoo

    corpsinheretoo

    Joined:
    May 13, 2013
    Posts:
    11
    As @again I am having some issues with screen rotation. In the screen in which you can confirm your live wallpaper choice rotating the device is handled well; however once the wallpaper is loaded, rotating the screen causes the wallpaper to become truncated when moving from landscape to portrait. I tried locking the screen into landscape mode as a workaround using Edit>Project Settings>Player>Resolution and Presentation - but I think that setting is currently broken in Unity.
     
  50. corpsinheretoo

    corpsinheretoo

    Joined:
    May 13, 2013
    Posts:
    11
    "2) This is a bug in Unity 5.5.0. Just update."
    I did not read closely enough. Updated Unity and all is better thank you :).
     
unityunity