SlideShare a Scribd company logo
Android for Flash
                (Lite) Developers
                                       Weyert de Boer




                            14 September 2009, FITC Mobile 2009, Toronto


Sunday, September 6, 2009
About Me
                            Weyert de Boer

                            Interaction Designer

                            Co-Author of books about Flash Lite and AIR

                            Flash Lite since Early 2005

                            Worked on Flash-based UIs for Motorola, T-
                            Mobile and Vodafone



Sunday, September 6, 2009
The Application
                    This session is about a Flash Lite application
                    converted earlier this year to Android. It’s a simple
                    application where you can get a list of articles and
                    photos near the current location using the GPS.

                    And my experience about the conversion process.




Sunday, September 6, 2009
The Application




Sunday, September 6, 2009
Live!



Sunday, September 6, 2009
Going Native? Why?


                            Why not wait until next month
                              for the Flash Player 10 ?




Sunday, September 6, 2009
The Good, the Bad
                              and The Ugly



Sunday, September 6, 2009
The Good
                            Developer oriented instead of designer

                            Flex-like ready-to-use components library (like buttons,
                            listviews, grids etc).

                            You can easily reuse your pngs/image assets of your Flash
                            Lite apps

                            Good on-device debugging support instead of Flash’s
                            black box

                            Better memory management compared to Flash

                            Easy access the hardware of the mobile device.


Sunday, September 6, 2009
The Bad
                             Compared to Flash the animation support is limited and
                            basically only supports code-based tweens and film roll
                            like frame-by-frame animations. No timeline!

                            Way of designing interfaces using layouts has a learning
                            curve

                            User interfaces are limited to 16-bit colours and use 565
                            dithering.

                            No real interface or layout designer comes with the SDK
                            only a limited viewer.



