SlideShare ist ein Scribd-Unternehmen logo
1 von 11
Aviary Feather Android
     Setup Guide
Aviary Inc.




   1. Introduction
                                  2

       1.1 Prerequisites 
                           2

   2. Workspace setup
                               2

       2.1 Import Project
                           2

       2.2 Set Up Import
                            3

       2.3 Select the File
                          3

   3. Sample Application
                            4

   4. Include AviaryFeather in a new Application
    5

       4.1 Create a new Android project
             5

       4.2 Project references 
                      5

       4.3 AndroidManifest.xml
                      7

              4.3.1 Permissions
                     7

              4.3.2 Activity declaration
            7

       4.4 themes.xml
                               7

   5. Invoke Feather
                                8

       5.1 Intent parameters 
                       9

       5.2 Result parameters
                        9

   Extras
                                          10

       6.1 Stickers 
                               10

       6.2 Other configurations 
                    10

       6.3 UI Customization
                        10




                                                     1
Aviary Inc.

1. Introduction
This document will guide you through the creation of a sample application using the AviaryFeather Android library.

1.1 Prerequisites
I assume you already have the Android environment installed on your system and Eclipse with the required ADT plugin.
See http://developer.android.com/sdk/installing.html and http://developer.android.com/sdk/eclipse-adt.html if you need
instructions on how to setup the Android environment.

You will also need an Aviary API key/secret pair to access the remove effect API. To sign up or learn more, please visit http://
developers.aviary.com/geteffectskey.




2. Workspace setup
First, we’ll need to import the 2 Eclipse projects into our workspace.

2.1 Import Project
Open Eclipse and select “Import” from the file menu.




                                                                                                                               2
Aviary Inc.

2.2 Set Up Import
The import dialog will appear. From the list of import
options, select “Existing Projects into Workspace,” and
then click “Next.”




2.3 Select the File
In the new dialog, click on the “Select archive file” radio
button and then click the “Browse” button on the right.
From here, select the aviaryfeather.zip file included
with this document.

Click on the “Finish” button at the bottom of the dialog.
A new Android library project called “AviaryFeather” will
be created in your current workspace.

This is the required library project which you must
include in your application if you want to use Feather to
manipulate images.




                                                             3
Aviary Inc.

3. Sample Application
Next, we need to create an Android application in order to use Feather.

You can see a real example of how to use Feather by opening the included sample-app.zip project.

Just import the sample application by following the same procedures described above, but select sample-app.zip at step
3. A new project called “AviaryLauncher” will be created in your workspace.

The imported application should have all the references already set and it should be ready to use. If you want to include
AviaryFeather in a different Android project or add it to a new one, follow the instructions in step 4; otherwise you can skip to
step 5.




                                                                                                                                4
Aviary Inc.

4. Include AviaryFeather in a new Application
If you don’t want to use the included sample application to test Feather, here’s a step by step guide on how to include
Feather in a new Android application.

4.1 Create a new Android project
Just create a new Android project as usual from Eclipse.




4.2 Project references
Once the new project has been created, open
the project properties and navigate to the
“Android” section.




                                                                                                                          5
Aviary Inc.

Click the “Add...” button of the “Library” subsection
and select “AviaryFeather” from the dialog.




Next, navigate to the “Java Build Path” section of
the project properties dialog and click on “Add
JARs...” button of the “Libraries” subsection.




From here, select all the .jar files included in the
“libs” folder of the AviaryFeather project
(aviaryfx.jar, imagezoom.jar and
featherlibrary.jar).




                                                        6
Aviary Inc.




4.3 AndroidManifest.xml
Add some entries to the manifest file of your application.

4.3.1 Permissions
AviaryFeather requires both internet access and write access to external storage. To grant those permissions, add these
entries inside the AndroidManifest.xml <manifest> tag:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />


4.3.2 Activity declaration
Then, inside the <application> tag, add a reference to the FeatherActivity:

<activity android:name="com.aviary.android.feather.FeatherActivity"
	      android:theme="@style/FeatherTheme.Custom"
	      android:configChanges="orientation|keyboardHidden"
	      android:screenOrientation="portrait" />




4.4 themes.xml
The android:theme entry in the manifest file is also required for Feather to work properly, so add an entry to your
themes.xml file (if you don’t have one, create a new file called themes.xml in your res/values folder):

<?xml version="1.0" encoding="utf-8"?>
<resources>
	      <style name="FeatherTheme.Custom" parent="FeatherTheme.Dark" />
</resources>

By default, this entry will use the default Feather theme.

If you’d like to customize the Feather UI, you can do that simply by adding entries to your “Feather.Custom” style. Check out
the themes.xml file included in AviaryFeather/res/values for the list of available keys.




                                                                                                                            7
Aviary Inc.

5. Invoke Feather
If you’re calling Feather from a new application, you’ll need to add the below code in order to start Feather. Otherwise (if
you’re using the demo application) you can find this code inside the MainActivity.java file.

In order to invoke Feather from your activity, you need to pass some parameters to the FeatherActivity. Here’s an example of
how to invoke the new activity:

// Create the intent needed to start feather
Intent newIntent = new Intent( this, FeatherActivity.class );

// set the source image uri
newIntent.setData( uri );

// pass the required api key/secret ( http://developers.aviary.com/geteffectskey )
newIntent.putExtra( "API_KEY", “xxx” );
newIntent.putExtra( "API_SECRET", “xxx” );

// pass the uri of the destination image file (optional)
// This will be the same uri you will receive in the onActivityResult
newIntent.putExtra( “output”, Uri.parse( "file://" + 	
                                                     mOutputFile.getAbsolutePath() ) );

// format of the destination image (optional)
newIntent.putExtra( “output-format”, Bitmap.CompressFormat.JPEG.name() );

// output format quality (optional)
newIntent.putExtra( “output-quality”, 85 );

// you can force feather to display only a certain tools
// newIntent.putExtra( "tools-list", new String[]{"SHARPEN", "BRIGHTNESS" } );

// ..and start feather
startActivityForResult( newIntent, ACTION_REQUEST_FEATHER );




                                                                                                                               8
Aviary Inc.




5.1 Intent parameters
Here’s a description of the required parameters:



Uri ( intent data )                  This is the source uri of the image to be used as input by Feather
API_KEY/API_SECRET                   api key and secret required to use remote filters. Go to http://developers.aviary.com/
                                     geteffectskey for more information on how to obtain your api key and secret
output                               This is the uri of the destination file where Feather will write the result image
output-format                        Format of the output file ( jpg or png )
output-quality                       Quality of the output image ( required only if output-format is jpeg ). 0 to 100
tools-list                           If specified in the extras of the passed intent it will tell feather to display only certain
                                     tools. The value must be a String[] array and the available values are:

                                     SHARPEN, BRIGHTNESS, CONTRAST, SATURATION, ROTATE, FLIP, BLUR,
                                     EFFECTS, COLORS, RED_EYE, CROP, WHITEN, DRAWING, STICKERS


                      Note: If you’re using our sample application, you only need to replace the api_key and
                      api_secret constants inside the MainActivity.java file:

                      private static final String API_KEY = "xxxx";
                      private static final String API_SECRET = "xxxx";




5.2 Result parameters
Once the user clicks “save” in the Feather activity, the “onActivityResult” of your Activity will be invoked, passing back
“ACTION_REQUEST_FEATHER” as requestCode.

The Uri data of the returned intent will be the output path of the result image:

@Override
public void onActivityResult( int requestCode, int resultCode, Intent data ) {
	      if( resultCode == RESULT_OK ) {
	      	      switch( requestCode ) {
	      	      	      case ACTION_REQUEST_FEATHER:
	      	      	      	      Uri mImageUri = data.getData();
	      	      	      	      break;
	      	      }
	      }
}




                                                                                                                                   9
Aviary Inc.

6. Extras

6.1 Stickers

Feather uses the “assets/stickers” folder of your application as input for the
stickers tool, so your application must include the list of sticker files inside
that folder. (The AviaryLauncher sample application already has a bunch of
images inside its assets/stickers folder by default.)

Note: If your application does not have the above folder or if that folder is
empty, the stickers tool will be automatically hidden in Feather.




6.2 Other configurations
Inside the AviaryFeather/res/values is a config.xml file. This file contains some application default values and can be
modified before compilation.




6.3 UI Customization
Feather comes with the default FeatherTheme.Dark theme, the one you need to extends from your themes.xml file ( see
section 4.4 ). You can modify almost every part of the UI by overriding the values of FeatherTheme.Dark into your theme.
Here some examples.
Open your res/values/themes.xml file which should be like this:

<?xml version="1.0" encoding="utf-8"?>
<resources>
	      <style name="FeatherTheme.Custom" parent="FeatherTheme.Dark"></style>
</resources>



Now let’s say we want to change the top bar and bottom bar default font family. To do this just place a ttf font file into your
“assets/fonts” directory ( for instance “helvetica.ttf”) and add these lines inside the <style></style> tag of your themes.xml
file:

