Giter Site home page Giter Site logo

nat's Introduction

Nat.js

npm license

Next generation mobile framework for building native / hybrid apps.

Links

Documentation

To check out docs and examples, visit natjs.com.

Nat Explorer

Nat Explorer is a nat example app, help you explore Nat modules instantly. Source Code

Available on App Store    Android App on Google Play

Also, you can download it directly by scan the QRcode below.

Download Nat Explorer

Installation

npm install natjs --save

Add nat moudles you need from weex plugin market

weexpack plugin add [nat moudle]

Usage

Use Nat in vue/weex file (.vue/.we)

<script>
import Nat from 'natjs'

// Make a phone call
Nat.call('415-736-0000')

// Take a photo
Nat.camera.captureImage((err, ret) => {
    console.log('Path: ', ret.path)
})

// Get device info
Nat.device.info((err, ret) => {
    console.log('Info: ', ret)
})

</script>

Modules

  • camera
  • communication
  • geolocation
  • media
    • image
    • audio
    • video
  • modal
  • recorder
  • steam
  • transfer
  • sensor
    • accelerometer
    • compass
  • device
    • info
    • network
    • vibration
    • screen
    • volume
    • battery
  • third-party
    • alipay
    • wechat

Supported Platforms

  • Android
  • iOS

License

MIT

Copyright (c) 2017-present, Acathur

nat's People

Contributors

acathur avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nat's Issues

Support for other auth providers other than wechat

Hi, we are using Natjs on our upcoming App but we can't find any plugin for Facebook/Google auth. Since Natjs supports wechat, is there any way to make it work? Or any plugin I'm not aware of that I could use? I can't find anything

nat.upload

nat.upload具体怎么用 我这一直报错

Nat.image.pick bug

环境: android8.0
问题:
1,每次选择一张图片整个屏幕都会闪一下,然后内存会GC好几次。
2,选择图片后没有预览功能

can't install natjs

