2014년 12월 15일 월요일

Many small apps - bring together with A dashboard app and Activity Starter?

My "clients"  (staff and children!) are "requesting" many applications from me, most of which are all small one screen apps.

I started off thinking I could have just one big app which each smaller app on a different screen, but I think this may become unweidly and might bork if I go beyond 10 screens etc.

So am now thinking of writing a "dashboard" app and using activity starter to call each app as required.

Any advice or suggestions on the best way to do this, especially around returning (closing or leaving open?) from an app to the dashboard app, and the possibility that the smaller apps may need to interact with each other?

I am quite comfortable with using tinydb or php/csv external data.



You could have a lot of small apps on your Android, then use ActivityStarter to  call them


Starting arbitrary apps

You can use the Activity Starter to start any activity at all if you know the package name and class name, or the appropriate intent. Some developers document these intents for the benefit of other Android developers. For hints on starting other apps using intents, see the Android API documentation or search the Android developer forums.
If you have an app on your phone and you don't have the source code, you might still be able figure out the package name and class name (and sometimes the intent) by launching the app and inspecting the Android system log, as indicated above.

The documentation is a bit skimpy but you should be able to figure it out.



Have fun experimenting.    Run in to issues?   Someone here will possibly know so ask again.



Given my particular needs (things constantly changing, for existing and adding/removing apps !) seems it will make more sense to have many apps and a dashboard app to call them all. Activity Starter allows results to be passed and received so this will help, and if I need it I can use external data/lists which can be called by all.

I'll have to do some testing, but assume that "Close Screen" will be equivalent to "Close Application" when generating a result?

How to call dashboard app (which could be open or closed?) when closing other app ("so it feels like one app") ?



At the moment, you are at the leading edge of technology Tim.   What have you tried?

Close Screen will close one screen.  Close Application closes down the entire app that it is called from.  If elicited from your 'dashboard' it will close the dashboard app...I do not know if it will close other apps opened by dashboard.... you gotta'  try and see ... that is what most of us do when we venture in the bleeding edge and do something we have never attempted before.  I suggest you do not 'assume' anything.  Try it, if it breaks, then ya' know, if it works, rejoice.

"How to call dashboard app (which could be open or closed?) when closing other app ("so it feels like one app") ?"     I do not know.  I think putting an Activity.Starter in each of the other apps ... however, the way to move from an ActivityStarter elicited screen to the main page of the app is to  use the back button.   I am not sure there is another way.  So that idea probably will not work :(  

I do not know if it is possible to pass data between apps automatically, possibly a Boolean value)... without creating a file in one app and reading it in the other app.  Something like that would allow communication to know whether the value is true/false  but I do not see how to create automatic control.

Your question is interesting but the ability to do what you want might be impossible with AI2.

Again, try some blocks...you are going where no one has gone before perhaps?



How to call dashboard app (which could be open or closed?) when closing other app ("so it feels like one app")

the dashboard app opens another app using the activity starter. After closing that app (close application block) you are back in the dashboard app
you also can pass values back to the dashboard app, I once made a snippet with App Inventor Classic here https://puravidaapps.com/snippets1.php#fetchdata



OK run a little test, which has thrown up a surprise (to me)

I created a simple app called Dash with a button and activity starter
Then a second app called App1 with an image and a button
Then a third app called App2 with another image and a button

Gathered the activity and class info from App1 and entered into the activity starter in Dash
Set the button in Dash to call the activity starter.

In App1 set the button to Close Application

Compiled all and installed on device

Open up Dash, click the button and App1 (with its image) displays. :)  Click the button in App1 and we return to Dash. :)

But App1 is not independent from Dash - it seems to become a part of it. I can't use the Dash app whilst App1 is opened via Dash.

Is there a way around this so I can return to Dash after opening App1, so that I can then open App2 at the same time, and then hopefully return from either to Dash when I close them ?



Made some progress.

You can set the "dashboard app" to close after you call the app you want, and also send information to the app you call.

This gives you options as to whether you want to return directly to the dashboard app or not

Some blocks and viewer of dashboard which gives examples of both



댓글 없음:

댓글 쓰기