<item name="toolbarFont">fonts/Helvetica.ttf</item>
<item name="bottombarFont">fonts/Helvetica.ttf</item>

Or let’s say you want to change the default toolbar background. Just add this line:

<item name="toolbarBackground">#FFCCCCCC</item>



For a complete list of customizables, just open AviaryFeather/res/values/themes.xml and see what’s inside the main <style>
tag




                                                                                                                                 10

Weitere ähnliche Inhalte

Was ist angesagt?

Full Angular 7 Firebase Authentication System
Full Angular 7 Firebase Authentication SystemFull Angular 7 Firebase Authentication System
Full Angular 7 Firebase Authentication SystemDigamber Singh
 
Building an app with Google's new suites
Building an app with Google's new suitesBuilding an app with Google's new suites
Building an app with Google's new suitesToru Wonyoung Choi
 
Android appwidget
Android appwidgetAndroid appwidget
Android appwidgetKrazy Koder
 
Jetpack, with new features in 2021 GDG Georgetown IO Extended
Jetpack, with new features in 2021 GDG Georgetown IO ExtendedJetpack, with new features in 2021 GDG Georgetown IO Extended
Jetpack, with new features in 2021 GDG Georgetown IO ExtendedToru Wonyoung Choi
 
Spring IOC advantages and developing spring application sample
Spring IOC advantages and developing spring application sample Spring IOC advantages and developing spring application sample
Spring IOC advantages and developing spring application sample Sunil kumar Mohanty
 
Training Session 2 - Day 2
Training Session 2 - Day 2Training Session 2 - Day 2
Training Session 2 - Day 2Vivek Bhusal
 
Introduction to Android Wear
Introduction to Android WearIntroduction to Android Wear
Introduction to Android WearPeter Friese
 
Building maintainable app #droidconzg
Building maintainable app #droidconzgBuilding maintainable app #droidconzg
Building maintainable app #droidconzgKristijan Jurković
 
Django tutorial
Django tutorialDjango tutorial
Django tutorialKsd Che
 
01 04 - android set up and creating an android project
01  04 - android set up and creating an android project01  04 - android set up and creating an android project
01 04 - android set up and creating an android projectSiva Kumar reddy Vasipally
 
Sharper Better Faster Dagger ‡ - Droidcon SF
Sharper Better Faster Dagger ‡ - Droidcon SFSharper Better Faster Dagger ‡ - Droidcon SF
Sharper Better Faster Dagger ‡ - Droidcon SFPierre-Yves Ricau
 
Build UI of the Future with React 360
Build UI of the Future with React 360Build UI of the Future with React 360
Build UI of the Future with React 360RapidValue
 

Was ist angesagt? (20)

You don't need DI
You don't need DIYou don't need DI
You don't need DI
 
Angular2 + rxjs
Angular2 + rxjsAngular2 + rxjs
Angular2 + rxjs
 
Full Angular 7 Firebase Authentication System
Full Angular 7 Firebase Authentication SystemFull Angular 7 Firebase Authentication System
Full Angular 7 Firebase Authentication System
 
Building an app with Google's new suites
Building an app with Google's new suitesBuilding an app with Google's new suites
Building an app with Google's new suites
 
Android appwidget
Android appwidgetAndroid appwidget
Android appwidget
 
Android Widget
Android WidgetAndroid Widget
Android Widget
 
Angular modules in depth
Angular modules in depthAngular modules in depth
Angular modules in depth
 
Jetpack, with new features in 2021 GDG Georgetown IO Extended
Jetpack, with new features in 2021 GDG Georgetown IO ExtendedJetpack, with new features in 2021 GDG Georgetown IO Extended
Jetpack, with new features in 2021 GDG Georgetown IO Extended
 
Spring IOC advantages and developing spring application sample
Spring IOC advantages and developing spring application sample Spring IOC advantages and developing spring application sample
Spring IOC advantages and developing spring application sample
 
Angular Workshop_Sarajevo2
Angular Workshop_Sarajevo2Angular Workshop_Sarajevo2
Angular Workshop_Sarajevo2
 
Training Session 2 - Day 2
Training Session 2 - Day 2Training Session 2 - Day 2
Training Session 2 - Day 2
 
Introduction to Android Wear
Introduction to Android WearIntroduction to Android Wear
Introduction to Android Wear
 
IoC with PHP
IoC with PHPIoC with PHP
IoC with PHP
 
Building maintainable app #droidconzg
Building maintainable app #droidconzgBuilding maintainable app #droidconzg
Building maintainable app #droidconzg
 
Django tutorial
Django tutorialDjango tutorial
Django tutorial
 
