SlideShare a Scribd company logo
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

More Related Content

What's hot

You don't need DI
You don't need DIYou don't need DI
You don't need DI
Sebastian Świerczek
 
Angular2 + rxjs
Angular2 + rxjsAngular2 + rxjs
Angular2 + rxjs
Christoffer Noring
 
Full Angular 7 Firebase Authentication System
Full Angular 7 Firebase Authentication SystemFull Angular 7 Firebase Authentication System
Full Angular 7 Firebase Authentication System
Digamber 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 suites
Toru Wonyoung Choi
 
Android appwidget
Android appwidgetAndroid appwidget
Android appwidget
Krazy Koder
 
Android Widget
Android WidgetAndroid Widget
Android Widget
ELLURU Kalyan
 
Angular modules in depth
Angular modules in depthAngular modules in depth
Angular modules in depth
Christoffer Noring
 
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
Toru 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
 
Angular Workshop_Sarajevo2
Angular Workshop_Sarajevo2Angular Workshop_Sarajevo2
Angular Workshop_Sarajevo2
Christoffer Noring
 
Training Session 2 - Day 2
Training Session 2 - Day 2Training Session 2 - Day 2
Training Session 2 - Day 2
Vivek Bhusal
 
Introduction to Android Wear
Introduction to Android WearIntroduction to Android Wear
Introduction to Android Wear
Peter Friese
 
IoC with PHP
IoC with PHPIoC with PHP
IoC with PHP
Chris Weldon
 
Building maintainable app #droidconzg
Building maintainable app #droidconzgBuilding maintainable app #droidconzg
Building maintainable app #droidconzg
Kristijan Jurković
 
Django tutorial
Django tutorialDjango tutorial
Django tutorial
Ksd 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 project
Siva Kumar reddy Vasipally
 
Extend sdk
Extend sdkExtend sdk
Extend sdk
Harsha Nagaraj
 
Session 2- day 3
Session 2- day 3Session 2- day 3
Session 2- day 3
Vivek Bhusal
 
Sharper Better Faster Dagger ‡ - Droidcon SF
Sharper Better Faster Dagger ‡ - Droidcon SFSharper Better Faster Dagger ‡ - Droidcon SF
Sharper Better Faster Dagger ‡ - Droidcon SF
Pierre-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 360
RapidValue
 

What's hot (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
 

Viewers also liked

F b
F bF 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
Verbo 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_ 2009
Carlos 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 2015
Unmetric
 
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
 
Test
TestTest
Test
MCBE2C
 
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 sciences
Sarang Bhola
 
Portafolio de geografia 2017
Portafolio de geografia  2017Portafolio de geografia  2017
Portafolio de geografia 2017
Grandes Ideas
 
Enfermagem do trabalho
Enfermagem do trabalhoEnfermagem do trabalho
Enfermagem do trabalho
Verbo Educacional
 

Viewers also liked (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
 

Similar to Androidreadme

Getting started with appium
Getting started with appiumGetting started with appium
Getting started with appium
Pratik Patel
 
Introduction to Google App Engine
Introduction to Google App EngineIntroduction to Google App Engine
Introduction to Google App Engine
Kanda Runapongsa Saikaew
 
Android architecture
Android architecture Android architecture
Android architecture
Trong-An Bui
 
Cloud Messaging Flutter
Cloud Messaging FlutterCloud Messaging Flutter
Cloud Messaging Flutter
MuhammadAli408757
 
Flutter movie apps tutor
Flutter movie apps tutorFlutter movie apps tutor
Flutter movie apps tutor
Herry Prasetyo
 
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
IBM Connections Developers
 
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
Ryan Baxter
 
Android - Api & Debugging in Android
Android - Api & Debugging in AndroidAndroid - Api & Debugging in Android
Android - Api & Debugging in Android
Vibrant Technologies & Computers
 
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
securityxploded
 
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
Cysinfo 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 driver
Pankaj Biswas
 
Browser_Stack_Intro
Browser_Stack_IntroBrowser_Stack_Intro
Browser_Stack_Intro
Mithilesh Singh
 
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
SatawareTechnologies6
 
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
ShaiAlmog1
 
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
Jiaxuan Lin
 
Appium solution
Appium solutionAppium solution
Appium solution
Nael Abd Eljawad
 
Salesforce meetup | Lightning Web Component
Salesforce meetup | Lightning Web ComponentSalesforce meetup | Lightning Web Component
Salesforce meetup | Lightning Web Component
Accenture Hungary
 
Ane for 9ria_cn
Ane for 9ria_cnAne for 9ria_cn
Ane for 9ria_cn
sonicxs
 
Write your first WordPress plugin
Write your first WordPress pluginWrite your first WordPress plugin
Write your first WordPress plugin
Anthony Montalbano
 
-Kotlin_Camp_Unit2.pptx
-Kotlin_Camp_Unit2.pptx-Kotlin_Camp_Unit2.pptx
-Kotlin_Camp_Unit2.pptx
RishiGandhi19
 

Similar to 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
 
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
 
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
 
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
 

Recently uploaded

FREE A4 Cyber Security Awareness Posters-Social Engineering part 3
FREE A4 Cyber Security Awareness  Posters-Social Engineering part 3FREE A4 Cyber Security Awareness  Posters-Social Engineering part 3
FREE A4 Cyber Security Awareness Posters-Social Engineering part 3
Data Hops
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Neo4j
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
operationspcvita
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
Edge AI and Vision Alliance
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
Fwdays
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
ScyllaDB
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
DianaGray10
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Public CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptxPublic CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptx
marufrahmanstratejm
 

Recently uploaded (20)

FREE A4 Cyber Security Awareness Posters-Social Engineering part 3
FREE A4 Cyber Security Awareness  Posters-Social Engineering part 3FREE A4 Cyber Security Awareness  Posters-Social Engineering part 3
FREE A4 Cyber Security Awareness Posters-Social Engineering part 3
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Public CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptxPublic CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptx
 

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