I recently posted an app called ‘Repository importer’ which lets you download an app directly from an app.

I recently posted an app called ‘Repository importer’ which lets you download an app directly from an app.

For this app I only need to load a script into the launcher.

First I used the default ‘load a script’ method. This is the normal way of importing scripts, but the user need to go to lightning menu, scripts, load a script, and click the app.

But then, Lukas Morawietz​ found a clever way of load this script from a template. This way you only need to accept the prompt of the template, nothing more. The cons is that this edits the launcher’s files, and need to force close it (for the user: the launcher restarts)

So, as a user: what do you prefer?

Pierre Hébert​, I already suggested this from email but perhaps you didn’t received it.

What about an Intent to tell the launcher to load a script from apk, the same as with templates?

]]>

21 Commentsto I recently posted an app called ‘Repository importer’ which lets you download an app directly from an app.

  1. Anonymous says:

    < ![CDATA[

    I just wanna add: it does not really modify LL, instead it just resets what was loaded by the template (except the script). The action is as save as an LL script can be (at the current version). I tried around a lot and didn’t manage to corrupt LL.

    ]]>

  2. Anonymous says:

    < ![CDATA[

    I don’t mind the restart, but it should be noted in the template description and the prompt.

    ]]>

  3. Anonymous says:

    < ![CDATA[

    Bogdan Tautu There is a note before applying the template. As the dialog is a LL internal one, we can’t put a note there (without hacking, which would imply that we have already a script in LL, which would make the whole process irrelevant)

    ]]>

  4. Anonymous says:

    < ![CDATA[

    Less work for the user is always better.

    ]]>

  5. Anonymous says:

    < ![CDATA[

    TrianguloY​ it would also be possible to allow both.

    ]]>

  6. Anonymous says:

    < ![CDATA[

    Lukas Morawietz


    That’s….why I didn’t though of it before?


    Now, with the ability to load the template building the script directly it will be really easy.


    What do you think It’s easier: update the template-branch or the script-branch? (I guess it’s easier to keep the template, but want to ask)

    ]]>

  7. Anonymous says:

    < ![CDATA[

    Honestly guys, either way sounds relatively easy and painless for individuals like myself, where scripting is not a talent, compared to the copy/paste method. Half of the time, the scripts contain more characters than my clipboard, so I end up pasting sections at a time, which just adds to the confusion. That’s why I downloaded the script importer app as soon as I seen it. Loading a template seems no better or worse to me, but I can see where a template might be more attractive to some that would be hesitant to install an additional app for various reasons. Thanks to both of you BTW!

    ]]>

  8. Anonymous says:

    < ![CDATA[

    TrianguloY I didn’t think about it before, because it wasn’t possible before, but with my latest push it is.



    thomas greer​ I think I need to clarify this one. The processes described here need to be done once, either of them is possible. The app needs to be installed in both cases.


    The only difference is: loading from script takes two or three clicks in the launcher, while loading from template takes two clicks from within the importer app. The result is exactly the same.

    ]]>

  9. Anonymous says:

    < ![CDATA[

    Lukas Morawietz okay, that did clear it up some, but still seems alot easier than my previous methods. One thing I’m not clear on, will this load all scripts, or just a selected script? I haven’t ran TrianguloY​’s app yet as I have most of the scripts from the repository already, as well as the few I’ve made for myself. I mainly downloaded it for my other devices. I assumed it was pick and choose which scripts you want.

    ]]>

  10. Anonymous says:

    < ![CDATA[

    thomas greer sorry, I want clear enough in the description of the post.


    As Lukas said, it is only needed for the Manager script, the one that the app uses to import the scripts. Then, all the imported scripts are made using that one as intermediate, in this case nothing is needed, all is automatic.



    But anyway if possible I would like to merge both in the same app.


    (And if Pierre Hébert​ accepts my suggestion…it will be easier)

    ]]>

  11. Anonymous says:

    < ![CDATA[

    TrianguloY yes I received your email but I forgot to reply, sorry 🙁



    I have a slightly different point of view on this. Firstly I would prefer to clearly separate templates and scripts.


    Secondly if only the number of clicks is a matter (in other words, how prominent is the feature), then maybe the issue is in the user interface, not in the import process.



    What I mean is that the app could well have a generic “Load something” (TODO: find a better word for something), which would hide the underlying implementation differences. It could display a unified list, possibly with categories such as template, style, backup or script. The app would perfectly be able to manage the thing transparently under the hood.



    Regarding the desktop configuration which is done through side modification of the configuration file (in order to remove a desktop) and requires a restart, this is a “minor” issue: it could be improved by either adding APIs to manage desktops. Which has to be done anyway.



    But if the main problem is a user interface problem, then it has to be improved at the UI level, not on the importation process side, which is, don’t get me wrong, a smart workaround.



    And also the importer script is so great that maybe it would deserve a big shortcut to it just in the middle of the default setup.

    ]]>

  12. Anonymous says:

    < ![CDATA[

    Pierre Hébert​: ‘Load resource’ ?

    ]]>

  13. Anonymous says:

    < ![CDATA[

    Seems a bit too technical to me… Maybe a simple “Import…” would be clear enough ?

    ]]>

  14. Anonymous says:

    < ![CDATA[

    Yes, that’d be great. Maybe you can even keep the current structure of a template (for backward compatibility), but allow it to contain e.g. only a style, script, wallpaper, desktop, whatever

    ]]>

  15. Anonymous says:

    < ![CDATA[

    And another thing: an app requesting to load a ‘resource’ (replace with something ) should get a result containing:


    – Whether the import was sucessful or not


    – Ids of loaded stuff (e.g. desktop, script)


    (startactivityforresult instead of startactivity)



    And I think loading a resource should not be possible without user interaction. (LL woundable enough) Otherwise you could easily build a Trojan to take over LL without any possibitlity for the user to prevent this.

    ]]>

  16. Anonymous says:

    < ![CDATA[

    Of course.


    And also maybe, but I think we are going too far, show a dialog with a preview of the script/desktop/whatever will be loaded (when possible)

    ]]>

  17. Anonymous says:

    < ![CDATA[

    Lukas Morawietz when you say startActivityForResult, you mean you would like to trigger the laoding process through script ? I strongly agree on the user confirmation.


    TrianguloY this is not too far, this is missing a lot, but I failed to think at this when designing the template. A preview should have been built into the exported data.

    ]]>

  18. Anonymous says:

    < ![CDATA[

    Pierre Hébert​ maybe also, but not mainly. I was thinking of apps calling this. http://developer.android.com/training/basics/intents/result.html



    As for this repository importer, a big problem was that after the script was in the launcher the app still couldn’t call it, because it had no idea of the ID. TrianguloY​​ worked around this, but that shouldn’t be necessary. 

    ]]>

  19. Anonymous says:

    < ![CDATA[

    I think what Lukas wants is:


    The app send a request to the launcher to load a script/template/whatever


    The launcher shows an alert to the user (showing what is possible), and asks for the importation.


    If the user accepts, the launcher send a result to the app saying ‘yes, it accepted’


    If the user cancels, the launcher send a result to the app saying ‘was canceled’


    This way the app can manage the situation, otherwise it need another way of know if it was imported or not



    Am I right? 

    ]]>

  20. Anonymous says:

    < ![CDATA[

    TrianguloY


    yes, you are.

    ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *