我上传的图片,以服务器为Base64
编码方法,它发送一个字符串,我可以从服务器检索该字符串,并对其进行解码如何从服务器上传图像到Android应用
-3
A
回答
0
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Loading image from url"
android:layout_margin="10dip" />
<ImageView android:id="@+id/image"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_margin="10dip"/>
</LinearLayout>
public class LoadImageFromURLActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
// Loader image - will be shown before loading image
int loader = R.drawable.loader;
// Imageview to show
ImageView image = (ImageView) findViewById(R.id.image);
// Image url
String image_url = "http://images4.fanpop.com/image/photos/18900000/Cute-couples-_-love-18948423-500-334.jpg";
// ImageLoader class instance
ImageLoader imgLoader = new ImageLoader(getApplicationContext());
// whenever you want to load an image from url
// call DisplayImage function
// url - image url to load
// loader - loader image, will be displayed before getting image
// image - ImageView
imgLoader.DisplayImage(image_url, loader, image);
}
}
<!-- Internet Permissions -->
<uses-permission android:name="android.permission.INTERNET" />
<!-- Permission to write to external storage -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
0
you have link for that..json parsing ,xml parsing u can get the address and then u can implement that image in ur apps.
+0
是有可能检索相同的编码字符串,并得到图像 –
+0
叶是有可能的 –
+0
http://www.christianbackgrounds.net/free/framed-hands.jpg使用思考认为你做的图像上传..现在你尝试使用它在你的应用程序...使用Asynctask ... –
相关问题
- 1. Android - 从应用程序上传图像到IIS服务器
- 2. 从android应用程序将图像上传到服务器
- 3. 如何从Android设备的图像上传到Facebook服务器
- 4. android将图像上传到服务器
- 5. 从Android上传图像到WCF服务
- 6. 如何上传图像到服务器
- 7. 将图像上传到从服务器
- 8. 从iPhone上传图像到服务器
- 9. 如何在Android上将图像保存/上传到服务器?
- 10. 从Android上传图像到服务器 - 上传图像的仅部分
- 11. 从android phonegap上传图像到服务器使用asmx
- 12. 使用PaperClip将图像从Android上传到Rails服务器
- 13. 使用Base64将图像从android上传到服务器
- 14. 是否有任何API从Android应用程序上传图像到服务器
- 15. 如何使用PrimeNg从angular2上传图像到php服务器?
- 16. 上传多个图像从图库到服务器在android
- 17. 从Xamarin C上传图像从android到php服务器#
- 18. 从Android上传图像到php服务器得到错误
- 19. 从ios应用程序上传图像到服务器
- 20. 从phonegap应用程序上传图像到服务器(servlet)
- 21. 从Flex Web应用程序上传图像到服务器
- 22. 上传图像服务器上传图像服务器
- 23. 如何上传图像到服务器,而不使用上传按钮在android
- 24. 如何从iPhone应用上传10张图片到服务器?
- 25. 如何上传Android设备捕获图像到MySQL服务器
- 26. 如何在Android SDK中将图像上传到服务器
- 27. 如何将图像上传到服务器在android phonegap
- 28. 如何上传视频或图像到服务器在android
- 29. 如何将图像上传到Android应用程序中的FTP服务器?
- 30. 从Android上传图像到ASP.NET服务器C#
这是完整的代码使用这个.. –