문제

There are event listener and intent filter in Android for camera actions, something like below

<receiver android:name="com.msronline.main.PictureReceiver">
<intent-filter android:priority="10000" >
<action android:name="com.android.camera.NEW_PICTURE" />
<action android:name="android.hardware.action.NEW_PICTURE" />
<action android:name="android.intent.action.CAMERA_BUTTON" />
<action android:name="android.provider.MediaStore.ACTION_IMAGE_CAPTURE" />
<action android:name="android.media.action.IMAGE_CAPTURE" />
<action android:name="android.media.action.STILL_IMAGE_CAMERA" />
<data android:mimeType="image/*" />
</intent-filter>
</receiver>

I was wondering if iOS has something similar. What I am trying to do is if somebody captures some images from native camera app it should broadcast a system wide message (user captured some images) and I can add a delegate in my app to receive that message and perform some action. I was thinking of Local Notifications for this task but I am not sure whether this is feasible.

도움이 되었습니까?

해결책

The quick answer is no, not in the manner of Androids Broadcasting System. You are not allowed to listen for incoming native delegates, like detecting incoming text messages, incoming calls and native image capturing, when the app is terminated.

I do not know exactly what you want to accomplish but you could, when your app becomes active, listen for changes in the image library and then push a local notification or do whatever you want with the change. I havn't tried this, but you might even be able to detect a change in the image library with Background Tasks on iOS 7, but you might want to read the documentation here.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top