01 04 - android set up and creating an android project
01  04 - android set up and creating an android project01  04 - android set up and creating an android project
01 04 - android set up and creating an android project
 
Extend sdk
Extend sdkExtend sdk
Extend sdk
 
Session 2- day 3
Session 2- day 3Session 2- day 3
Session 2- day 3
 
Sharper Better Faster Dagger ‡ - Droidcon SF
Sharper Better Faster Dagger ‡ - Droidcon SFSharper Better Faster Dagger ‡ - Droidcon SF
Sharper Better Faster Dagger ‡ - Droidcon SF
 
Build UI of the Future with React 360
Build UI of the Future with React 360Build UI of the Future with React 360
Build UI of the Future with React 360
 

Andere mochten auch

Gestão da qualidade para o meio ambiente
Gestão da qualidade para o meio ambienteGestão da qualidade para o meio ambiente
Gestão da qualidade para o meio ambienteVerbo Educacional
 
CAPA E LAYOUT CARLOS FERREIRA COSTA_MESTRADO_ 2009
CAPA E LAYOUT CARLOS FERREIRA COSTA_MESTRADO_ 2009CAPA E LAYOUT CARLOS FERREIRA COSTA_MESTRADO_ 2009
CAPA E LAYOUT CARLOS FERREIRA COSTA_MESTRADO_ 2009Carlos Ferreira da Costa
 
Organos de gobiernos .
Organos de gobiernos .Organos de gobiernos .
Organos de gobiernos .lorenafuenur
 
MajestadePropaganda - Papelaria2014
MajestadePropaganda - Papelaria2014 MajestadePropaganda - Papelaria2014
MajestadePropaganda - Papelaria2014 MajestadePropaganda
 
Santander Bank USA Social Media Analysis Q4 2015
Santander Bank USA Social Media Analysis Q4 2015Santander Bank USA Social Media Analysis Q4 2015
Santander Bank USA Social Media Analysis Q4 2015Unmetric
 
Capacitarán a empresarios cusqueños
Capacitarán a empresarios cusqueños Capacitarán a empresarios cusqueños
Capacitarán a empresarios cusqueños Perú 2021
 
Pundi Amal Pemuda Indonesia Best Practice as Integrated Methodology for Susta...
Pundi Amal Pemuda Indonesia Best Practice as Integrated Methodology for Susta...Pundi Amal Pemuda Indonesia Best Practice as Integrated Methodology for Susta...
Pundi Amal Pemuda Indonesia Best Practice as Integrated Methodology for Susta...Diyan Wahyu Pradana
 
ΜΕΣΟΛΟΓΓΙ: Η ΜΕΓΑΛΗ ΕΞΟΔΟΣ
ΜΕΣΟΛΟΓΓΙ: Η ΜΕΓΑΛΗ ΕΞΟΔΟΣΜΕΣΟΛΟΓΓΙ: Η ΜΕΓΑΛΗ ΕΞΟΔΟΣ
ΜΕΣΟΛΟΓΓΙ: Η ΜΕΓΑΛΗ ΕΞΟΔΟΣeirkara
 
Παγκόσμια Ημέρα Παιδικού Βιβλίου 2016
Παγκόσμια Ημέρα Παιδικού Βιβλίου 2016Παγκόσμια Ημέρα Παιδικού Βιβλίου 2016
Παγκόσμια Ημέρα Παιδικού Βιβλίου 2016Νατάσα Ζωγάνα
 
Pilot study in social sciences
Pilot study in social sciencesPilot study in social sciences
Pilot study in social sciencesSarang Bhola
 
Portafolio de geografia 2017
Portafolio de geografia  2017Portafolio de geografia  2017
Portafolio de geografia 2017Grandes Ideas
 

Andere mochten auch (20)

F b
F bF b
F b
 
Gestão da qualidade para o meio ambiente
Gestão da qualidade para o meio ambienteGestão da qualidade para o meio ambiente
Gestão da qualidade para o meio ambiente
 
CAPA E LAYOUT CARLOS FERREIRA COSTA_MESTRADO_ 2009
CAPA E LAYOUT CARLOS FERREIRA COSTA_MESTRADO_ 2009CAPA E LAYOUT CARLOS FERREIRA COSTA_MESTRADO_ 2009
CAPA E LAYOUT CARLOS FERREIRA COSTA_MESTRADO_ 2009
 
Organos de gobiernos .
Organos de gobiernos .Organos de gobiernos .
Organos de gobiernos .
 
