fbsanches / cordova-plugin-wallpaper Goto Github PK
View Code? Open in Web Editor NEWCordova Set Wallpaper Plugin
License: Apache License 2.0
Cordova Set Wallpaper Plugin
License: Apache License 2.0
How Can I call success function?
success = function() { alert("Success"); };
Works well thank you, But How do I set wallpaper on lock screen as well. Right no wi can only set on home screen.
hi.. can this plugin get from the external source ?
for ex: http://mydomain.com/image.jpg
I have posted a question in Stackoverflow about this.Here is the link for more details: https://stackoverflow.com/questions/47071586/plugin-issue-with-ionic-3-app. This is given as the third issue in that question.
Can i install this plagin manually (i am using phonegap build)?
@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.
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
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?
Can you add function make live Wallpaper?
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
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)
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?
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.
Wallpaper is not fit on complete screen. Large image set a some part on screens depends on resolution. Can I set wallpaper as fit on screen.
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.
Hi, does not work out of the box for ionic2 - do I have to follow these instructions?
http://www.gajotres.net/ionic-2-how-to-use-cordova-plugins/
Thanks for help! :)
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?
Hello,
I have two devices :
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,
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
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.');
}
});
Add plugin:
cordova plugin add https://github.com/ragcsalo/cordova-plugin-wallpaper.git
cordova build android
This code not working:
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
alert('test');
}
c:\projects_cordova\wallpaper>cordova platform
Installed platforms:
android 9.0.0
c:\projects_cordova\wallpaper>cordova -version
10.0.0
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.