BIBEKRBARAL
BIBEKRBARAL

Reputation: 4475

sharing feature in android

Is it possible to share my video or my photo from my application on the web in android?If possible how to do this? I made a application and now i want to share some my feature on the web so how i can do it? Thanks

Upvotes: 3

Views: 1183

Answers (2)

Daniel Ruben Odio-Paez
Daniel Ruben Odio-Paez

Reputation: 120

@rbads, this is an old question so i don't know if it's still pertinent, but you can also share with Socialize -- www.GetSocialize.com. We use the concept of "entities" and have likes, comments & sharing around each entity (entity = unique piece of content in your app).

Upvotes: 0

Josh Lee
Josh Lee

Reputation: 177500

Depending on what exactly you mean, it’s possible that this functionality is already built in. Using the ACTION_SEND intent allows the system to coordinate activities to share arbitrary kinds of data. Applications exist that can send images and videos to Twitter, YouTube, Picasa, MMS, Bluetooth, etc.

Something like this (untested) will inform the system that you have an image to share:

Intent msg = new Intent(Intent.ACTION_SEND);
msg.setType("image/jpeg");
msg.putExtra(Intent.EXTRA_STREAM, Uri.parse("file:///sdcard/foo.jpg"));
startActivity(Intent.createChooser(msg, "Share image"));

Now, if you want your application to send images specifically to your web service, you can still use this send intent, but also include an activity that can handle this sort of request. If you still use the intent chooser, the user will have the advantage of being able to send their images and videos to other places besides your web service, and your application will feel like an integrated Android app. On the other hand, bypassing the intent chooser and just uploading it directly makes your app feel more streamlined but less flexible.

The Android API includes the org.apache.http framework for talking to web services.

Upvotes: 2

Related Questions