Fetching plugin "nat-communication" via npm
Installing "[email protected]" for android
Android Studio project detected
ANDROID_HOME=C:\Users\Administrator.PC-201706051836\AppData\Local\Android\sdk
JAVA_HOME=D:\JAVA\jdk
Failed to install 'nat-communication':Error
at Object.module.exports.check_gradle (E:\nodejs\node_global\node_modules\weexpack\lib\src\platforms\android_pack\lib\check_reqs.js:90:25)
at GradleBuilder.prepEnv (E:\nodejs\node_global\node_modules\weexpack\lib\src\platforms\android_pack\lib\builders\GradleBuilder.js:175:23)
at Api.module.exports.runClean (E:\nodejs\node_global\node_modules\weexpack\lib\src\platforms\android_pack\lib\build.js:133:20)
at E:\nodejs\node_global\node_modules\weexpack\lib\src\platforms\android_pack\Api.js:395:50
at _fulfilled (E:\nodejs\node_global\node_modules\weexpack\node_modules\q\q.js:787:54)
at self.promiseDispatch.done (E:\nodejs\node_global\node_modules\weexpack\node_modules\q\q.js:816:30)
at Promise.promise.promiseDispatch (E:\nodejs\node_global\node_modules\weexpack\node_modules\q\q.js:749:13)
at E:\nodejs\node_global\node_modules\weexpack\node_modules\q\q.js:557:44
at flush (E:\nodejs\node_global\node_modules\weexpack\node_modules\q\q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
Error: Could not find gradle wrapper within Android SDK. Might need to update your Android SDK.
Looked here: C:\Users\Administrator.PC-201706051836\AppData\Local\Android\sdk\tools\templates\gradle\wrapper

nat-media-image compile error

When I build the app in my mac, it show this log in the terminal.

需要: Activity,HashMap<String,Object>
找到: Activity,HashMap<String,Object>,<匿名HLModuleResultListener>
原因: 实际参数列表和形式参数列表长度不同

I try to delete the last paramater in the MediaImageModule.java/MediaImageModule.java:24

then it works! But I still can't use nat to pick image from the gallery.

natjs plugins no longer compatible with weexpack? "This package of weex is not support anymore! Please choose other package."

Hi

Looks like newest weexpack is no longer compatible with natjs (it also happens with weex-svg so possibly weexpack has broken compatibility downwards)

It happens for all nat-* plugins I've tried

weexpack plugin add nat-transfer
14:19:51 : This package of weex is not support anymore! Please choose other package.

weex --version
v1.2.6

  • weexpack : v1.0.2
  • weex-builder : v0.3.12
  • weex-previewer : v1.4.4

Mac Sierra 10.12.4

插件添加成功 使用不了

我第一次 使用weex 构建项目
安装nat插件, 安装了natjs 然后 安装 我 运行 weexpack plugin add nat-media-image

在plugins 目录下 有一个 json 文件
里面是 是一些 插件 列表
{
"type": "maven",
"groupId": "com.instapp.nat",
"name": "weex-plugin-media-image",
"version": "1.0.1",
"dependency": "com.instapp.nat:weex-plugin-media-image:1.0.1"
},

但是 我发现platforms 平台里面的 ios 安卓 目录 里面 没有 所谓的 weex-plugin-media-image 项目,我在vue 页面 也调用不了,是怎么会呢?

Nat.image.pick() bug

环境:Android 6.0, Android 8.0

步骤:
1 在页面A,点击按钮触发Nat.image.pick()

2 安卓6.0,点击摄像头icon拍照
2.1 使用照片,显示空白
2.2 使用Nat.upload()上传成功后,下载下来,显示也是空白的

2 安卓8.0点击摄像头icon拍照,页面会闪烁一下,然后回到页面A

其他说明:
iOS是正常的

代码:

Nat.image.pick({
  limit: 1,
  showCamera: true,
}, (err, res) => {
  // some code
})

Unhandled promise rejectionTypeError: device.info is not a function

Using module nat-device-info in android, when i get info of the device,in android studio,it has errors like this:
Unhandled promise rejectionTypeError: device.info is not a function. (In 'device.info', 'device.info' is undefined)__ERROR

is there anything wrong in my code ?
/index.vue

<template>
  <div class="wrapper">
    <image :src="logo" class="logo" @click='getInfo'/>
    <text class="greeting">demo3</text>
    <text class="greeting">{{text}}</text>
  </div>
</template>
<script>
 import Nat from 'natjs'
 export default {
    name: 'App',
   data () {
      return {
        logo: 'https://gw.alicdn.com/tfs/TB1yopEdgoQMeJjy1XaXXcSsFXa-640-302.png',
        text:'hello'
      }
    },
    methods:{
      getInfo(){
        Nat.device.info((err, ret) => {
          if(err){
            this.text = 'error'
          }else {
            this.text = ret
          }
        })
      }
    }
  }
</script>

/plugins.json

{
  "ios": [],
  "web": [],
  "android": [
    {
      "type": "maven",
      "groupId": "com.instapp.nat",
      "name": "weex-plugin-device-info",
      "version": "1.0.0-alpha"
    }
  ]
}

environment:
ubuntu 16.04
node 8.9.3
npm 5.6
weexpack 1.1.1
natjs 0.1.5

nat-geolocation模块

该模块在ios上可用 在android上无效这是为什么。

call、image等功能在android上都能调用

11-21 08:52:10.315 29988-30048/com.alibaba.weex D/weex: [WXBridgeManager] callNativeModule >>>> instanceId:1, module:nat/geolocation, method:get, arguments:["2"]
11-21 08:52:10.315 29988-29988/com.alibaba.weex E/weex: [WXModalUIModule] alert param parse error java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference
                                                            at com.taobao.weex.ui.module.WXModalUIModule.toast(WXModalUIModule.java:72)
                                                            at java.lang.reflect.Method.invoke(Native Method)
                                                            at com.taobao.weex.bridge.MethodInvoker.invoke(MethodInvoker.java:46)
                                                            at com.taobao.weex.bridge.NativeInvokeHelper$1.run(NativeInvokeHelper.java:48)
                                                            at com.taobao.weex.common.WXThread$SafeRunnable.run(WXThread.java:49)
                                                            at android.os.Handler.handleCallback(Handler.java:789)
                                                            at android.os.Handler.dispatchMessage(Handler.java:98)
                                                            at android.os.Looper.loop(Looper.java:164)
                                                            at android.app.ActivityThread.main(ActivityThread.java:6541)
                                                            at java.lang.reflect.Method.invoke(Native Method)
                                                            at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
                                                            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)

