Obsolete
Status Update
Comments
sb...@google.com <sb...@google.com>
ch...@google.com <ch...@google.com> #2
Thank you for submitting this issue. It was last modified before Android Studio 1.0 Launched in 2014. We have made a large number of improvements in Android Studio since 2014 and hope this issue is already resolved. In order to correctly prioritize issues in our upcoming release, we are closing this bug. If you continue to experience your issue on the latest stable version of Android Studio, please submit a new bug report. We apologize for any inconvenience this may cause you.
Description
tools (Emulator, DDMS, Eclipse support, ant scripts...). Use the other
templates for issues with Android itself.
Please describe the feature you're requesting in as much detail as
possible.
Intent provides the following APIs: #setData(Uri) and #setType(String). Unfortunately, setting one clears the other:
Intent intent = new Intent();
intent.setData(Uri.parse("
intent.setType("text/html");
Uri uri = intent.getData();
// uri == null
I propose a Lint rule to check for calls to #setData(Uri) and #setType(String) on the same Intent object. If found, suggest that they probably want to use Intent#setDataAndType(Uri, String)