Quantcast
Channel: Intel Developer Zone Articles
Viewing all articles
Browse latest Browse all 3384

Intel® INDE Media for Mobile Tutorials - Building Samples for Android

$
0
0

This tutorial outlines the steps needed to build the Intel® Integrated Native Developer Experience (Intel® INDE) Media for Mobile Samples for Android* in Eclipse* or Android Studio*.

Before getting started, download the Intel® INDE at http://intel.com/software/inde and install Media for Mobile component, then download Media for Mobile samples from GitHub repository https://github.com/INDExOS/media-for-mobile

For additional assistance, visit the Intel INDE forum.

Building Samples in Eclipse

 

1. In Eclipse go to File->New->Project.

2. In the appeared dialog select General->Android Project from Existing Code and click Next.

3. Another dialog appears, click Browse and select the Intel INDE Media for Mobile installation folder (further referred to as installation_folder). Click OK and then Finish.

4. You’ll see two projects in Package Explorer. If you have Build Automatically option checked under Project menu (e.g. checked by default in Eclipse IDE from ADT Bundle) you’ll see lots of build errors in Problems window. Let’s fix that.

5. The sample application (SamplesMainActivity project) depends on *.jar libraries from <install-folder>\libs folder and on native libraries from <install-folder>\libs\armeabi and <install-folder>\libs\x86 folders. To import these libraries into the project, right click on the SamplesMainActivity project and select Import.

6. In the appeared dialog select General->File System, open the Media for Mobile installation folder, select “libs” folder and click Finish:

7. Now let’s set up properties for the effects project. Right click on the project and select Properties in the bottom of the list. In the appeared dialog first select Android in the left pane and tick "Is Library": 

8. Then select Java Build Path and go to Libraries tab. Click Add JARs and select android-<version>.jar and domain-<version>.jar from SamplesMainActivity/libs folder, click OK and OK again on the Properties for effects dialog.

9. Now let’s get back to the SamplesMainActivity project and set the dependency on the “effects” library. Rightclick on the project and select Properties. In the appeared dialog select Android and click Add to add effects project as a reference. 

10. Then select Java Build Path, go to Projects tab and click Add to add effects project as a required project on the build path:

11. Click OK and see that now both effects and SamplesMainActivity projects were successfully built! (Warnings are not a problem)

 

Building Samples in Android Studio*

 

1. Run the Android Studio*, choose File->Import Project. Select the Intel® INDE Media for Mobile installation folder in the project import dialog:

2. Click OK, choose “Create project from existing sources”, click Next. Enter the project name and click Next.

3. Uncheck <install-folder>\src\android\java project on the Import Project dialog (it is the reference code for graphics base classes) and click Next:

4. Leave default settings and click Next on remaining four dialogs and then click Finish.

5. Then press F4 to open project settings menu, select Modules in the left menu, open effects\Android project and tick “Library module” check box:

6. Since the sample application depends on native libraries from <install-folder>\libs folder, you should copy <install-folder>\libs\armeabi and <install-folder>\libs\x86 subfolders to <install-folder>\samples\apps\libs folder, here is a screenshot with required folders structure:

6. Now you can build the apps project, install the resulted apps.apk file from <install-folder>\out\production\apps folder to your Android device and run the sample application.


Viewing all articles
Browse latest Browse all 3384

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>