在AS中模块可以识别的出来 。但是回调内部事件没有没有被触发

11-21 10:19:54.877 17181-17236/com.alibaba.weex D/weex: callJS >>>> instanceId:2function:callJS tasks:[{"data":"2","type":2},{"data":"[{\"args\":[\"1366\",\"click\",{\"position\":{\"height\":40.104168,\"width\":309.1146,\"x\":67.1875,\"y\":797.9167}},null],\"method\":\"fireEvent\"}]","type":3}]
11-21 10:19:54.880 17181-17236/com.alibaba.weex D/weex: [WXBridgeManager] callNativeModule >>>> instanceId:2, module:nat/geolocation, method:get, arguments:["44"]

NatJs Plugin installation issue after updating weex environment

$ weexpack plugin add nat-modal
Fetching plugin "nat-modal" via npm
Error during untar for /Users/sushilparajuli/.cordova/lib/npm_cache/nat-modal/1.0.1-alpha/package.tgz: Error: EACCES: permission denied, open '/Users/sushilparajuli/.cordova/lib/npm_cache/nat-modal/1.0.1-alpha/package/ios/Pods/NatModal/ios/Classes/NatModal.h'
Error: Failed to fetch plugin nat-modal via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: EACCES: permission denied, open '/Users/sushilparajuli/.weexpack/lib/npm_cache/nat-modal/1.0.1-alpha/package/ios/Pods/NatModal/ios/Classes/NatModal.h'

Tried Sudo
sudo weexpack plugin add nat-modal
Password:
Fetching plugin "nat-modal" via npm
Error: Cannot find plugin.xml for plugin "package". Please try adding it again.

Spec:

  • weex: v1.2.9
  • weexpack : v1.1.5
  • weex-builder : v0.3.14
  • weex-previewer : v1.4.6

The path get by Nat.image.pick can't be used in NSData

ENV: ios11.4, iphone 8 simulator

I get a path by Nat.image.pick like this:
nat://static/image/B84E8479-475C-4727-A4A4-B77AA9980897/L0/001
And I need use the aliyun-oss-ios-sdk to upload my image. But when I try to use NSData* data = [NSData dataWithContentsOfFile:filePath]; to read the image, I get a "(null)". Is the path above a real path in system? How can I resolve it.

Does not work when importing as framework (use_frameworks!)

Hi!

I want to use natjs libs but importing them as a framework (i.e. adding use_framewoks! in my Podfile). I need this because I am also using a swift library and it is not possible to import a swift static lib and use it in ObjC(*).