MajestadePropaganda - Papelaria2014
MajestadePropaganda - Papelaria2014 MajestadePropaganda - Papelaria2014
MajestadePropaganda - Papelaria2014
 
Task manager
Task managerTask manager
Task manager
 
Santander Bank USA Social Media Analysis Q4 2015
Santander Bank USA Social Media Analysis Q4 2015Santander Bank USA Social Media Analysis Q4 2015
Santander Bank USA Social Media Analysis Q4 2015
 
Capacitarán a empresarios cusqueños
Capacitarán a empresarios cusqueños Capacitarán a empresarios cusqueños
Capacitarán a empresarios cusqueños
 
Test
TestTest
Test
 
Marisol chocho
Marisol chochoMarisol chocho
Marisol chocho
 
10794769
1079476910794769
10794769
 
Legal Cert
Legal CertLegal Cert
Legal Cert
 
Classifica final day
Classifica final dayClassifica final day
Classifica final day
 
Site Superisor Course
Site Superisor CourseSite Superisor Course
Site Superisor Course
 
Pundi Amal Pemuda Indonesia Best Practice as Integrated Methodology for Susta...
Pundi Amal Pemuda Indonesia Best Practice as Integrated Methodology for Susta...Pundi Amal Pemuda Indonesia Best Practice as Integrated Methodology for Susta...
Pundi Amal Pemuda Indonesia Best Practice as Integrated Methodology for Susta...
 
ΜΕΣΟΛΟΓΓΙ: Η ΜΕΓΑΛΗ ΕΞΟΔΟΣ
ΜΕΣΟΛΟΓΓΙ: Η ΜΕΓΑΛΗ ΕΞΟΔΟΣΜΕΣΟΛΟΓΓΙ: Η ΜΕΓΑΛΗ ΕΞΟΔΟΣ
ΜΕΣΟΛΟΓΓΙ: Η ΜΕΓΑΛΗ ΕΞΟΔΟΣ
 
Παγκόσμια Ημέρα Παιδικού Βιβλίου 2016
Παγκόσμια Ημέρα Παιδικού Βιβλίου 2016Παγκόσμια Ημέρα Παιδικού Βιβλίου 2016
Παγκόσμια Ημέρα Παιδικού Βιβλίου 2016
 
Pilot study in social sciences
Pilot study in social sciencesPilot study in social sciences
Pilot study in social sciences
 
Portafolio de geografia 2017
Portafolio de geografia  2017Portafolio de geografia  2017
Portafolio de geografia 2017
 
Enfermagem do trabalho
Enfermagem do trabalhoEnfermagem do trabalho
Enfermagem do trabalho
 

Ähnlich wie Androidreadme

Getting started with appium
Getting started with appiumGetting started with appium
Getting started with appiumPratik Patel
 
Android architecture
Android architecture Android architecture
Android architecture Trong-An Bui
 
Flutter movie apps tutor
Flutter movie apps tutorFlutter movie apps tutor
Flutter movie apps tutorHerry Prasetyo
 
JMP103 : Extending Your App Arsenal With OpenSocial
JMP103 : Extending Your App Arsenal With OpenSocialJMP103 : Extending Your App Arsenal With OpenSocial
JMP103 : Extending Your App Arsenal With OpenSocialRyan Baxter
 
IBM Connect 2014 - JMP103: Extending Your Application Arsenal With OpenSocial
IBM Connect 2014 - JMP103: Extending Your Application Arsenal With OpenSocialIBM Connect 2014 - JMP103: Extending Your Application Arsenal With OpenSocial
IBM Connect 2014 - JMP103: Extending Your Application Arsenal With OpenSocialIBM Connections Developers
 
Advanced Malware Analysis Training Session 5 - Reversing Automation
Advanced Malware Analysis Training Session 5 - Reversing AutomationAdvanced Malware Analysis Training Session 5 - Reversing Automation
Advanced Malware Analysis Training Session 5 - Reversing Automationsecurityxploded
 
Advanced malware analysis training session5 reversing automation
Advanced malware analysis training session5 reversing automationAdvanced malware analysis training session5 reversing automation
Advanced malware analysis training session5 reversing automationCysinfo Cyber Security Community
 
Uploading files using selenium web driver
Uploading files using selenium web driverUploading files using selenium web driver
Uploading files using selenium web driverPankaj Biswas
 
XCode Templates tutorial – How To Create Custom Template Step By Step.pdf
XCode Templates tutorial – How To Create Custom Template Step By Step.pdfXCode Templates tutorial – How To Create Custom Template Step By Step.pdf
XCode Templates tutorial – How To Create Custom Template Step By Step.pdfSatawareTechnologies6
 
