0
Good afternoon! I am doing my TCC and need urgent help! Please!
Next... I’m making my app that at the end of the application the user can share, if you want through a shareDialog of the face... until then this quiet... but I wanted that when the user clicked on share... I could collect the data of it such as: name, surname, age, email and location.... Do I necessarily need to log in? my code is below:
public class CompartilharActivity extends AppCompatActivity {
private ShareDialog shareDialog;
private CallbackManager callbackManager;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_compartilhar);
callbackManager = CallbackManager.Factory.create();
shareDialog = new ShareDialog(this);
}
public void shareLinks(View view) {
Bitmap image = BitmapFactory.decodeResource(getResources(), R.drawable.trofeu);
if (ShareDialog.canShow(ShareLinkContent.class)) {
ShareLinkContent content = new ShareLinkContent.Builder()
.setContentTitle("Nome")
.setContentDescription("Descricao")
.setContentUrl(Uri.parse("http://site.com"))
.build();
shareDialog.show(content);
}
}
What would be the best solution! Thanks in advance!