1

so, i want to make an application, for example is camera. i want to make a camera that can be called when i want to take a picture from another apps.

example, i open "LINE application", and then i take a photo, so there's a dialog that show to choose camera i like to use, i want to my camera shown there, any idea ? thanks

Alnov Lucky
  • 35
  • 1
  • 9
  • doesnt anyone know about this? didnt find an answer until now – Alnov Lucky Jun 14 '16 at 09:04
  • Possible duplicate of [How to export an activity so other apps can call it?](http://stackoverflow.com/questions/8150003/how-to-export-an-activity-so-other-apps-can-call-it) – Robert Jun 14 '16 at 09:09

1 Answers1

1

To open your app from other app is done by

intents and intent filters

for camera add this filter to your app's camera activity

<intent-filter>
                <action android:name="android.media.action.IMAGE_CAPTURE" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.media.action.STILL_IMAGE_CAMERA" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>

It will accept camera intent.

Gaurav
  • 3,615
  • 2
  • 27
  • 50
  • hi, i tried this already and my camera now in the one of choice on the take a photo from line. the next problem is .. i want to remapping my key, for example i want to change my "home" button key to open another apps directly, i tried to open GALLERY by just changing the key inside /system/usr/keylayout/Generic.kl i just change the key like this for example : KEY 152 GALLERY and how if i want to open my specific apps? for example i want to make ABCD apps, and i want to open that ABCD directly opened when i touch my home button, do you have any idea? – Alnov Lucky Jun 14 '16 at 09:15