Hacking the Codename One Source Code - Part IV - Transcript.pdf
Hacking the Codename One Source Code - Part IV - Transcript.pdfHacking the Codename One Source Code - Part IV - Transcript.pdf
Hacking the Codename One Source Code - Part IV - Transcript.pdfShaiAlmog1
 
Developer Student Clubs NUK - Flutter for Beginners
Developer Student Clubs NUK - Flutter for BeginnersDeveloper Student Clubs NUK - Flutter for Beginners
Developer Student Clubs NUK - Flutter for BeginnersJiaxuan Lin
 
Salesforce meetup | Lightning Web Component
Salesforce meetup | Lightning Web ComponentSalesforce meetup | Lightning Web Component
Salesforce meetup | Lightning Web ComponentAccenture Hungary
 
Ane for 9ria_cn
Ane for 9ria_cnAne for 9ria_cn
Ane for 9ria_cnsonicxs
 
Write your first WordPress plugin
Write your first WordPress pluginWrite your first WordPress plugin
Write your first WordPress pluginAnthony Montalbano
 
-Kotlin_Camp_Unit2.pptx
-Kotlin_Camp_Unit2.pptx-Kotlin_Camp_Unit2.pptx
-Kotlin_Camp_Unit2.pptxRishiGandhi19
 

Ähnlich wie Androidreadme (20)

Getting started with appium
Getting started with appiumGetting started with appium
Getting started with appium
 
Introduction to Google App Engine
Introduction to Google App EngineIntroduction to Google App Engine
Introduction to Google App Engine
 
Android architecture
Android architecture Android architecture
Android architecture
 
Cloud Messaging Flutter
Cloud Messaging FlutterCloud Messaging Flutter
Cloud Messaging Flutter
 
Flutter movie apps tutor
Flutter movie apps tutorFlutter movie apps tutor
Flutter movie apps tutor
 
JMP103 : Extending Your App Arsenal With OpenSocial
JMP103 : Extending Your App Arsenal With OpenSocialJMP103 : Extending Your App Arsenal With OpenSocial
JMP103 : Extending Your App Arsenal With OpenSocial
 
IBM Connect 2014 - JMP103: Extending Your Application Arsenal With OpenSocial
IBM Connect 2014 - JMP103: Extending Your Application Arsenal With OpenSocialIBM Connect 2014 - JMP103: Extending Your Application Arsenal With OpenSocial
IBM Connect 2014 - JMP103: Extending Your Application Arsenal With OpenSocial
 
Android - Api & Debugging in Android
Android - Api & Debugging in AndroidAndroid - Api & Debugging in Android
Android - Api & Debugging in Android
 
Advanced Malware Analysis Training Session 5 - Reversing Automation
Advanced Malware Analysis Training Session 5 - Reversing AutomationAdvanced Malware Analysis Training Session 5 - Reversing Automation
Advanced Malware Analysis Training Session 5 - Reversing Automation
 
Advanced malware analysis training session5 reversing automation
Advanced malware analysis training session5 reversing automationAdvanced malware analysis training session5 reversing automation
Advanced malware analysis training session5 reversing automation
 
Uploading files using selenium web driver
Uploading files using selenium web driverUploading files using selenium web driver
Uploading files using selenium web driver
 
Browser_Stack_Intro
Browser_Stack_IntroBrowser_Stack_Intro
Browser_Stack_Intro
 
XCode Templates tutorial – How To Create Custom Template Step By Step.pdf
XCode Templates tutorial – How To Create Custom Template Step By Step.pdfXCode Templates tutorial – How To Create Custom Template Step By Step.pdf
XCode Templates tutorial – How To Create Custom Template Step By Step.pdf
 
Hacking the Codename One Source Code - Part IV - Transcript.pdf
Hacking the Codename One Source Code - Part IV - Transcript.pdfHacking the Codename One Source Code - Part IV - Transcript.pdf
Hacking the Codename One Source Code - Part IV - Transcript.pdf
 
Developer Student Clubs NUK - Flutter for Beginners
Developer Student Clubs NUK - Flutter for BeginnersDeveloper Student Clubs NUK - Flutter for Beginners
Developer Student Clubs NUK - Flutter for Beginners
 
Appium solution
Appium solutionAppium solution
Appium solution
 
Salesforce meetup | Lightning Web Component
Salesforce meetup | Lightning Web ComponentSalesforce meetup | Lightning Web Component
Salesforce meetup | Lightning Web Component
 
Ane for 9ria_cn
Ane for 9ria_cnAne for 9ria_cn
Ane for 9ria_cn
 
