Italian Intent per Sub

pazzokli

Active Member
Licensed User
Longtime User
Ciao a tutti amanti del bel paese,
ho una domanda contorta per voi. Si può creare un app che tramite intent richiama una sub di un'altra mia app?

Grazie
 

Star-Dust

Expert
Licensed User
Longtime User
Ciao a tutti amanti del bel paese,
ho una domanda contorta per voi. Si può creare un app che tramite intent richiama una sub di un'altra mia app?

Grazie
Ciao amante del bel Paese,
Non si può accedere a una qualunque sub di un'altra App.
Ma se l'app che devi chiamare prevede che tu possa accedere una sua API, come da ad esempio WhatsApp, allora a quel specifico servizio, con gli opportuni metodi, puoi usarlo.
 

LucaMs

Expert
Licensed User
Longtime User
Ciao amante del bel Paese,
Non si può accedere a una qualunque sub di un'altra App.
Ma se l'app che devi chiamare prevede che tu possa accedere una sua API, come da ad esempio WhatsApp, allora a quel specifico servizio, con gli opportuni metodi, puoi usarlo.
Uhm... è da vedere, perché gli Intent possono contenere dati extra, e quindi potresti metteri il nome della routine da eseguire ed anche i parametri.

Magari io (o altri, spero 😄) farò una provoletta (non è Bel Paese, è provola ma va bene lo stesso, spero 😄)
 

giannimaione

Well-Known Member
Licensed User
Longtime User
fai prima ad includere la sub nella "nuova" app, oppure genera una libreria della sub
 

pazzokli

Active Member
Licensed User
Longtime User
fai prima ad includere la sub nella "nuova" app, oppure genera una libreria della sub
Verrebbe assai complicato inserire la Sub nella nuova app perchè questa Sub fa parecchie cose e usa oggetti presenti nella app richiamata.
 

DonManfred

Expert
Licensed User
Longtime User
Ciao amante del bel Paese,
Non si può accedere a una qualunque sub di un'altra App.
Ma se l'app che devi chiamare prevede che tu possa accedere una sua API, come da ad esempio WhatsApp, allora a quel specifico servizio, con gli opportuni metodi, puoi usarlo.
Used Googletranslate to understand. Sorry for writing in English.

That´s not correct in Total.
You are right you can not just directly use any sub from another App.

But if the app supports a/some Intent(s) which can be used then it is Possible.

Remember this (old but still valid) Tutorial

The point is that you need to develop both apps to fully Support some communication. Or at least you need to know the possible Intents the calling (or the receiving) App understands.
 
Last edited:

DonManfred

Expert
Licensed User
Longtime User
Here an Quick example(s)

1. Compile and Install and run AppProvider first.
2. Compile and Install AppClient.

The client when started requests the Settings from the AppProvider. The Result you´ll see in the LOG of the Client.

The Client starts and in activity_create the Request for the Providersettings is started.
The Intent starts the Provider.
The Providerapp starts and opens Main activity.
In activity_resume it checks the calling intent, sees the Request and create an Intent to return to the requestor, starts the intent and then finishes main activity,
The intent starts the client.
The client check in activity_resume for an answer from the Provider. If the Intent contains a "Settings" Extra then the Extra is printed to the LOG.

Have fun 😎
 

Attachments

  • AppClient.zip
    8.3 KB · Views: 151
  • AppProvider.zip
    8.3 KB · Views: 148
Last edited:

Star-Dust

Expert
Licensed User
Longtime User
Used Googletranslate to understand. Sorry for writing in English.

That´s not correct in Total.
You are right you can not just directly use any sub from another App.

But if the app supports a/some Intent(s) which can be used then it is Possible.

Remember this (old but still valid) Tutorial

The point is that you need to develop both apps to fully Support some communication. Or at least you need to know the possible Intents the calling (or the receiving) App understands.
Nella seconda parte della mia risposta l'ho scritto che è possibile se l'app da chiamare lo prevede. Ho preso come esempio WhatsApp ;)

In the second part of my answer I wrote it that it is possible if the app to call calls for it.
I took WhatsApp as an example ;)
 

pazzokli

Active Member
Licensed User
Longtime User
Siete tutti molto disponibili e preparati.
Adesso provo gli esempi e vi faccio sapere.

You are all very kind and smart
Now I'm going to try example and I let you know

edit dopo la prova: grande lavoro Don!
proprio quello che cercavo

edit after try: great job Don!!
this is what I looking for

grazie a tutti , Luca, Star e Don
ps: mettere like è il modo di dire grazie?
 
Last edited:
Top