Category Archives: Development

Android at #io16

(As usually…) It has been a while since my last blog post šŸ™‚

This time I’m coming back just to tell you briefly about Google I/O 2016!
Last time it was back in 2013Ā when I went with my friend MassimoĀ and since then a lot of things have changed. The Android platform got a lot more mature and my impression is that Google started to focus more on simplifying the developer life while still gaining a lot of new data.

I’m not gonna talk about VR, Artificial Intelligence and Machine Learning. These are really cool technologies but my developer heart still belongsĀ to an Android made of custom UIs, Content Providers, messy fragments, multi-threading, memory constraints,… and… why not… Android Studio!

It’s kind of funny because back in 2013 when Tor Norbye and Xavier Ducrohet announced Android Studio starting to ditch support forĀ Eclipse, I was a bit upset. After few months, I started to appreciate IntelliJ and all the efforts that the Android Developer Tools Team made in order to have a first class Android IDE integration/experience.

…but this is the past!!! Without forgetting about being dwarfs standingĀ on the giants shoulders, let’s focus on the present and what’s ahead of us! šŸ™‚

This Google I/O 2016 came withĀ a lot of news:

  • Android N will support native Multi Window with Drag&Drop capabilities.
  • ConstraintLayout: not a RelativeLayout, not a FrameLayout, not a LinearLayout, not a PercentageBlaBlaLayout,… but a completely new ViewGroup that comes withĀ a full integration inĀ a new layout editor forĀ Android Studio. The power of this new tools is based on the promises of flattening drastically the View hierarchy creating constrains between Views and parents! šŸ™‚
  • Java8 support + Jack Compiler
  • An APK analyzer to inspect generated APKs and helpĀ you try to remove un-necessary and/or un-optimized resources
  • Instant AppsĀ is a new feature that will allow you to modularize more your application allowing the user to download just a single use case of your app, without having to install a full APK. Even if it might look a bit strange, this tool could be really handy when it comes to introduce your service to new users, engaging them little by little.
  • Android Wear 2.0: even if it comes as a preview, it will have a new enhanced user interaction and more immersive experiences.
    • Watch FacesĀ will support more than just time and battery info. There will be a chance to support more complicated(complications) data that will provide useful info to the user.
    • Notification will come with a new interaction style and paradigm.
  • Firebase: this is kind of hard to describe. The most simplest description that comes in my mind is “A magic box that contains a lot of tools to help you build better apps. Ā All these kind of little things those are taking a lot of time when developing new features in your apps will become definitely a lot easier. A/B testing, analytics, syncing, login, GCM,… have been bundled and connected(not all of them) togheter into Firebase, giving you a simple way to check and maintain them.

…there is definitely a lot more and you can check it out on the Google I/O 2016 Youtube channel!

I hope you’re gonna enjoy some of the pics I took over there šŸ™‚

This slideshow requires JavaScript.

Cheers,
Simone

P.S.:
..if you live in UK, have a long weekend! šŸ™‚

Miscellaneous (part 6)

Being at the last step of our Android Wear journey suggests us to make some assumptions and considerations on how to take advantage of this new platform in real scenarios. Beside this, we are going to have a brief look at some of the missing elements that we did not touch before, focusing our attention on answering the questions those might have risen in the mind of the readers while going through the entire path.

Read the rest of this entry

Pimp my Wear (part 4)

In ā€œColonizing Wearablesā€, after a first attempt of running the existing handheld version of the Books application on a smartwatch, we ended up creating a simple Android Wear module that displays the number of available book entries. This has been done not only to discover more about Android Wear, but because a handheld app should not be just ported to a wearable device. During our journey, we have introduced few of the new UI components offered by the wear support library. Among them, WatchViewStub has allowed us to handle different screen shapes, figuring out at runtime the type of display. We also had a chance to understand the reason why and how the wearable module has to be included into the handheld build. Therefore, the goal of this part is to evolve the previous module into something that can be easily used by user and that tries to follow as much as possible the android wear design patterns.

Read the rest of this entry

Colonizing Wearables (part 3)

In ā€œLanding on Wearablesā€ we have approached wearables devices extending our existing appā€™s notifications and explaining briefly how to bind them to our development machine for debugging purposes. Now it is time to study more in deep what we can achieve directly on a device running Android Wear, understanding the constraints and the possibilities that the platform introduces. We will continue to keep as reference the BooksĀ application previously developed and we will try to create an Android Wear module.

Read the rest of this entry

[TUTORIAL] Android expansion and compression of items in a ListView. #AndroidDev

Intro

When I started to develop the first Android version of MyNextBus in London, I had to think about how implement the section management of different items types into a list.Ā It was a great opportunity, at the time of the first writing, to use the framework’s widget calledĀ ExpandableListView. If you have never heard about that before, a quick look should solve any lack and make you more comfortable with what you’ll read below. Read the rest of this entry

