android


Capturing a photo taken from a gallery intent


I have a method which launches the gallery so that I can choose photos (this works)
public ArrayList<ImageEntry> pickImages(Context cont){
Picker.PickListener pic = new MyPickListener();
ArrayList<ImageEntry> images = new ArrayList<>();
pic.onPickedSuccessfully(images);
new Picker.Builder(cont, pic, R.style.MIP_theme)
.build()
.startActivity();
return images;
}
Except when I take a photo in gallery it returns with
/storage/emulated/0/capture1461208914080.png
As the image path
When I try to load this image
public class MyPickListener implements Picker.PickListener, View.OnLongClickListener {
HorizontalScrollView imageScroll;
LinearLayout imageLayout;
LinkedList<View> thumbnails = new LinkedList<>();
LinkedList<String> thumbnailsPaths = new LinkedList<>();
#Override
public void onPickedSuccessfully(final ArrayList<ImageEntry> images) {
imageLayout = (LinearLayout) view.findViewById(R.id.thumbnail_layout);
imageScroll = (HorizontalScrollView) view.findViewById(R.id.thumbnail_scroll);
imageLayout.setHorizontalScrollBarEnabled(false);
for(ImageEntry image : images){
if (imageCount < 5) {
imageCount++;
imageScroll.setVisibility(View.VISIBLE);
View view = viewBuilder.createThumbnail(getActivity(), image.path);
thumbnails.add(view);
thumbnailsPaths.add(image.path);
view.setOnLongClickListener(this);
imageLayout.addView(view);
MainActivity.imageArray.add(image.path);
}
}
}
My question is what do I need to do to be able to load images taken from the gallery. At the moment they only show as empty, thanks

Related Links

Android Listview - pointToPosition returning invalid_position
Attaching file in email
Add delay during adding of view in android
Service not available in geoCoder
Clear Edittext onclick issues
Dynamically change the text of TextView from Spinner
Android - How to do if customer wants to specify his key for exporting project to .apk?
How to measure or estimate bitmap size in Android Versions that do not support bitmap.getByteCount()
illegal instruction while running iperf
Putting included layout at top and bottom of main layout
Android TextView `ifAtLineStart` method?
play two audio files simultaneously
Intent does not resolve
tabview with fragments in android
Custom android.widget.Filter
SQLiteDatabase warning Android

Categories

HOME
cygwin
grok
api
design-patterns
deep-learning
telegram
jmeter
rsa
yahoo-finance
shiro
nuget
google-apps
dojo
nested-if
echo
jquery-ui
google-admin-sdk
joomla3.0
project
owin
heap
siddhi
alamofire
why3
ipmitool
tput
package-managers
mvc-mini-profiler
gmm
apache2.4
asciidoctor-pdf
guzzle
systemtime
string-concatenation
parcelable
object-storage
epsilon
dynamically-generated
delimiter
handler
android-things
ceylon
cppreference
simplecv
hreflang
hunspell
installscript
imx6
claims
jboss-4.2.x
automapper-5
wcftestclient
trojan
payara-micro
edit
payload
android-instrumentation
slackware
flex-monkey
centrifuge
tinkerpop3
flex4.6
clipboard.js
kango-framework
lz77
asyncdisplaykit
vhosts
concurrentmodification
vigenere
flock
atoi
bufferedinputstream
jquery-forms-plugin
mmwormhole
gamekit
code-documentation
uncaught-typeerror
jbake
sip-server
structuremap3
genymotion-call
universal-image-loader
reflector
cancellation
ios8-extension
dot42
draw2d-js
mbunit
mongohq
cnf
abstract-data-type
composite-component
wimax
web-farm
window-decoration
kqueue
isa-swizzling
box2d-iphone
agility.js
pinch
denied
htdocs
matlab-load
mbeans
event-receiver
xui
qglwidget
tabpanel
spread
build-environment
alsb
software-lifecycle
application-planning
idatareader

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App