Android Question Starting Intent not main

nibbo

Active Member
Licensed User
Longtime User
Hi All

Is it possible to launch another app in an activity other than main?
I have tried but I get the error:

If I change it to main it works OK but i get other problems which are not relevant to this problem...

Intent code:
B4X:
    Dim myIntent As Intent
    myIntent.Initialize(myIntent.ACTION_MAIN,"")
    myIntent.SetComponent("projectName.StockMovement/.movestock")
    myIntent.PutExtra("username", Main.sUserName)
    myIntent.PutExtra("session", Main.SessionID)
    StartActivity(myIntent)

I am guessing I need some manifest changes?

Thanks
 
Last edited:

JordiCP

Expert
Licensed User
Longtime User
Adding this to the manifest should be enough

B4X:
AddActivityText(MoveStock,
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
    </intent-filter>
)
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…