Software Archive
Read-only legacy content
17061 Discussions

how to set wallpaper from intel xdk app

Nadeem_N_
New Contributor I
964 Views

Hi Inteler's/Non-Inteler's,

I want to set device wallpaper from intel xdk app?

 

 

0 Kudos
10 Replies
Nadeem_N_
New Contributor I
964 Views

Hi Anusha thnx for replying

I had already tried it but it isnt working also it is meant for phonegap not IntelXDK n if you have working example with Intel XDK please share it if you can

0 Kudos
PaulF_IntelCorp
Employee
964 Views

PhoneGap plugins are Cordova plugins. The Intel XDK creates Cordova apps, so what Anusha provided should work with the XDK, if that is what you meant by adding a wallpaper...

0 Kudos
Nadeem_N_
New Contributor I
964 Views

Hi Paul I tried that but its aint working. Also i want to set image to device wallpaper not adding a wallpaper.

0 Kudos
PaulF_IntelCorp
Employee
964 Views

So you mean you want to set the wallpaper that is seen on the device's main UI, where the user interacts with app icons and widgets? Nothing to do with your app? For that sort of function the plugin that Anusha pointed to is what you need. I don't think the devices allow apps to programmatically change the wallpaper on a device, since that is really a user preference, not something that should be allowed to be overridden by an app. I think the most you can hope for is to provide an image in the wallpaper library, that the user can choose from, and I believe that is what that plugin claims to provide.

0 Kudos
Nadeem_N_
New Contributor I
964 Views

HI paul,

Yes that is what i want it can be achieved with android studio. One of my friend who develop his app in eclipse has done it. through app n there are n number of app where u can.

0 Kudos
PaulF_IntelCorp
Employee
964 Views

Then what you need to do is locate a third-party plugin that does this, or create one of your own do to it. The XDK does not contain any built-in features beyond what you can do in a standard webview. It relies on standard Cordova plugins to go beyond the basic HTML5 API.

0 Kudos
Swati_S_Intel1
Employee
964 Views

@Nadeem, The plugin https://github.com/PurpleMADcanada/Wallpaper-PhoneGap-Plugin pointed by Anusha is the right way to go. Besides adding this plugin as a thrid-party plugin, you need to add Android Permissions required by this plugin. You can do so in the Build settings page under "Add Permisssions" input box. Make sure you add these permissions.

  1. SET_WALLPAPER
  2. WRITE_EXTERNAL_STORAGE
  3. INTERNET
  4. ACCESS_NETWORK_STATE

Hope this helps.

 

0 Kudos
Nadeem_N_
New Contributor I
964 Views

Hi Swati thanks for replying I already tried this plugin its not working with crosswalk build if u have working example sharing will help me

0 Kudos
Nadeem_N_
New Contributor I
964 Views

Hi Swati, Paul n Anusha thank you for help i finally mange to crack it with the help of all of u i was giving plugin id name wrong thanx it is working now

0 Kudos
Reply