开发者

Intent.ACTION_VIEW and subclassing android.net.Uri

开发者 https://www.devze.com 2023-01-31 04:59 出处:网络
In my application I need to view some data which are accessible with Intent.ACTION_VIEW. Problem is in simple fact that I can\'t pass to ACTION_VIEW Intent Uri of my data, since data not in file or ne

In my application I need to view some data which are accessible with Intent.ACTION_VIEW. Problem is in simple fact that I can't pass to ACTION_VIEW Intent Uri of my data, since data not in file or net resource - they're in en开发者_如何学Ccrypted database. I need to either subclass android.net.Uri or find a way and teach ACTION_VIEW accept instead of Uri just simple InputStream. But:

  1. android.net.Uri can't be subclassed, since Uri() constructor is private
  2. Intent.ACTION_VIEW accepts only Uri as data (does it?)

Any ideas how to solve issue?


If your "data" is "in encrypted database", then you have to write your own activity to view that data. Since it is your own activity, it will be able to access the "encrypted database".

0

精彩评论

暂无评论...
验证码 换一张
取 消