Android Intent.ACTION_从react native发送
我正试图通过安卓系统向MobiPrint发送.pdf文件。我在Kotlin中有一个例子,但问题是,我使用的是React Native(在Expo内部),还不能正确地翻译它 这是Kotlin代码Android Intent.ACTION_从react native发送,android,react-native,android-intent,expo,Android,React Native,Android Intent,Expo,我正试图通过安卓系统向MobiPrint发送.pdf文件。我在Kotlin中有一个例子,但问题是,我使用的是React Native(在Expo内部),还不能正确地翻译它 这是Kotlin代码 val path: String? = _uri?.path if(path != null) { val intent = Intent(Intent.ACTION_SEND) intent.setClassName( “com.mobiprintpro.retail.a
val path: String? = _uri?.path
if(path != null) {
val intent = Intent(Intent.ACTION_SEND)
intent.setClassName(
“com.mobiprintpro.retail.android“,
“com.mobiprintpro.retail.android.ActivitySend“
)
intent.putExtra("companyCode", "")
intent.putExtra(Intent.EXTRA_STREAM, _uri)
intent.putExtra("fileUri", _uri.toString())
intent.type = "application/pdf"
intent.flags = Intent.FLAG_ACTIVITY_NO_HISTORY
startActivity(intent)
}
世博会确实有一个意向启动器:import*作为“世博会意向启动器”的意向启动器代码>,但它似乎不包括Intent.ACTION\u SEND。如果需要,我并不反对退出世博会,但我也还没有找到一个解决世博会以外的问题的办法。如果有人能给我指出正确的方向,我将不胜感激