I am testing with the device info plugin. To reproduce the issue, just add natjs and nat-device-info to a new project, and add use_framewoks! in platforms/ios/Podfile. The project compiles, but then I get the runtime js error TypeError: undefined is not a function (near '...device.info...'. Without use_framewoks!, it works.

Is there a way to make natjs work with use_framewoks!?

Thanks!

(*)- Actually, I found this workaround but seems too much work or most likely it will not work.

transfer upload error

环境:iPhone 6s, iOS 10.3.2

Xcode报错信息:
[error]WXJSCoreBridge.m:146, jsLog: Unhandled promise rejection {"msg":"UPLOAD_INVALID_ARGUMENT","code":153050}

其他:
安卓没报错

代码:

Nat.upload('上传接口', {
  path: '文件路径',
}, (error, response) => {
  if(error) {
    reject(error);
  } else {
    const data = response.data;
    const res = typeof data === 'string' ? JSON.parse(data) : data;
    if(res.errorCode === 100) {
      reject(res);
    } else {
      resolve(res);
    }
  }
});

nattransfer

环境
weexSDK: 0.18
NatTransfer (= 0.0.4)

调用Nat.upload
返回ret为 { progress: [random] }
导致 程序计入
else if (ret.progress) {/**/}
无法执行

resolve(ret);
if (typeof cb === 'function') cb(null, ret);

相关代码

期待能出三个功能扫码、地图以及图表

这三个功能还是蛮重要的,现在线上其他人写的插件貌似都存在一些问题,现在weex-amap那个插件在引入后在weex打包时会报错,在android无法运行,ios可以,weex-chart插件不知道什么问题 貌似版本过低导致无法调用,期待官方能出这三块插件

调用拍照的方法报错

Unhandled promise rejection TypeError: camera.captureImage is not a function. (In 'camera.captureImage', 'camera.captureImage' is undefined)

weex plugin add nat-camera
npm install natjs --save
[WXSDKEngine registerModule:@"camera" withClass:[NatCamera class]];
这三个步骤都做了

麻烦看下,谢谢!!!

Would you please create a nat start project ?

Would you please create a nat start project ?

Hi, dear nat dev, i'm so happy to see such an elegant nat, The ant it's a great project, but I can't use it very well now, i can't create a full, debug and packaged ant + weex project.

It's really disappointing, so please provide a nat + weex start . Perhaps this request is too abrupt, in short, Thanks!

reportJSException >>>> instanceId:2, exception function:callJS, exception:Exception: TypeError: null is not an object (evaluating 't.path')

require('natjs').camera.captureImage({}, (err, ret) => {
this.turl_path = ret.path;
});

这是我的js代码,第一次触发这个事件的时候正常打开照相机,但是this.url获取不到,之后再触发这个事件,报如下错误。

reportJSException >>>> instanceId:2, exception function:callJS, exception:Exception: TypeError: null is not an object (evaluating 't.path')
(global function):5:828
(global function):5:2515
f@(weex framework):3:30852
(weex framework):3:31099
forEach@[native code]
d@(weex framework):3:30998
(weex framework):8:22648

拜托大佬解答

Getting Camera Busy Issue in Android 7.0

camera busy issue
Following is code, I have implemente in the code as per nat-explorer example
`Nat.camera.captureVideo({}, (err, ret) => {
if (err) {
Nat.toast('[ERROR] ' + JSON.stringify(err))
return
}

			Nat.toast(JSON.stringify(ret, null, 2))
			this.path = ret.path
		})`

I tried clearing cache too much getting Camera Busy issue at all time

Environment:
-weex v1.2.9

  • weexpack : v1.1.6
  • weex-builder : v0.3.14
  • weex-previewer : v1.4.6

Nat Js updated version as follow
{ "type": "maven", "groupId": "com.instapp.nat", "name": "weex-plugin-camera", "version": "1.0.2", "dependency": "com.instapp.nat:weex-plugin-camera:1.0.2" }

在.vue中使用modal得到render error

在weex的.vue文件中使用modal,页面左上角出现:render error:-2013

code:

<template>
  <div class="wrapper" @click="click">
    <image :src="logoUrl" class="logo"></image>
    <text class="title">{{target}}</text>
    <text class="desc">Now, let's use vue to build your weex app.</text>
  </div>
</template>

<style>
  .wrapper { align-items: center; margin-top: 120px; }
  .title { padding-top:40px; padding-bottom: 40px; font-size: 48px; }
  .logo { width: 360px; height: 156px; }
  .desc { padding-top: 20px; color:#888; font-size: 24px;}
</style>

<script>
  import Nat from 'natjs'
  export default {
    data: {
      logoUrl: 'http://img1.vued.vanthink.cn/vued08aa73a9ab65dcbd360ec54659ada97c.png',
      target: 'World'
    },
    methods: {
      click: function (e) {
        Nat.toast({
          message: 'Nat',
          duration: 2000,
        })
      }
    }
  }
</script>

nat-wechat

执行weex plugin add nat-wechat后,显示This package of weex is not support anymore! Please choose other package. wechat是不能用了吗?

调用camera.captureImage闪退

Nat.camera.captureImage({}, (err, ret) => {
        if (err) {
          Nat.toast('[ERROR] ' + JSON.stringify(err))
          return
        }
        Nat.toast(JSON.stringify(ret, null, 2))
        this.path = ret.path
      })

环境:macos10.13.4 android8.0.0(miui9)
操作:新建weex项目,安装了最新的android stutio,引入Natjs,npm run android,手机上测试每次调用captureImage就闪退,日志如下:

java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
	at com.taobao.weex.bridge.NativeInvokeHelper$1.run(NativeInvokeHelper.java:50)
	at com.taobao.weex.common.WXThread$SafeRunnable.run(WXThread.java:49)
	at android.os.Handler.handleCallback(Handler.java:789)
	at android.os.Handler.dispatchMessage(Handler.java:98)
	at android.os.Looper.loop(Looper.java:164)
	at android.app.ActivityThread.main(ActivityThread.java:6665)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:781)
Caused by: java.lang.reflect.InvocationTargetException
	at java.lang.reflect.Method.invoke(Native Method)
	at com.taobao.weex.bridge.MethodInvoker.invoke(MethodInvoker.java:46)
	at com.taobao.weex.bridge.NativeInvokeHelper$1.run(NativeInvokeHelper.java:48)
	... 8 more
Caused by: android.os.FileUriExposedException: file:///storage/emulated/0/Instapp/nat_img_1526994625609.jpg exposed beyond app through ClipData.Item.getUri()
	at android.os.StrictMode.onFileUriExposed(StrictMode.java:1958)
	at android.net.Uri.checkFileUriExposed(Uri.java:2356)
	at android.content.ClipData.prepareToLeaveProcess(ClipData.java:941)
	at android.content.Intent.prepareToLeaveProcess(Intent.java:9747)
	at android.content.Intent.prepareToLeaveProcess(Intent.java:9732)
	at android.app.Instrumentation.execStartActivity(Instrumentation.java:1611)
	at android.app.Activity.startActivityForResult(Activity.java:4540)
	at android.support.v4.app.BaseFragmentActivityApi16.startActivityForResult(BaseFragmentActivityApi16.java:54)
	at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:67)
	at android.app.Activity.startActivityForResult(Activity.java:4498)
	at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:720)
	at com.instapp.nat.camera.CameraModule.captureImage(CameraModule.java:69)
	at com.instapp.nat.weex.plugin.Camera.Camera.realCaptureImage(Camera.java:59)
	at com.instapp.nat.weex.plugin.Camera.Camera.captureImage(Camera.java:53)
	... 11 more