Sunday, September 6, 2009
The Ugly

                            A nasty bug in the Android 1.5 / Cupcake can
                            cause a lot of lost time. If you ever used
                            transparent colour (#00000000, rgba) in your
                            layout. Blacks (#000000) is not black any more,
                            you should use #000001.




Sunday, September 6, 2009
Android
                                 Fundamentals
                            AndroidManifest.xml

                            Activities

                            Intents

                            Broadcast receivers




Sunday, September 6, 2009
AndroidManifest.xml

                            AndroidManifest.xml describes the elements of
                            the Android application, which permissions are
                            needed? Which screens/activities does the
                            application have?




Sunday, September 6, 2009
Activities
                            An activity is a single, focused thing that the
                            user can do. Almost all activities interact with
                            the user, so the Activity class takes care of
                            creating a window for you in which you can
                            place your user interface.




Sunday, September 6, 2009
Intents
                            An intent describes what you would like to do.
                            For example, an intent can be that you want to
                            view a page in the browser or pick a person
                            from the address book. A specific interaction
                            moment.

                            Intents are the way to show the activity.




Sunday, September 6, 2009
Broadcast receivers

                            A way to receive events or notifications from the
                            Android system. This way your application can
                            be notified when the user is back, like when he
                            disabled the keyboard lock, or when a SMS
                            message has been received.




Sunday, September 6, 2009
Interfaces from the
                               Flasher’s Eye

                            Android’s version of the movieclip is the View or
                            ViewGroup (can contain children) and the building
                            blocks for UI components.

                            Views are responsible for drawing and handling
                            key events similar to the movieclips




Sunday, September 6, 2009
Designing interfaces
                            You can use a declarative xml format to define
                            your screens (so called layout xmls) or code up
                            yourself in Java (similar to Flex MXML)

                            Android comes with nice layout mechanism to
                            organize child views with.

                            You need to use the setContentView()-method to
                            load layouts defined in xml files into an
                            activity.


Sunday, September 6, 2009
Examples in the
                              Application



Sunday, September 6, 2009
Menu Screen

              ImageButton                 ImageView




Sunday, September 6, 2009
Photos Screen

                     GridView



                    PhotoItem layout




Sunday, September 6, 2009
PhotoItem in Flash




                            Frame Overlay   Photo   Background




Sunday, September 6, 2009
PhotoItem in Android




                     Background   Photo   Frame Overlay




Sunday, September 6, 2009
Warning!


                            Code snippets will be shown
                            now! Little timesavers for
                            starters


Sunday, September 6, 2009
Tips and Tricks


                            Timesavers, things every Flash Lite
                            developer wants to know when
                            starting with Android development.




Sunday, September 6, 2009
Android’s GetURL
                            As by most other things in Android you have to
                            use an intent. Opening a page in the default web
                            browser of the device.


                                Intent i = new Intent( Intent.ACTION_VIEW,
                                   Uri.parse("http://www.wikipedia.org") );
                                startActivity(i);




Sunday, September 6, 2009
Showing a different
                             screen or activity
                            Intent mainIntent = new Intent(MainMenu.this,
                                ArticlesScreen.class);
                            startActivity(mainIntent);




Sunday, September 6, 2009
Activity in fullscreen
                            Opening an activity window in fullscreen
                            without status bar and application title bar can
                            be hidden by code or by theme
                            XML

                              <activity android:style="@android:style/
                              Theme.NoTitleBar.FullScreen" />

                            Java Code
                             this.requestWindowFeature(Window.FEATURE_NO_TITLE);

                             getWindow().setFlags
                             WindowManager.LayoutParams.FLAG_FULLSCREEN,
                             WindowManager.LayoutParams.FLAG_FULLSCREEN);



Sunday, September 6, 2009
Disabling automatic
                              screen rotation
                            You can disable the automatic screen rotation by
                            specifying the screen orientation for the activity
                            in the AndroidManifest.xml or setting it to
                            “nosensor”.

                            <activity ... android:screenOrientation= "potrait" />


                            <activity ... android:screenOrientation= "nosensor" />




Sunday, September 6, 2009
Android’s attachMovie()
                            You can create new views by using the
                            LayoutInflater which creates all the views of a
                            declared layout in code. A nice trick to make
                            new instances of complex views.


              LayoutInflater inflater = (LayoutInflater)
              context.getSystemService( Context.LAYOUT_INFLATER_SERVICE );
              view = inflater.inflate(R.layout.photo_listitem, null );




Sunday, September 6, 2009
Where is my trace()?
                            You can use the Log-class for a similar feature as
                            trace(). The log messages end up in the Logcat or
                            Console panels in Eclipse.

                            And yes, this works in the emulator and on real
                            devices

                                   import android.util.Log;
                                   ....
                                   Log.w("name", "my logmessage");




Sunday, September 6, 2009
Giving views a name
                         in layout xml file
                            You can specify an identifier or name to a view
                            in the layout xml file via android:id attribute.

                                 <TextView android:id="@+id/summary" />




Sunday, September 6, 2009
Android’s way of
                                this[“photo1”]
                            You can easily obtain child views of a layout by
                            using:

                              (ImageButton) findViewById(R.id.articlesButton);




Sunday, September 6, 2009
Hiding view from the
                            screen
                            You can hide a view by setting the visibility of
                            the view to View.GONE which means the view
                            disappears from the screen and doesn’t take up
                            space in the layout process while
                            View.INVISIBLE will.

                                    myView.setVisibility(View.GONE);

                                  myView.setVisibility(View.INVISIBLE);



Sunday, September 6, 2009
Loading and showing
                      photos on demand
                            Android mainly supports the image file formats PNG,
                            JPG and GIF. You can load an image in ImageView by
                            using the BitmapFactory class and the Bitmap class.

                                  1. Download the photo from the Internet

                                  2. Convert to photo to a Bitmap-instance
              myBitmap = BitmapFactory.decodeByteArray( ba, 0, ba.length );
                                 3. Set the bitmap on an image view instance
                              myImageView.setImageBitmap( myBitmap );



Sunday, September 6, 2009
Android’s Scale9

                            Android’s version of Flash’s Scale9 is called
                            NinePatch and allows to do the same trick in a
                            bit different way.




Sunday, September 6, 2009
Questions?



Sunday, September 6, 2009

More Related Content

Viewers also liked

Slideshare Powerpoint presentation
Slideshare Powerpoint presentationSlideshare Powerpoint presentation
Slideshare Powerpoint presentationelliehood
 
The Near Future of CSS
The Near Future of CSSThe Near Future of CSS
The Near Future of CSSRachel Andrew
 
How to Battle Bad Reviews
How to Battle Bad ReviewsHow to Battle Bad Reviews
How to Battle Bad ReviewsGlassdoor
 
Classroom Management Tips for Kids and Adolescents
Classroom Management Tips for Kids and AdolescentsClassroom Management Tips for Kids and Adolescents
Classroom Management Tips for Kids and AdolescentsShelly Sanchez Terrell
 
The Buyer's Journey - by Chris Lema
The Buyer's Journey - by Chris LemaThe Buyer's Journey - by Chris Lema
The Buyer's Journey - by Chris LemaChris Lema
 
The Presentation Come-Back Kid
The Presentation Come-Back KidThe Presentation Come-Back Kid
The Presentation Come-Back KidEthos3
 

Viewers also liked (6)

Slideshare Powerpoint presentation
Slideshare Powerpoint presentationSlideshare Powerpoint presentation
Slideshare Powerpoint presentation
 
The Near Future of CSS
The Near Future of CSSThe Near Future of CSS
The Near Future of CSS
 
How to Battle Bad Reviews
How to Battle Bad ReviewsHow to Battle Bad Reviews
How to Battle Bad Reviews
 
Classroom Management Tips for Kids and Adolescents
Classroom Management Tips for Kids and AdolescentsClassroom Management Tips for Kids and Adolescents
Classroom Management Tips for Kids and Adolescents
 
The Buyer's Journey - by Chris Lema
The Buyer's Journey - by Chris LemaThe Buyer's Journey - by Chris Lema
The Buyer's Journey - by Chris Lema
 
The Presentation Come-Back Kid
The Presentation Come-Back KidThe Presentation Come-Back Kid
The Presentation Come-Back Kid
 

Similar to FITC Android for Flashers

Mobile Web App Development
Mobile Web App DevelopmentMobile Web App Development
Mobile Web App DevelopmentBrian LeRoux
 
The Horoscope of OSGi: Meet Eclipse Libra, Virgo and Gemini (JavaOne 2013)
The Horoscope of OSGi: Meet Eclipse Libra, Virgo and Gemini (JavaOne 2013)The Horoscope of OSGi: Meet Eclipse Libra, Virgo and Gemini (JavaOne 2013)
The Horoscope of OSGi: Meet Eclipse Libra, Virgo and Gemini (JavaOne 2013)Murat Yener
 
Talk by Tomas Lin on Building Killer RIAs with Flex and Grails at the Groovy ...
Talk by Tomas Lin on Building Killer RIAs with Flex and Grails at the Groovy ...Talk by Tomas Lin on Building Killer RIAs with Flex and Grails at the Groovy ...
Talk by Tomas Lin on Building Killer RIAs with Flex and Grails at the Groovy ...Skills Matter
 
Dia 1 intro to mobile and xamarin
Dia 1   intro to mobile and xamarinDia 1   intro to mobile and xamarin
Dia 1 intro to mobile and xamarinHernan Zaldivar
 
Digital Media Academy Mac-D3
Digital Media Academy Mac-D3Digital Media Academy Mac-D3
Digital Media Academy Mac-D3Martin Cisneros
 
Modern mobile development overview
Modern mobile development overviewModern mobile development overview
Modern mobile development overviewDima Maleev
 
Android
AndroidAndroid
AndroidRaj K
 
androidRajeshmes
androidRajeshmesandroidRajeshmes
androidRajeshmesRaj K
 
Riding A Google Wave - E Dayz09
Riding A Google Wave - E Dayz09Riding A Google Wave - E Dayz09
Riding A Google Wave - E Dayz09Leo Gaggl
 
What Are Your Options If You Can’t Use Flutter_.pdf
What Are Your Options If You Can’t Use Flutter_.pdfWhat Are Your Options If You Can’t Use Flutter_.pdf
What Are Your Options If You Can’t Use Flutter_.pdfMoon Technolabs Pvt. Ltd.
 
andriodrajesh
andriodrajeshandriodrajesh
andriodrajeshRaj K
 
Android and Its Aplications
Android and Its AplicationsAndroid and Its Aplications
Android and Its AplicationsRajesh Kanumetta
 
Practical Design and Development with Flash on Mobile and Devices
Practical Design and Development with Flash on Mobile and DevicesPractical Design and Development with Flash on Mobile and Devices
Practical Design and Development with Flash on Mobile and DevicesChris Griffith
 
android Rajeshppt
android Rajeshpptandroid Rajeshppt
android RajeshpptRaj K
 
Introduction to Flex
Introduction to FlexIntroduction to Flex
Introduction to Flexnamero999
 
Empowerment Technologies Lecture 8 (Philippines SHS)
Empowerment Technologies Lecture 8 (Philippines SHS)Empowerment Technologies Lecture 8 (Philippines SHS)
Empowerment Technologies Lecture 8 (Philippines SHS)John Bosco Javellana, MAEd.
 
Porting iPhone Apps to Windows Phone 7
Porting iPhone Apps to Windows Phone 7Porting iPhone Apps to Windows Phone 7
Porting iPhone Apps to Windows Phone 7Wes Yanaga
 
Designing mobile applications with xamarin
Designing mobile applications with xamarinDesigning mobile applications with xamarin
Designing mobile applications with xamarinJerel Hass
 
iOS vs android .pptx
iOS  vs android .pptxiOS  vs android .pptx
iOS vs android .pptxabid masood
 

Similar to FITC Android for Flashers (20)

Mobile Web App Development
Mobile Web App DevelopmentMobile Web App Development
Mobile Web App Development
 
The Horoscope of OSGi: Meet Eclipse Libra, Virgo and Gemini (JavaOne 2013)
The Horoscope of OSGi: Meet Eclipse Libra, Virgo and Gemini (JavaOne 2013)The Horoscope of OSGi: Meet Eclipse Libra, Virgo and Gemini (JavaOne 2013)
The Horoscope of OSGi: Meet Eclipse Libra, Virgo and Gemini (JavaOne 2013)
 
Talk by Tomas Lin on Building Killer RIAs with Flex and Grails at the Groovy ...
Talk by Tomas Lin on Building Killer RIAs with Flex and Grails at the Groovy ...Talk by Tomas Lin on Building Killer RIAs with Flex and Grails at the Groovy ...
Talk by Tomas Lin on Building Killer RIAs with Flex and Grails at the Groovy ...
 
Dia 1 intro to mobile and xamarin
Dia 1   intro to mobile and xamarinDia 1   intro to mobile and xamarin
Dia 1 intro to mobile and xamarin
 
Digital Media Academy Mac-D3
Digital Media Academy Mac-D3Digital Media Academy Mac-D3
Digital Media Academy Mac-D3
 
Modern mobile development overview
Modern mobile development overviewModern mobile development overview
Modern mobile development overview
 
Android
AndroidAndroid
Android
 
androidRajeshmes
androidRajeshmesandroidRajeshmes
androidRajeshmes
 
Riding A Google Wave - E Dayz09
Riding A Google Wave - E Dayz09Riding A Google Wave - E Dayz09
Riding A Google Wave - E Dayz09
 
What Are Your Options If You Can’t Use Flutter_.pdf
What Are Your Options If You Can’t Use Flutter_.pdfWhat Are Your Options If You Can’t Use Flutter_.pdf
What Are Your Options If You Can’t Use Flutter_.pdf
 
MSR iOS Tranining
MSR iOS TraniningMSR iOS Tranining
MSR iOS Tranining
 
andriodrajesh
andriodrajeshandriodrajesh
andriodrajesh
 
Android and Its Aplications
Android and Its AplicationsAndroid and Its Aplications
Android and Its Aplications
 
Practical Design and Development with Flash on Mobile and Devices
Practical Design and Development with Flash on Mobile and DevicesPractical Design and Development with Flash on Mobile and Devices
Practical Design and Development with Flash on Mobile and Devices
 
android Rajeshppt
android Rajeshpptandroid Rajeshppt
android Rajeshppt
 
Introduction to Flex
Introduction to FlexIntroduction to Flex
Introduction to Flex
 
Empowerment Technologies Lecture 8 (Philippines SHS)
Empowerment Technologies Lecture 8 (Philippines SHS)Empowerment Technologies Lecture 8 (Philippines SHS)
Empowerment Technologies Lecture 8 (Philippines SHS)
 
Porting iPhone Apps to Windows Phone 7
Porting iPhone Apps to Windows Phone 7Porting iPhone Apps to Windows Phone 7
Porting iPhone Apps to Windows Phone 7
 
Designing mobile applications with xamarin
Designing mobile applications with xamarinDesigning mobile applications with xamarin
Designing mobile applications with xamarin
 
iOS vs android .pptx
iOS  vs android .pptxiOS  vs android .pptx
iOS vs android .pptx
 

Recently uploaded

In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsExpeed Software
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutesconfluent
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Julian Hyde
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Product School
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxDavid Michel
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesBhaskar Mitra
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyJohn Staveley
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoTAnalytics
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesThousandEyes
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...CzechDreamin
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaCzechDreamin
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityScyllaDB
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaRTTS
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupCatarinaPereira64715
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationZilliz
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...Product School
 

Recently uploaded (20)

In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT Professionals
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG Evaluation
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 

FITC Android for Flashers

  • 1. Android for Flash (Lite) Developers Weyert de Boer 14 September 2009, FITC Mobile 2009, Toronto Sunday, September 6, 2009
  • 2. About Me Weyert de Boer Interaction Designer Co-Author of books about Flash Lite and AIR Flash Lite since Early 2005 Worked on Flash-based UIs for Motorola, T- Mobile and Vodafone Sunday, September 6, 2009
  • 3. The Application This session is about a Flash Lite application converted earlier this year to Android. It’s a simple application where you can get a list of articles and photos near the current location using the GPS. And my experience about the conversion process. Sunday, September 6, 2009
  • 6. Going Native? Why? Why not wait until next month for the Flash Player 10 ? Sunday, September 6, 2009
  • 7. The Good, the Bad and The Ugly Sunday, September 6, 2009
  • 8. The Good Developer oriented instead of designer Flex-like ready-to-use components library (like buttons, listviews, grids etc). You can easily reuse your pngs/image assets of your Flash Lite apps Good on-device debugging support instead of Flash’s black box Better memory management compared to Flash Easy access the hardware of the mobile device. Sunday, September 6, 2009
  • 9. The Bad Compared to Flash the animation support is limited and basically only supports code-based tweens and film roll like frame-by-frame animations. No timeline! Way of designing interfaces using layouts has a learning curve User interfaces are limited to 16-bit colours and use 565 dithering. No real interface or layout designer comes with the SDK only a limited viewer. Sunday, September 6, 2009
  • 10. The Ugly A nasty bug in the Android 1.5 / Cupcake can cause a lot of lost time. If you ever used transparent colour (#00000000, rgba) in your layout. Blacks (#000000) is not black any more, you should use #000001. Sunday, September 6, 2009
  • 11. Android Fundamentals AndroidManifest.xml Activities Intents Broadcast receivers Sunday, September 6, 2009
  • 12. AndroidManifest.xml AndroidManifest.xml describes the elements of the Android application, which permissions are needed? Which screens/activities does the application have? Sunday, September 6, 2009
  • 13. Activities An activity is a single, focused thing that the user can do. Almost all activities interact with the user, so the Activity class takes care of creating a window for you in which you can place your user interface. Sunday, September 6, 2009
  • 14. Intents An intent describes what you would like to do. For example, an intent can be that you want to view a page in the browser or pick a person from the address book. A specific interaction moment. Intents are the way to show the activity. Sunday, September 6, 2009
  • 15. Broadcast receivers A way to receive events or notifications from the Android system. This way your application can be notified when the user is back, like when he disabled the keyboard lock, or when a SMS message has been received. Sunday, September 6, 2009
  • 16. Interfaces from the Flasher’s Eye Android’s version of the movieclip is the View or ViewGroup (can contain children) and the building blocks for UI components. Views are responsible for drawing and handling key events similar to the movieclips Sunday, September 6, 2009
  • 17. Designing interfaces You can use a declarative xml format to define your screens (so called layout xmls) or code up yourself in Java (similar to Flex MXML) Android comes with nice layout mechanism to organize child views with. You need to use the setContentView()-method to load layouts defined in xml files into an activity. Sunday, September 6, 2009
  • 18. Examples in the Application Sunday, September 6, 2009
  • 19. Menu Screen ImageButton ImageView Sunday, September 6, 2009
  • 20. Photos Screen GridView PhotoItem layout Sunday, September 6, 2009
  • 21. PhotoItem in Flash Frame Overlay Photo Background Sunday, September 6, 2009
  • 22. PhotoItem in Android Background Photo Frame Overlay Sunday, September 6, 2009
  • 23. Warning! Code snippets will be shown now! Little timesavers for starters Sunday, September 6, 2009
  • 24. Tips and Tricks Timesavers, things every Flash Lite developer wants to know when starting with Android development. Sunday, September 6, 2009
  • 25. Android’s GetURL As by most other things in Android you have to use an intent. Opening a page in the default web browser of the device. Intent i = new Intent( Intent.ACTION_VIEW, Uri.parse("http://www.wikipedia.org") ); startActivity(i); Sunday, September 6, 2009
  • 26. Showing a different screen or activity Intent mainIntent = new Intent(MainMenu.this, ArticlesScreen.class); startActivity(mainIntent); Sunday, September 6, 2009
  • 27. Activity in fullscreen Opening an activity window in fullscreen without status bar and application title bar can be hidden by code or by theme XML <activity android:style="@android:style/ Theme.NoTitleBar.FullScreen" /> Java Code this.requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); Sunday, September 6, 2009
  • 28. Disabling automatic screen rotation You can disable the automatic screen rotation by specifying the screen orientation for the activity in the AndroidManifest.xml or setting it to “nosensor”. <activity ... android:screenOrientation= "potrait" /> <activity ... android:screenOrientation= "nosensor" /> Sunday, September 6, 2009
  • 29. Android’s attachMovie() You can create new views by using the LayoutInflater which creates all the views of a declared layout in code. A nice trick to make new instances of complex views. LayoutInflater inflater = (LayoutInflater) context.getSystemService( Context.LAYOUT_INFLATER_SERVICE ); view = inflater.inflate(R.layout.photo_listitem, null ); Sunday, September 6, 2009
  • 30. Where is my trace()? You can use the Log-class for a similar feature as trace(). The log messages end up in the Logcat or Console panels in Eclipse. And yes, this works in the emulator and on real devices import android.util.Log; .... Log.w("name", "my logmessage"); Sunday, September 6, 2009
  • 31. Giving views a name in layout xml file You can specify an identifier or name to a view in the layout xml file via android:id attribute. <TextView android:id="@+id/summary" /> Sunday, September 6, 2009
  • 32. Android’s way of this[“photo1”] You can easily obtain child views of a layout by using: (ImageButton) findViewById(R.id.articlesButton); Sunday, September 6, 2009
  • 33. Hiding view from the screen You can hide a view by setting the visibility of the view to View.GONE which means the view disappears from the screen and doesn’t take up space in the layout process while View.INVISIBLE will. myView.setVisibility(View.GONE); myView.setVisibility(View.INVISIBLE); Sunday, September 6, 2009
  • 34. Loading and showing photos on demand Android mainly supports the image file formats PNG, JPG and GIF. You can load an image in ImageView by using the BitmapFactory class and the Bitmap class. 1. Download the photo from the Internet 2. Convert to photo to a Bitmap-instance myBitmap = BitmapFactory.decodeByteArray( ba, 0, ba.length ); 3. Set the bitmap on an image view instance myImageView.setImageBitmap( myBitmap ); Sunday, September 6, 2009
  • 35. Android’s Scale9 Android’s version of Flash’s Scale9 is called NinePatch and allows to do the same trick in a bit different way. Sunday, September 6, 2009