Good afternoon! I'm doing my CBT and I need urgent help! Please!
Next ... I am 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 it is quiet ... however I wanted it when the user clicked on share .. I could collect his data such as: name, surname, age, email and location .... Do I necessarily need to make a login? 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! Thank you!