1
votes

In documentation for API level 19, there is no putString method in Bundle class. But I can call Bundle#putString method and my app works fine.

May I call putString method ?
Why do my app work fine ?

Environment:

  • Write code by Kotlin
  • Android Studio 2.1.1
  • compileSdkVersion 24
  • buildToolsVersion 24.0.1
  • nminSdkVersion 17
  • targetSdkVersion 24
2

2 Answers

1
votes

It works because the Bundle extends BaseBundle which has putString(). So, yes you can use it. :)

1
votes

I suppose that you can use putString. Another option is to use putCharSequence (String is a CharSequence)