Search Unity

Announcing ALPS - Easy live wallpaper integration for Android

Discussion in 'Assets and Asset Store' started by androbeanstudio, Sep 30, 2017.

  1. Revolter

    Revolter

    Joined:
    Mar 15, 2014
    Posts:
    216
    The main issue for me is that in ALPSActivity some plugins like Unity Purchases or Facebook don't work as they need the Unity Activity (they throw exceptions when initializing).
    In a perfect case scenario, I would want to use ALPS just as a WallpaperSevice, without overriding the Unity Activity.
    I managed to achieve it with this plugin: https://github.com/PavelDoGreat/Unity-Android-Live-Wallpaper
    But of course, it would be nice to have all the extra features and callbacks from ALPS.
    Basically I would need the normal Unity Activity start when tapping on the icon, and have a full-fledged app with standard libraries like iaps and ads, and from Unity app to be able to start/set the Live Wallpaper.
    Then I would be able to check at the beginning of the game if it's running as Unity Activity, and initialize all my plugins, and if it's a WallpaperService, I would just load the wallpaper scene.
     
  2. androbeanstudio

    androbeanstudio

    Joined:
    May 2, 2017
    Posts:
    83
    Hi,

    Thanks for sharing the details.

    You can prevent ALPS from starting up on clicking launcher icon by just removing the ALPSLauncherActivity entry in the "Assets\Plugins\Android\AndroidManifest.xml". Doing so, the default Unity activity will take its place.

    When it is appropriate to launch ALPS as a live wallpaper, you can do something similar to the following code.

    Code (CSharp):
    1. intent = new Intent(WallpaperManager.ACTION_CHANGE_LIVE_WALLPAPER);
    2. intent.putExtra(WallpaperManager.EXTRA_LIVE_WALLPAPER_COMPONENT, new ComponentName(AlpsLauncherActivity.this, AlpsWallpaperService.class));
    3. startActivity(intent);
    4.  
    Please let me know if you have further issues.

    Regards,
    -Androbean.


    -----EDIT-----
    You may also try using the "public static void launchWallpaperPreview()" from ALPS C# code. This class however has many static members which may interfere during the startup. Please try this as well if it suits.
     
    Last edited: Apr 5, 2020
  3. riddlez46

    riddlez46

    Joined:
    Feb 15, 2019
    Posts:
    8
    Hi there,

    Sorry this is probably really simple to do, I'm new to unity and C Sharp, but I haven't managed to work it out from the Demo Cube example. Is it possible to have a spinner with a list of values or numbers something like Red, Orange, Pink or 1, 3, 8. Then call that exact value that is selected from the settings to the script attached to the object? Something like the script below:

    Code (CSharp):
    1.  
    2. using UnityEngine;
    3.  
    4. public class ALPSDemoCube : MonoBehaviour
    5. {
    6.     private int FromALPSDemoListener; //Get a variable from ALPSDemoListener to use
    7.  
    8.     void Start()
    9.     {
    10.         ALPS.setALPSListener(new ALPSDemoListener());
    11.     }
    12.  
    13.     void Update()
    14.     {
    15.         if (FromALPSDemoListener == Red) { //Use the variable to use in an "if" statements to change a particular item
    16.             Does_Something_Red;
    17.         }
    18.  
    19.         else {
    20.             Does_Something_Blue;
    21.         }
    22.     }
    Also the problem I had earlier that I posted on here seems to resolve itself with new versions
     
  4. androbeanstudio

    androbeanstudio

    Joined:
    May 2, 2017
    Posts:
    83
    Hi,

    The bundled demo app is already doing this in order to select the scrolling type. Please check the demo app code for exact usage.

    Thanks,
    -Androbean.
     
  5. tigranmaster

    tigranmaster

    Joined:
    Jan 29, 2013
    Posts:
    4
    Hi,thanks for the plugin it works great other than one issue:
    My phone thinks i'm using sound with the wallpaper.
    And i'd be very happy if could help me with selecting objects from the settings,my wallpaper has 10 objects and i'd like to select them from a list.
    thanks.
     
  6. Clow_Lead

    Clow_Lead

    Joined:
    Dec 4, 2017
    Posts:
    11
    Hi Androbean.

    sorry for the delay.
    It's unknown why, but onStateChanged() not called. it didn't seem to be recognized that the activity changed.
    I did call("getData") at Update() until it succeeded.
    it was some problem in Log out and re Login... but it's not Ordinary case and I think I can fix it.
    But it is helpful if there is a stable route.
    thanks.

    By the way,
    I find way for override keyevent in wallpaper service.
    in Android 9, Volume Up / Down key default works Media Stream Volume Control. but previous version was control the ringtone Volume.
    disable unity audio will show desired result at previous version of android. not Android 9 and later.
    exist 3rd party volume control interface support app like volfix. but doesn't work properly for Unity Wallpaper.
    And I want play audio in MainActivity.
    I find volume control solution and tested. but No way to override a keyevent.
    Activity has dispatchKeyEvent but service... huh... do you have any idea?

    I tried detect from check volume level change.
    it seems work. but wrong action at volume change on other apps or touching volume ui.
     
    Last edited: Apr 29, 2020
  7. neodorus

    neodorus

    Joined:
    Mar 4, 2015
    Posts:
    41
    Hi, is this asset still supported (and if it is, has the compatibility with unity 2019.3 been resolved)? I'm very interested in buying it.
     
  8. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,363
    Hi,

    I had used a previous ALPS version (before add any of the new IAP and etc extra modules in Plugins - Android) and worked fine in Unity 2019.3, after i upgraded to latest one i get multiple errors that cannot link the files and get some report that cant find the website in the company name (e.g. com.company,product:website)

    Is this a known issue and what could i do about it ?

    Thank you in advance
     
  9. Grumpy-Dot

    Grumpy-Dot

    Joined:
    Feb 29, 2016
    Posts:
    93
    @androbeanstudio Hello, I wrote you an email about disabling or configuring the long press to show the wallpaper setting panel, and about having a light version (no ads or in-apps). Let me know if you have an update for this, especially the first part. Thanks!
     
  10. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,363
    Hi,

    I cannot use settings, i followed all steps, inserted the ALPS prefab and added in awake and start the

    ALPS.setALPSListener(new ALPSDemoListener());

    And says is not ready when press serttings in the app on phone

    Any ideas ? thanks
     
  11. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,363
    I actually solved it by copying all items from the cube demo and somehow it now works :), so this is no issue anymore.

    But i have another issue, when i use my canvas and mouse handling on desktop or editor or android build without ALPS, all work ok, but when i build with ALPS for Android my clicks or canvas handlers appear mirrored in Y axis with mirror line the middle of screen, so if i press a canvas button in the upper side of screen, the actual click identified is in the lower side of the screen.

    This happens even if ALPS prefab is not in the scene, and is solved only when i erase all ALPS from the project. Also ALPS seems to be applied to the project even in scenes when no ALPS prefab is in the scene in general, is this behavior normal and how to control it ?

    Thanks
     
  12. Devil_Inside

    Devil_Inside

    Joined:
    Nov 19, 2012
    Posts:
    1,119
    Gradle issues in Unity 2020.1. When will this be updated to support 2020.1?
     
  13. Metapixel

    Metapixel

    Joined:
    Feb 27, 2018
    Posts:
    2
    I am interested to disable the long press feature too, because I can't even uninstall apps on my phone when the live wallpaper is enabled.
     
  14. Grumpy-Dot

    Grumpy-Dot

    Joined:
    Feb 29, 2016
    Posts:
    93
    For that edit the function onLongPress from the ALPSDemoListener class. You will find there also other functions for double tap or simple click that you might want to edit as well.
     
    Metapixel and nasos_333 like this.
  15. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,363
    Thanks for the insight on this
     
  16. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,363
    I wonder why though, Unity broken something on their end ?
     
  17. pietrina

    pietrina

    Joined:
    Aug 22, 2015
    Posts:
    15
    Hi

    "Gradle issues in Unity 2020.1. When will this be updated to support 2020.1?"

    Someone resolve this problem ?
     
  18. pietrina

    pietrina

    Joined:
    Aug 22, 2015
    Posts:
    15
    @androbeanstudio Are you planning changes, corrections or is the project already dead?
     
  19. Metapixel

    Metapixel

    Joined:
    Feb 27, 2018
    Posts:
    2
    Hello there

    I am not sure if this is the right place to ask this kind of info, but it's related to the live wallpaper feature with ALPS. I have done some research before, but I can't find what I need to make my things working.

    So, the user neojzs has shared earlier on this thread an app (s)he's made with ALPS
    ( https://play.google.com/store/apps/details?id=com.terranova.vfxlive )
    You can choose the scene you want with buttons, and when the wallpaper mode is applied and you quit the app, the UI is hided and it shows buttons when you go back to the app to change background.

    I want to do something similar, but I am still a novice in programming so I don't really know where to look. I have tried to see if it's possible with "OnApplicationQuit()" but I am not sure it's the right thing to do because I can't manage to make something work. I already asked to neojzs here in dm, but I think this person is inactive for now (or maybe my message looked weird or annoying, if it's the case, I am sorry)

    Maybe someone knows where to look at. Thank you in advance.

    PS : Grumpy-Dot, thank you for your answer, I have liked your message but not given proper thanks.
     
  20. Arkolis

    Arkolis

    Joined:
    Feb 6, 2015
    Posts:
    34
    @androbeanstudio How would I go about adding a custom button similar to the Icon Support Buttons? I want it to link to my website but so far it just fails to go anywhere. Ive added the custom Image Button, as well as a new key in the SupportPreferenceAttributes section. The button shows up just doesn't do anything.

    Thanks in advance.

    Edit:
    Seems the dev is busy, can anyone give me some pointers to implement an override for the SupportPreferenceAttribute, if not then I guess I will be learning java.

    Thanks in advance.
     
    Last edited: Nov 26, 2020
  21. Arkolis

    Arkolis

    Joined:
    Feb 6, 2015
    Posts:
    34
    Anytime I try to update any of the classes.jar files to add my own functionality the whole project becomes unstable and will crash on devices. I have tried many java editors and such and so far nothings worked. Is there a way to connect to the Preferences window through c# in unity instead of breaking my project every time through java?
    Or is developer support for this dead and I should look elsewhere?


    Found a different solution.
     
    Last edited: Dec 8, 2020
  22. FirstPassProductions

    FirstPassProductions

    Joined:
    Nov 3, 2018
    Posts:
    8
    switches were depreciated. will there be any updates? GREAT PRODUCT!!

    https://developer.android.com/reference/android/preference/SwitchPreference
    public class SwitchPreference
    extends TwoStatePreference

    java.lang.Object
    android.preference.Preference
    android.preference.TwoStatePreference
    ↳ android.preference.SwitchPreference

    This class was deprecated in API level 29.
    Use the AndroidX Preference Library for consistent behavior across all devices. For more information on using the AndroidX Preference Library see Settings.
     
  23. FirstPassProductions

    FirstPassProductions

    Joined:
    Nov 3, 2018
    Posts:
    8
    when i uploaded my live wallpaper to google play, i got a warning that google billing will need to be updated.. will this asset need an update from the developer? or is there something i can do to update the google billing side of things?
     
  24. tigranmaster

    tigranmaster

    Joined:
    Jan 29, 2013
    Posts:
    4
    Hi, can anyone help me create a settings menu so i can hide and show objects from my scene?
    willing to pay for the job.
    tigranmaster@gmail.com or pm