How to open an application created with processing from eclipse?

edited November 2013 in Android Mode

Hi everyone,

I'm a newbie and I really need some help. I have to do an android app about a simple survey with eclipse. Whenyou complete the survey and you click on the "finish" button, a graphic application created with Processing must show up. I have to use this code: Intent i = getPackageManager(). getLaunchIntentForPackage("processing.test.");

but I can't understand where and how I have to save my application created with processing.

Can someone help me please?

Thank you in advance.

Tagged:

Answers

  • edited October 2013

    If I undertand you correctly you need to build two things:

    1) A simple Android "survey app" with Eclipse (and I will leave it to you)

    2) Simple graphic app (Processing Android app) which appears on pressing "Finish" button in your "survey app".

    The question you were asking: where and how to create save your processing app.

    From your survey app you will have to use something like:

    Intent i = getPackageManager(). getLaunchIntentForPackage("com.your.unique.packagename");
    

    The problem is: where to get that unique package name? You have to create Processing sketch in Android mode. Then you have to look into sketch directory. There will be file: AndroidManifest.xml

    The contents of the file will look like this: AndroidManifest.xml sample image

    You have edit this file manually in any code editor and specify the package="" parameter so that it has your selected package name:

    package="com.your.unique.packagename"
    

    Then you can reload the sketch in Processing. And after try running it or exporting it to your device. This will make it appear it on your device under proper package name.

    Now if you run on the same device your "survey app", you should be able to bring up your Processing app on the press of "Finish" button. You will have to use

    Intent i = getPackageManager(). getLaunchIntentForPackage("com.your.unique.packagename");
    startActivity(i);
    

    In the method described above you will use Processing PDE to create grahical sketch and you will use Eclipse to create your survey app. The method above describes how to link them. HTH

  • ps. and I believe that better title for your question would be: Launch Android Processing sketch from another Android app?

Sign In or Register to comment.