34
13

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Uri → String、String → Uri の型変換

Posted at

メモとして残しておきます。

Uri → String

これは普通に toString() メソッドを使えばいいです。


Uri uri;
String stringUri;
stringUri = uri.toString();

String → Uri

この場合は Uri.parse() メソッドを使えば実現できます。


Uri uri;
String stringUri;
uri = Uri.parse(stringUri);

誰かの力になれば。

34
13
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
34
13

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?