Code Monkey home page Code Monkey logo

cordova-plugin-wallpaper's People

Contributors

fbsanches avatar ragcsalo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cordova-plugin-wallpaper's Issues

success function

How Can I call success function?
success = function() { alert("Success"); };

Lockscreen

Works well thank you, But How do I set wallpaper on lock screen as well. Right no wi can only set on home screen.

Manually

Can i install this plagin manually (i am using phonegap build)?

Travis CI Badge

@fbsanches Could you please manage to put your own Travis CI badge in README.md as the Android Build status? My own one will not update anymore as this isn't my project (or fork) anymore. If not maybe you should at least remove it so nobody gets confused.

Set wallpaper external

Hi, I want to know if this plugin can set wallpapers which are stored on cloud. I tried this but did not work:
<button onclick="window.plugins.wallpaper.setImage('https://example.com/4izvk4qjx/image.jpg',false);></button>

Just an example above, but you get the point.

Thanks

Are you using caching in your library ?

I have implement code for set wallpaper using this plugin, but when I set wallpaper for first time,
then set successfully. then I replace that wallpaper image from my application assets folder with new image (keep name same but image is different). then clear app data and uninstall app then reinstall app again and try to set wallpaper . then it will set my old wallpaper though that wallpaper image not exist in my project.

Is this package maintain caching for image?

Set Wallpaper From External Storage

I am downloading a file from url and save those file into External Memory, But i am unable to set wallpaper from those saved image. Please Help regarding this issue
this.fileTransfer.download(url, this.file.applicationStorageDirectory + filename).then((entry) => { this.platform.ready().then(() => { window['plugins'].wallpaper.setImage(entry.nativeURL, (error) => { console.log('Error', error) }) }) });
Here's how entry object appears
fullPath : "/data/user/0/io.ionic.starter/ptitsy_more_siluety_121312_1080x1920.jpg" isDirectory : false isFile : true name : "ptitsy_more_siluety_121312_1080x1920.jpg" nativeURL : "file:///data/user/0/io.ionic.starter/ptitsy_more_siluety_121312_1080x1920.jpg" __proto__ : Entry

Success and Error function?

Hi,

How can i get success and error function when wallpaper is set or if there is any issue. I would like to show toast message like Wallpaper Successfully Set or if there is a problem.

I found this issue. #11

But not sure how @db3344 did that. I would appreciate help. Thanks

setImageHttp is not a function

Hello,

Tried this plugin but doesn't seem to work.I am trying to set an image from remote location as wallpaper.
It gives this error window.plugins.wallpaper.setImageHttp is not a function at a.setwallpaper (file:///android_asset/www/js/0.cf0735399bc2e4f4f677.js:1:510) at a.n [as setwallpaper] (file:///android_asset/www/js/vendor.js:1:1143) at a.created (file:///android_asset/www/js/0.cf0735399bc2e4f4f677.js:1:660) at Dt (file:///android_asset/www/js/vendor.js:1:12637) at a.t._init (file:///android_asset/www/js/vendor.js:6:7891) at new a (file:///android_asset/www/js/vendor.js:1:22033) at _e (file:///android_asset/www/js/vendor.js:1:18964) at init (file:///android_asset/www/js/vendor.js:6:7148) at c (file:///android_asset/www/js/vendor.js:6:16698) at l (file:///android_asset/www/js/vendor.js:6:16327)

Error Build Version

I do not know what I did. I do not have many experiences with git, travis and others. It looks like it has errors. How to correct?

the old plugin working this not

hello
when am try to add this plugin in my app it doesn't work but when I am search in NPM i found the old version and it work fine.
but it only set both home and lock screen wallpaper and i need to make it set each one (home - lock) alone like this plugin do but it is not working how can I fix it.

Issue with getting image src automatically

When i use hardcoded image src similar to examples here. It works fine.

function wp() {
    window.plugins.wallpaper.setImage("images/1462204239933.jpg");
}

But if i try to get image src automatically from active slide. It won't set wallpaper.

function wp() {
    var picture = $$(".swiper-slide-active").find(".pic").attr('src');
    window.plugins.wallpaper.setImage('"'+picture+'"');
}

I checked console.log and it's getting image src fine for each slide. What am i doing wrong? Would appreciate help.

Thanks for this plugin.

It does not work

Hi, this is not working for me.

Here are my codes:

<img alt="Wallpaper" src="wallpapers/solid/1.png" onclick="window.plugins.wallpaper.setImage('wallpapers/solid/1.png');">

I have the plugin in config.xml as "<plugin name="cordova-plugin-wallpaper"/>"

I have the Wallpaper.j file which you have as well. I am using PhoneGap Build.

Can you advise me?

Bug on Xiaomi (MIUI 11.0) - Set Lock Screen

Hello,

I have two devices :

  • Huawei P20
  • Xiaomi Pocophone

This plugin works great on Huawei P20 but not on my Xiaomi (API Level 29 - MIUI 11.0).

I have a problem with this following line (set the lock screen wallpaper) :
ujWallpaperManager.setBitmap(bitmap, null, true, WallpaperManager.FLAG_LOCK);
I don't have any error, but the wallpaper doesn't update.

However, set the wallpaper works fine :
myWallpaperManager.setBitmap(bitmap);

Do you have any idea about this ?
Thanks,

Issues with setImageHttp

Hi,

I'm having issues with setting remote image as wallpaper. Here is my code.

JS

function wp() {
    var setWp = $$(".swiper-slide-active").find("img").attr('src');
    window.plugins.wallpaper.setImageHttp(setWp);
    //console.log(setWp);
}

HTML

<a href="#" class="link" onclick="wp(); wpToast.show();">Set</a>

<div class="grid">
  <div class="grid-item">
    <a href="#" class="galleryIndex" rel="0"><img src="thumb/0001.jpg"></a>
  </div>
  <div class="grid-item">
    <a href="#" class="galleryIndex" rel="1"><img src="thumb/0002.jpg"></a>
  </div>
  <div class="grid-item">
    <a href="#" class="galleryIndex" rel="2"><img src="thumb/0003.jpg"></a>
  </div>
</div>

It opens remote images in framework7 photo browser. All images are defined in JS file. Here is the code.

var myPhotoBrowserStandalone = wallapp.photoBrowser({
        photos: [
        'https://example.com/images/0001.jpg',
        'https://example.com/images/0002.jpg',
        'https://example.com/images/0003.jpg',
    ],
        theme: 'dark',
        spaceBetween: 0,
        lazyLoading: true
    });
    $$('.galleryIndex').on('click', function () {
        var wally = $$(this).attr('rel');
        myPhotoBrowserStandalone.open(wally);
    })

When i use console.log. It shows URL fine. Not to mention. Even a direct link like used here on github is not working. e.g:

<a href="#" class="link" onclick="window.plugins.wallpaper.setImageHttp('https://example.com/images/0004.jpg')">

But this works.

<a href="#" class="link" onclick="window.plugins.wallpaper.setImage('images/0004.jpg')">

@flyingP0tat0 Can you please check it on your side and see if its working. I'm testing it on Android 7. Same issue on my phone and emulator.

Thanks

Issue while using it in ionic 3

I have tried using this plugin ,but no output.Could you please help me if im dong anything wrong.

window.plugins.wallpaper.setImage(fileEntry.toURL(), function (error) {
if (error) {
console.error(error);
} else {
console.log('Success setting wallpaper.');
}
});

Cropping

Hi,
The plugin does not allow cropping? Can't we have something like the crop dialogue that pops up in android when you try to put up a wallpaper?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.