开发者

How to implement native gallery functions in my application

i have Samsung Galaxy S. In the phone's gallery there is a share button. When you click the button, a menu contains share sites show up. You can pick one ot them and upload the picture. The best part of the menu; İf you download an application(for example facebook)开发者_开发问答 into your phone, it appers in the menu. İ want to you use that function in my app. I will use camera, take picture and display on the imageview. And then i want to make a button like this one and share the photo. I am asking that because i download a gallery application which is not the native gallery of the phone, It also has the same button. Is there anyway that i can use it directly in my application. I dont want to use it after calling the gallery.



try this code

 intent = new Intent(Intent.ACTION_SEND);
                intent.setType("text/plain");
                intent.putExtra(Intent.EXTRA_SUBJECT, "try this application ");
                intent.putExtra(Intent.EXTRA_TEXT, "https://market.android.com/details?id=com.music.player");
                startActivity(Intent.createChooser(intent, "Share with"));

for more information check this link


This code will help you to redirect to native gallery in your device.

Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);
 photoPickerIntent.setType("image/*");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