ThisGuy
ThisGuy

Reputation: 1415

How to start an intent without 'showing' the second application android

I have an application for Android that reads data from a bar code scanning application. I have successfully created an intent to

  1. Open that barcode application
  2. Scan product from that application
  3. return to my application, pulling the value from barcode application.
  4. manipulate the data I've retrieved.

My question: is there anyway to start that intent without *showing the barcode scanning application ? Example, I click on a button to scan in my app and it automatically retrieves the data (given the user is pointing the camera in an acceptable position to scan the barcode in the barcode application).

Developing an android app via DELPHI XE5

Thanks.

I'm guessing I have to look at the Flags that I can set, but I do not know which one, or even if that is correct.

Upvotes: 1

Views: 356

Answers (1)

kabuko
kabuko

Reputation: 36302

The only way to do this would be if the application exposed a Service to which you could send such an intent. In any case, handling of the intent is completely at the discretion of the target app. Whether it displays something or not is not up to you. All you get to do is send an intent that tells the app your intent. You don't get to specify exactly what it can or can not do, merely make suggestions via extras if they support them.

Upvotes: 1

Related Questions