Hey, so I was developing an extension when I needed to get an image from the user. So how do I create a image picker element for the designer?
Taifun
June 18, 2020, 7:59pm
2
visible extensions are currently not available as exension... but probably soon...
Hi all,
I am a GSoC participant working this summer on “Visible Component Extension” (VCE). My mentor is @Susan_Lane , who is very helping, enthusiastic and encouraging.
My project is to upgrade the extension development by allowing visible components to be created as extensions. This will allow App Inventor users to use new and different kinds of UI elements to enrich their apps. Extension developers would no longer have to use hacks to create UI elements in the apps. The VCE wi…
you might want to check the sources of the built-in image picker component...
// -*- Mode: java; c-basic-offset: 2; -*-
// Copyright 2009-2011 Google, All Rights reserved
// Copyright 2011-2021 MIT, All rights reserved
// Released under the Apache License, Version 2.0
// http://www.apache.org/licenses/LICENSE-2.0
package com.google.appinventor.components.runtime;
import static android.Manifest.permission.WRITE_EXTERNAL_STORAGE;
import android.app.Activity;
import android.content.ContentResolver;
import android.content.Intent;
import android.net.Uri;
import android.provider.MediaStore;
import android.util.Log;
This file has been truncated. show original
Taifun
Trying to push the limits! Snippets , Tutorials and Extensions from Pura Vida Apps by Taifun.
@Taifun
Sorry I didn't want it in the app, just the designer like this:
Then have a look at Image.java file of sources.
@vknow360
Thanks for the answer. I looked in and couldn't figure out how it worked. Can you attach some kind of code snippet for me to look into? Do you know if you can do editorType = "Images"
or something? Thanks.
Is it so hard to figure out?
DesignerProperty(editorType = PropertyTypeConstants.PROPERTY_TYPE_ASSET,
defaultValue = "")
Or you can simply use 'asset' in editor type.