[FREE/OPEN SOURCE] GetWallpaper - Extension

Introduction

I am happy to present my new extension called GetWallpaper!

This small extension returns the current wallpaper of the home screen.


Blocks

component_method

Path : String/Text

Use this block to save the wallpaper is the path given.


component_event

path : String/Text

Event block triggered after the wallpaper is saved.


Note : It taked 3-4 seconds to save wallpaper.



Downloads/Open Source

Download (link) : ClickMe (6.4 KB)

Open Source Link :


Hope you liked my new extension!

3 Likes

I don't understand, this extension applies a wallpaper or get the wallpaper path?

Secondly, you should write a documentation on github README.md file.

Btw, good extension.

2 Likes

Just using the below block, enter the path where to be saved.

Oh, I understand. I was confused by the name of the blocks.

The keyword is better be:
Get/GetWallpaper

when... GotWallpaper

1 Like

Your extension doesn't declare WRITE_EXTERNAL_STORAGE permission in the Manifest.

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

only READ:

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>

Therefore add WRITE permission or you / the user must to insert the File component (as a dummy) and ask for WRITE_EXTERNAL_STORAGE at Screen.Initialize manually.

1 Like

Major issue is that the extension works synchronously so it will pause your app.
Also not closing of input stream can be an issue.

You would like to fix above mentioned bugs. @Kumaraswamy

1 Like

I am a newbie in java android @vknow360 .

I don't know what is the necessary, i thought its already declared.

These permission are declared in the Manifest, if I open a new project an use your extension and build the APK:

1 Like

Even when I set the path to the ASD it only works if WRITE permission is granted.
It shouldn't be like that.

wallpaper2.aia (12.5 KB)

1 Like

I dont know, can you please try saving it has .png format? It worked for me perfectly.

Here is the proof : -

No, the same.
As I said your extension doesn't declare WRITE permission in the Manifest. Thus it's not possible to ask for that permission and it will never be granted. So the app cannot write / save anything in the external storage.

1 Like

It seems that Kodular adds this (Read) permission automatically.

1 Like

Built apk it won't work, because you didn't ask permission/declared in Manifest. Unless you are using the companion.

Sunny dev, can you guide me please? It will help me a alot.. Give me an example

No, READ permission is added by the Image component.
So the extension doesn't add any (dangerous) permissions to the Manifest
(as can be seen in the Java code).

Update

Permission bug fixed
Thanks for @Anke , @vknow360 & my friend

Permission will be asked automatically while saving the wallpaper.

com.extension.GetWall.xoma.aix (6.5 KB)

Fine, WRITE_EXTERNAL_STORAGE permission is now declared in the Manifest.

However, the user must request this permission manually.
It should automatically be asked for it.

1 Like