#Java @nnotations

“Annotations, a form of metadata, provide data about a program that is not part of the program itself.Ā Annotations have no direct effect on the operation of the code they annotate.

Java Tutorial – Oracle (Sun)

Definition:

public @interface <name>{

<type> <method_name>();

<type> <method_name>() default <value>;

}

  • @RetentionĀ annotation specifies how the marked annotation is stored:
    • RetentionPolicy.SOURCEĀ ā€“ The marked annotation is retained only in the source level and is ignored by the compiler.
    • RetentionPolicy.CLASSĀ ā€“ The marked annotation is retained by the compiler at compile time, but is ignored by the Java Virtual Machine (JVM).
    • RetentionPolicy.RUNTIMEĀ ā€“ The marked annotation is retained by the JVM so it can be used by the runtime environment.
  • @TargetĀ annotation marks another annotation to restrict what kind of Java elements the annotation can be applied to. A target annotation specifies one of the following element types as its value:
    • ElementType.ANNOTATION_TYPEĀ can be applied to an annotation type.
    • ElementType.CONSTRUCTORĀ can be applied to a constructor.
    • ElementType.FIELDĀ can be applied to a field or property.
    • ElementType.LOCAL_VARIABLEĀ can be applied to a local variable.
    • ElementType.METHODĀ can be applied to a method-level annotation.
    • ElementType.PACKAGEĀ can be applied to a package declaration.
    • ElementType.PARAMETERĀ can be applied to the parameters of a method.
    • ElementType.TYPEĀ can be applied to any element of a class.
  • @InheritedĀ annotation indicates that the annotation type can be inherited from the super class. (This is not true by default.) When the user queries the annotation type and the class has no annotation for this type, the class’ superclass is queried for the annotation type. This annotation applies only to class declarations.

Read the rest of this entry

Taking pics easily with #WeddingSnap

On 17th September I have taken part into WeddingSnap project as Android consultant and developer. At first, I was so confused and astonished by the idea that a guest takes pictures with his phone at a wedding. But after a few days I have noticed that this is a great idea! Far from Italian traditions, catching pics socially is a great thing because it increases and amplifies the sense of friendship and closeness between people. In fact, if you consider that we are talking about unforgettable and precious moments you’ll certain understand that the bride and groom want all best things in their precious day.

15 years ago we were used to take pictures through simple cameras but now, in an era governed by most famous social networks and technologies, we are using smartphones more and more. WeddingSnap tries to collect these special moments merging wedding’s pictures into shared album, avoidingĀ  useless tricks to share pics between guests. Through this idea all people involved in a wedding can take and share a lot of photo shoots without caring of number limits and distribuition of them.

In just one month the Android app is grown quickly, giving to this project a great contribuition. In particular, if you decide to take a look on GooglePlay, you’ll find these new features:

  • Off-line mode: you can collect pictures without connection and upload them in another moment
  • Share: you were so marvellous at your friend wedding! Why not share that shoot on Facebook or Twitter?
  • Get it! now you can download on your phone pictures shared by other guests!
  • Fastness and responsiveness: old version of WS were too slow… and now it looks very fast!
  • Delete it! Don’t worry if you have upload the worst picture of the Wedding!
  • Several improvements on errors! have you noticed that now app is more stable?

If you aren’t ready for your first, second,….. wedding, give a look at ForeverSnap! You aren’t forced to use a wedding app if you only want to collect other events pics šŸ˜‰

Windows Developer Conference 2012 #devc12

In the last two days I haveĀ participated for FactoryMind at Windows Developer Conference in Milan. As an amazing android developer I have heard carefully all the news proposed by speakers. In my opinion every kind of development technology has its own charm and curiosity and I believe that the new Windows8 will offer to public and developers a new way of think.

Inspired by many active technologies from Apple, Android, Google, (Old) Windows,… this new OS tries to summarize social and canonical schema into a multi-platform operating system granting the maximum experience to users. Far from old styles Windows8 promises to integrate every device in theĀ most convenient manner for the user.

At this conference I haveĀ participated at this at these technical talks:

  • Designing a LOB solution in Metro style fashion – Luca Regnicoli
  • From .NET to Metro style apps – Raffaele Rialdi
  • Implementing MVVM in WinRT – Corrado Cavalli
  • Metro style apps: ALM and Background Tasks – Paolo Pialorsi
  • Developing for Intel Ultrabook – Francesco Baldassarri
  • Tile, Toast and push notifications in Metro style – Daniele Bochicchio
  • Cloud based services for Windows 8 – Roberto Brunetti
  • Windows Store – Lorenzo Barbieri
  • Async Programming in .NET 4.5 – Marco Russo

That’s all for this time šŸ™‚
This is not an IOC to Microsoft world but a new way of think that travels hand by hand with my other one šŸ˜‰

Simone