MultiImageSelector createIntent

提供了!
MultiImageSelector createIntent方法:
Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
intent.setDataAndType(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, "image/*");
我使用这种方式可以打开相册 选择照片 和 获取路径无法正常工作

源码中的:
Intent intent = new Intent(context, MultiImageSelectorActivity.class);
方式永远打开的是sdcard

Nat.image.preview 相关问题

1,在android设备上面不能按照设置的current进行开始预览,只能从第一个和最后一个开始预览

还有希望增加支持动态放大缩小功能、动态旋转功能

Nat-media-image,

Invoke the “pick” method,I haved the image paths,but how to get the image binary data?

已有项目集成的操作方式?

RT,没有已有项目集成的操作方式么?类似android通过gradle 添加依赖的方式 或者iOS通过pods的方式?

在Nat-Explorer项目里发现有依赖的方式,文档中怎么不提出来呢?

[Android]nat.transfer download failed

code line 156: outputStream = new FileOutputStream(fileFinal);
Error information: java.io.FileNotFoundException: /storage/emulated/0/102-1235614960-43-75-119-60-56679724103490.6537333 (Permission denied)
Add permission:

problem during weexpack plugin instalation

λ weexpack plugin add nat-media-image
Fetching plugin "nat-media-image" via npm
Installing "[email protected]" for android
Android Studio project detected
ANDROID_HOME=C:\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_144
Failed to install 'nat-media-image':Error
at Object.module.exports.check_gradle (C:\Users\Vitor Tecladista\AppData\Roaming\npm\node_modules\weexpack\lib\src\platforms\android_pack\lib\check_reqs.js:90:25)
at GradleBuilder.prepEnv (C:\Users\Vitor Tecladista\AppData\Roaming\npm\node_modules\weexpack\lib\src\platforms\android_pack\lib\builders\GradleBuilder.js:175:23)
at Api.module.exports.runClean (C:\Users\Vitor Tecladista\AppData\Roaming\npm\node_modules\weexpack\lib\src\platforms\android_pack\lib\build.js:133:20)
at C:\Users\Vitor Tecladista\AppData\Roaming\npm\node_modules\weexpack\lib\src\platforms\android_pack\Api.js:395:50
at _fulfilled (C:\Users\Vitor Tecladista\AppData\Roaming\npm\node_modules\weexpack\node_modules\q\q.js:787:54)
at self.promiseDispatch.done (C:\Users\Vitor Tecladista\AppData\Roaming\npm\node_modules\weexpack\node_modules\q\q.js:816:30)
at Promise.promise.promiseDispatch (C:\Users\Vitor Tecladista\AppData\Roaming\npm\node_modules\weexpack\node_modules\q\q.js:749:13)
at C:\Users\Vitor Tecladista\AppData\Roaming\npm\node_modules\weexpack\node_modules\q\q.js:557:44
at flush (C:\Users\Vitor Tecladista\AppData\Roaming\npm\node_modules\weexpack\node_modules\q\q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:73:7)
Error: Could not find gradle wrapper within Android SDK. Might need to update your Android SDK.
Looked here: C:\Android\sdk\tools\templates\gradle\wrapper
what do i :?