Write your first WordPress plugin
Write your first WordPress pluginWrite your first WordPress plugin
Write your first WordPress plugin
 
-Kotlin_Camp_Unit2.pptx
-Kotlin_Camp_Unit2.pptx-Kotlin_Camp_Unit2.pptx
-Kotlin_Camp_Unit2.pptx
 

Kürzlich hochgeladen

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 

Kürzlich hochgeladen (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

Androidreadme

  • 2. Aviary Inc. 1. Introduction 2 1.1 Prerequisites 2 2. Workspace setup 2 2.1 Import Project 2 2.2 Set Up Import 3 2.3 Select the File 3 3. Sample Application 4 4. Include AviaryFeather in a new Application 5 4.1 Create a new Android project 5 4.2 Project references 5 4.3 AndroidManifest.xml 7 4.3.1 Permissions 7 4.3.2 Activity declaration 7 4.4 themes.xml 7 5. Invoke Feather 8 5.1 Intent parameters 9 5.2 Result parameters 9 Extras 10 6.1 Stickers 10 6.2 Other configurations 10 6.3 UI Customization 10 1
  • 3. Aviary Inc. 1. Introduction This document will guide you through the creation of a sample application using the AviaryFeather Android library. 1.1 Prerequisites I assume you already have the Android environment installed on your system and Eclipse with the required ADT plugin. See http://developer.android.com/sdk/installing.html and http://developer.android.com/sdk/eclipse-adt.html if you need instructions on how to setup the Android environment. You will also need an Aviary API key/secret pair to access the remove effect API. To sign up or learn more, please visit http:// developers.aviary.com/geteffectskey. 2. Workspace setup First, we’ll need to import the 2 Eclipse projects into our workspace. 2.1 Import Project Open Eclipse and select “Import” from the file menu. 2
  • 4. Aviary Inc. 2.2 Set Up Import The import dialog will appear. From the list of import options, select “Existing Projects into Workspace,” and then click “Next.” 2.3 Select the File In the new dialog, click on the “Select archive file” radio button and then click the “Browse” button on the right. From here, select the aviaryfeather.zip file included with this document. Click on the “Finish” button at the bottom of the dialog. A new Android library project called “AviaryFeather” will be created in your current workspace. This is the required library project which you must include in your application if you want to use Feather to manipulate images. 3
  • 5. Aviary Inc. 3. Sample Application Next, we need to create an Android application in order to use Feather. You can see a real example of how to use Feather by opening the included sample-app.zip project. Just import the sample application by following the same procedures described above, but select sample-app.zip at step 3. A new project called “AviaryLauncher” will be created in your workspace. The imported application should have all the references already set and it should be ready to use. If you want to include AviaryFeather in a different Android project or add it to a new one, follow the instructions in step 4; otherwise you can skip to step 5. 4
  • 6. Aviary Inc. 4. Include AviaryFeather in a new Application If you don’t want to use the included sample application to test Feather, here’s a step by step guide on how to include Feather in a new Android application. 4.1 Create a new Android project Just create a new Android project as usual from Eclipse. 4.2 Project references Once the new project has been created, open the project properties and navigate to the “Android” section. 5
  • 7. Aviary Inc. Click the “Add...” button of the “Library” subsection and select “AviaryFeather” from the dialog. Next, navigate to the “Java Build Path” section of the project properties dialog and click on “Add JARs...” button of the “Libraries” subsection. From here, select all the .jar files included in the “libs” folder of the AviaryFeather project (aviaryfx.jar, imagezoom.jar and featherlibrary.jar). 6
  • 8. Aviary Inc. 4.3 AndroidManifest.xml Add some entries to the manifest file of your application. 4.3.1 Permissions AviaryFeather requires both internet access and write access to external storage. To grant those permissions, add these entries inside the AndroidManifest.xml <manifest> tag: <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> 4.3.2 Activity declaration Then, inside the <application> tag, add a reference to the FeatherActivity: <activity android:name="com.aviary.android.feather.FeatherActivity" android:theme="@style/FeatherTheme.Custom" android:configChanges="orientation|keyboardHidden" android:screenOrientation="portrait" /> 4.4 themes.xml The android:theme entry in the manifest file is also required for Feather to work properly, so add an entry to your themes.xml file (if you don’t have one, create a new file called themes.xml in your res/values folder): <?xml version="1.0" encoding="utf-8"?> <resources> <style name="FeatherTheme.Custom" parent="FeatherTheme.Dark" /> </resources> By default, this entry will use the default Feather theme. If you’d like to customize the Feather UI, you can do that simply by adding entries to your “Feather.Custom” style. Check out the themes.xml file included in AviaryFeather/res/values for the list of available keys. 7
  • 9. Aviary Inc. 5. Invoke Feather If you’re calling Feather from a new application, you’ll need to add the below code in order to start Feather. Otherwise (if you’re using the demo application) you can find this code inside the MainActivity.java file. In order to invoke Feather from your activity, you need to pass some parameters to the FeatherActivity. Here’s an example of how to invoke the new activity: // Create the intent needed to start feather Intent newIntent = new Intent( this, FeatherActivity.class ); // set the source image uri newIntent.setData( uri ); // pass the required api key/secret ( http://developers.aviary.com/geteffectskey ) newIntent.putExtra( "API_KEY", “xxx” ); newIntent.putExtra( "API_SECRET", “xxx” ); // pass the uri of the destination image file (optional) // This will be the same uri you will receive in the onActivityResult newIntent.putExtra( “output”, Uri.parse( "file://" + mOutputFile.getAbsolutePath() ) ); // format of the destination image (optional) newIntent.putExtra( “output-format”, Bitmap.CompressFormat.JPEG.name() ); // output format quality (optional) newIntent.putExtra( “output-quality”, 85 ); // you can force feather to display only a certain tools // newIntent.putExtra( "tools-list", new String[]{"SHARPEN", "BRIGHTNESS" } ); // ..and start feather startActivityForResult( newIntent, ACTION_REQUEST_FEATHER ); 8
  • 10. Aviary Inc. 5.1 Intent parameters Here’s a description of the required parameters: Uri ( intent data ) This is the source uri of the image to be used as input by Feather API_KEY/API_SECRET api key and secret required to use remote filters. Go to http://developers.aviary.com/ geteffectskey for more information on how to obtain your api key and secret output This is the uri of the destination file where Feather will write the result image output-format Format of the output file ( jpg or png ) output-quality Quality of the output image ( required only if output-format is jpeg ). 0 to 100 tools-list If specified in the extras of the passed intent it will tell feather to display only certain tools. The value must be a String[] array and the available values are: SHARPEN, BRIGHTNESS, CONTRAST, SATURATION, ROTATE, FLIP, BLUR, EFFECTS, COLORS, RED_EYE, CROP, WHITEN, DRAWING, STICKERS Note: If you’re using our sample application, you only need to replace the api_key and api_secret constants inside the MainActivity.java file: private static final String API_KEY = "xxxx"; private static final String API_SECRET = "xxxx"; 5.2 Result parameters Once the user clicks “save” in the Feather activity, the “onActivityResult” of your Activity will be invoked, passing back “ACTION_REQUEST_FEATHER” as requestCode. The Uri data of the returned intent will be the output path of the result image: @Override public void onActivityResult( int requestCode, int resultCode, Intent data ) { if( resultCode == RESULT_OK ) { switch( requestCode ) { case ACTION_REQUEST_FEATHER: Uri mImageUri = data.getData(); break; } } } 9
  • 11. Aviary Inc. 6. Extras 6.1 Stickers Feather uses the “assets/stickers” folder of your application as input for the stickers tool, so your application must include the list of sticker files inside that folder. (The AviaryLauncher sample application already has a bunch of images inside its assets/stickers folder by default.) Note: If your application does not have the above folder or if that folder is empty, the stickers tool will be automatically hidden in Feather. 6.2 Other configurations Inside the AviaryFeather/res/values is a config.xml file. This file contains some application default values and can be modified before compilation. 6.3 UI Customization Feather comes with the default FeatherTheme.Dark theme, the one you need to extends from your themes.xml file ( see section 4.4 ). You can modify almost every part of the UI by overriding the values of FeatherTheme.Dark into your theme. Here some examples. Open your res/values/themes.xml file which should be like this: <?xml version="1.0" encoding="utf-8"?> <resources> <style name="FeatherTheme.Custom" parent="FeatherTheme.Dark"></style> </resources> Now let’s say we want to change the top bar and bottom bar default font family. To do this just place a ttf font file into your “assets/fonts” directory ( for instance “helvetica.ttf”) and add these lines inside the <style></style> tag of your themes.xml file: <item name="toolbarFont">fonts/Helvetica.ttf</item> <item name="bottombarFont">fonts/Helvetica.ttf</item> Or let’s say you want to change the default toolbar background. Just add this line: <item name="toolbarBackground">#FFCCCCCC</item> For a complete list of customizables, just open AviaryFeather/res/values/themes.xml and see what’s inside the main <style> tag 10