2014년 12월 7일 일요일

wallpapers


How do you create wallpapers on app inventor 2?

-- 

Use Activity Starter.

You can use those actions:
1. Action: android.intent.action.SET_WALLPAPER or
2.
Action: android.intent.action.ATTACH_DATA
DataType: image/*
DataUri: file:///storage/emulated/0/dir/filename.jpg

It depend what kind app you make and where you get your data: etc. camera, internet pictures or allready stored pictures to app

--
interesting solution! great! thank you.
I always thought this is not possible...

--
cheers!

--
Peep Prants; If i use pictures from my Camera to create wallpapers which method should i use from your suggestions? many thanks :)

--
Also, does creating wallpaper apps utilize multiple screens and how do the blocks work for wallpapers?

--

What exact to write in data uri. The image is already stored in app.
Please help.

--
What exact to write in data uri. The image is already stored in app.
the complete path to the image, e.g. if the file is stored in the root directory, then just write
file:///mnt/sdcard/Image1.jpg

--
sorry I could not determine path. What exact to write in this specific app where image is in app.

--
If in development (emulator, testing etc.) then use :

file:///mnt/sdcard/AppInventor/assets/file.jpg

If all done and you make .apk then change to: 

file:///android_asset/file.jpg

--
using the activity starter, Peep's advice works only on your development device
you can't access files stored as assets in your app with the activity starter!
your files have to be available on the sd card of the device!
you could use the Canvas.SaveAs block, see here How to save a canvas or download the image from the internet on first run of the app 

How to download a file and save it on your device

download.aia

downloadAuth.aia

--
Thanks

--

This is very good, many thanks. Can you advise, as I am just a beginner still when you use something like android.intent.action.SET_WALLPAPER in the text field block does this mean I can write something like actual Java in here within activity starter component?

--

does this mean I can write something like actual Java in here within activity starter component?
no
see here how the activity starter component works



--
I have tried the following as per screenshot, what am I doing wrong? I am trying to get it to change the wallpaper with an image stored within the app. Does the actual size of the image make any difference?

 Untitled.png

--
use the full path to your image, which is file:///mnt/sdcard/wallpapertest.jpg

--
Thanks, I have tried this as per the attached two screenshots, noting that I have tried image and Image1 in the block before. Additionally have saved the .apk file to my phone as well to see if that is what was causing the issue rather than streaming it over wifi and still it does not work?

 1.png
 2.png

--

Sorry just noticed, 2.png is meant to state: Image1 rather than image.

--

I am still struggling with this, please help!

--

probably this does not work for all Android versions...
which device and Android version are you testing?

--
I am using a Sony Xperia Z1, with the latest possible android version installed as follows:

Android version: Android 4.4 (KitKat)

Latest available software: 14.4.A.0.157
Release started: 2014-11-11

--
try an older Android version...
I tested on Nexus 5 running Android 5.0.1 (Lollipop) and it also does not work...

--
What is the core thing that is stopping it in the newer versions? There has to be some sort of setting or feature where I/we could perhaps come up with some sort of workaround?

I can't really risk downgrading on my current device at the moment.

--
already stored pictures to app. Thanks a lot :)

--
To make wallpaper app just visit http://www.appsgeyser.com

More over their browser is fast and almost full browser.

--

댓글 없음:

댓글 쓰기