Android Question Shell app.

netsistemas

Active Member
Licensed User
Longtime User
How shell a app?
i have a APP1 and other: APP2, i need shell APP1 from APP2 .

The next quesition was: pass user from app1 to app2 (and no login in app2, because the user are login in app1)

i try to punt:
B4X:
Sub cmdHerramientas_Click
    Dim i As Intent
    
    
    
    Try
'    i.Initialize("","")
'        Dim jo As JavaObject = i
'        jo.RunMethod("setPackage", Array("netsistemas.fricaltecgases"))

        i.Initialize(i.ACTION_VIEW  ,"")
        i.SetPackage("perico.app2")

        i.SetType("*/*")
        StartActivity(i)
    Catch
        Log(LastException)
        Msgbox(LastException.Message,"")
    End Try

End Sub

and in manifest app2 (perico.app2)

B4X:
AddActivityText(main,
<intent-filter>
              <action android:name="android.intent.action.VIEW" />
</intent-filter>
)
 

DonManfred

Expert
Licensed User
Longtime User
 
Upvote 0

netsistemas

Active Member
Licensed User
Longtime User
Thanks a little step is ok, but.
why mi app called (app1) are finisth. The 'treadh' are acupped by app2.
how get the 2 applications opened?

And.
To pass param i do this:
In app1:
B4X:
...

    returnIntent.PutExtra("Settings","username")

...

and in app2:
B4X:
Sub Activity_Create(FirstTime As Boolean)
 

    Dim pm As B4XPagesManager
    pm.Initialize(Activity)
    
    Dim in As Intent

    in = Activity.GetStartingIntent
    If in <> Null Then
        MsgboxAsync(in.HasExtra("GetSettings"),"")
    End If

    
End Sub




but the app2 say blank (empty text)
 
Upvote 0

netsistemas

Active Member
Licensed User
Longtime User
Oh!,
Then, the user must open and insert againg user in app2.
My idea is get 2 apps, and lunch the second in other 'thread' and then, the user change between one an other..
App1 is B4Android, new app2 is B4X (or migrate all to App2... no... 2 apps and finish question).
Thansk all.

and the second question? pass param to app2 (for to learn how do this).
 
Upvote 0

netsistemas

Active Member
Licensed User
Longtime User
One very beeg for re-doit, the other with b4xpages, and a don't want change app1 (run app? yes? don't touch)
 
Upvote 0
Top