weex keeps stopping in android8.0 when using nat-camera

using module nat-camera, it works fine in android 6.0; but in android8.0; it has error like this:

FATAL EXCEPTION: main
Process: com.weex.app, PID: 3520
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at com.taobao.weex.bridge.NativeInvokeHelper$1.run(NativeInvokeHelper.java: 50)
    at com.taobao.weex.common.WXThread$SafeRunnable.run(WXThread.java: 49)
    at android.os.Handler.handleCallback(Handler.java: 789)
    at android.os.Handler.dispatchMessage(Handler.java: 98)
    at android.os.Looper.loop(Looper.java: 164)
    at android.app.ActivityThread.main(ActivityThread.java: 6541)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java: 240)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java: 767)
Caused by: java.lang.reflect.InvocationTargetException
    at java.lang.reflect.Method.invoke(Native Method)
    at com.taobao.weex.bridge.MethodInvoker.invoke(MethodInvoker.java: 46)
    at com.taobao.weex.bridge.NativeInvokeHelper$1.run(NativeInvokeHelper.java: 48)
    at com.taobao.weex.common.WXThread$SafeRunnable.run(WXThread.java: 49)
    at android.os.Handler.handleCallback(Handler.java: 789)
    at android.os.Handler.dispatchMessage(Handler.java: 98)
    at android.os.Looper.loop(Looper.java: 164)
    at android.app.ActivityThread.main(ActivityThread.java: 6541)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java: 240)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java: 767)
Caused by: android.os.FileUriExposedException: file:///storage/emulated/0/Instapp/nat_img_1520219484384.jpg exposed beyond app through ClipData.Item.getUri()
    at android.os.StrictMode.onFileUriExposed(StrictMode.java: 1958)
    at android.net.Uri.checkFileUriExposed(Uri.java: 2348)
    at android.content.ClipData.prepareToLeaveProcess(ClipData.java: 941)
    at android.content.Intent.prepareToLeaveProcess(Intent.java: 9735)
    at android.content.Intent.prepareToLeaveProcess(Intent.java: 9720)
    at android.app.Instrumentation.execStartActivity(Instrumentation.java: 1609)
    at android.app.Activity.startActivityForResult(Activity.java: 4472)
    at android.support.v4.app.BaseFragmentActivityApi16.startActivityForResult(BaseFragmentActivityApi16.java: 54)
    at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java: 67)
    at android.app.Activity.startActivityForResult(Activity.java: 4430)
    at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java: 720)
    at com.instapp.nat.camera.CameraModule.captureImage(CameraModule.java: 69)
    at com.instapp.nat.weex.plugin.Camera.Camera.realCaptureImage(Camera.java: 50)
    at com.instapp.nat.weex.plugin.Camera.Camera.captureImage(Camera.java: 44)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.taobao.weex.bridge.MethodInvoker.invoke(MethodInvoker.java: 46)
    at com.taobao.weex.bridge.NativeInvokeHelper$1.run(NativeInvokeHelper.java: 48)
    at com.taobao.weex.common.WXThread$SafeRunnable.run(WXThread.java: 49)
    at android.os.Handler.handleCallback(Handler.java: 789)
    at android.os.Handler.dispatchMessage(Handler.java: 98)
    at android.os.Looper.loop(Looper.java: 164)
    at android.app.ActivityThread.main(ActivityThread.java: 6541)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java: 240)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java: 767) 

any idea why this happen?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.