I've recently decided to integrate Dropbox into my simple app. I followed the github official example and the tutorial Dropbox posted for Android.
However, after expanding my horizons I realized this works just as well, without an app key and other things:
Intent intent = new Intent(Intent.ACTION_SEND);intent.setType("text/xml");intent.setPackage("com.dropbox.android");
intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
intent.putExtra(Intent.EXTRA_STREAM,
FileProvider.getUriForFile(getContext(), "david.projectclouds.MainActivity", file));
getContext().startActivity(Intent.createChooser(intent, "title"));
Now I want to know what are the pros of using your implementation instead of simple intents? I'm pretty new to Android dev so go easy on me.
I also am pretty sure the decision was not random.