0

I would like to open a Chrome Custom Tab, not to launch a URL, but to display the contents of a String. Is this possible?

Eurig Jones
  • 8,226
  • 7
  • 52
  • 74
  • 2
    I don't think it's possible. Opening a browser to be able to display a string is a bit too expensive, a cheaper alternative is to display it in the app itself, right? – Egor Pasko Apr 19 '17 at 13:06
  • If it's a relatively large string, but not crazy. Lets say 1000 words, I was hoping to be able to use an intent to send this data to inherit the great Search/Find functionality that chrome provides. Essentially for testers to view certain data in some scenarios and not a user facing feature. – Eurig Jones Apr 20 '17 at 15:29
  • ha, makes sense. You can send a "Data URI" via customtabs intent. I did not check, but it probably should work. This command worked for me: adb shell am start -a android.intent.action.VIEW -n com.android.chrome/.Main -d 'data:,Hello%2C%20World!' – Egor Pasko Apr 21 '17 at 15:01
  • there is a limit of how much you can encode into a single intent on Android, but I think 1000 words are within the limits – Egor Pasko Apr 21 '17 at 15:03

0 Answers0