Android Question How to call a New Application from My Application ( New APK )

Devendra

Member
Licensed User
Longtime User
Dear Erel,

Please let me know is there a way where we can call a APK from our application, I Have created the Cash Box , Printer , Customer Display Using Eclipse from the samples provided by my supplier, I tried the Wrapper Method & SLC method which did not work ,Also Please Explain me why it does not work because the SLC compiler gave aoutput with out a error, I think if you guide me it should work, I have send you the original coding of the SDK Sample in my earlier post.Any way please let me know is there a way to invoke a APK from my B4A application At Least if you cant help me in this SLC & Library Subject.
 

Devendra

Member
Licensed User
Longtime User
Dear Erel,

I am Getting a issue in this

StartActivity(PackageManager.GetActivityIntent(<package name>)) -- Package Name is "Whatever.APK" am i right

The "PackageManager" is highlighted in red it does not get compiled, Pls Explain Also give me a clue of how to Open the COM Port 1 in my POS device since in my unit documentation it says customer display can be directly accessed through this.

Please go through this document the example send from the supplier is on eclipse works fine, Why not B4A.
 

Attachments

  • Specification of 10-bit Nixie Tube Guest Display Board.zip
    85.9 KB · Views: 170
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Dear Erel,

This is a community forum! Dont limit your question to a single person!

I am Getting a issue in this

StartActivity(PackageManager.GetActivityIntent(<package name>)) -- Package Name is "Whatever.APK" am i right

NO! it´s the PACKAGENAME, not the apk-filename.

com.whatsapp for example is the packagename of WhatsApp

EVERY App has it´s own packagename. You must find out the packagename of the app you want to start.
 
Upvote 0

Devendra

Member
Licensed User
Longtime User
This is a community forum! Dont limit your question to a single person!



NO! it´s the PACKAGENAME, not the apk-filename.

com.whatsapp for example is the packagename of WhatsApp

EVERY App has it´s own packagename. You must find out the packagename of the app you want to start.

Thanks for the reply,

How to find the package name in app pls explain
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
How to find the package name in app pls explain

With this code
B4X:
Dim pm As PackageManager ' Mark PHONE-Lib for this
Dim packages As List
packages = pm.GetInstalledPackages
For i = 0 To packages.Size -1
    Log(packages.Get(i))
Next
you get a list of all installed apps. Respectively their packagenames

And, btw, these packagenames are useable in Erel´s example in post #3
 
Upvote 0

Devendra

Member
Licensed User
Longtime User
With this code
B4X:
Dim pm As PackageManager ' Mark PHONE-Lib for this
Dim packages As List
packages = pm.GetInstalledPackages
For i = 0 To packages.Size -1
    Log(packages.Get(i))
Next
you get a list of all installed apps. Respectively their packagenames

And, btw, these packagenames are useable in Erel´s example in post #3
Thanks i will try this
 
Upvote 0

Devendra

Member
Licensed User
Longtime User
Dear DonManfred,

Please correct me here your coding works fine , I found the app I want to Start that is bs.Devendra.Cashbox

this is how i applied it


StartActivity(pm.GetActivityIntent(<bs.devendra.Cashbox>))

Please correct me if i am wrong

 
Upvote 0
Top