Android Apps with Liferay Screens

Liferay Screens speeds up and simplifies developing native mobile apps that use Liferay. Its power lies in its Screenlets. A Screenlet is a visual component that you insert into your native app to leverage Liferay Portal’s content and services. On Android, Screenlets are available to log in to your portal, create accounts, submit forms, display content, and more. You can use any number of Screenlets in your app; they’re independent, so you can use them in modular fashion. Screenlets on Android also deliver UI flexibility with pluggable Views that implement elegant user interfaces. Liferay’s reference documentation for Android Screenlets describes each Screenlet’s features and Views.

You might be thinking, “These Screenlets sound like the greatest thing since taco Tuesdays, but what if they don’t fit in with my app’s UI? What if they don’t behave exactly how I want them to? What if there’s no Screenlet for what I want to do?” Fret not! You can customize Screenlets to fit your needs by changing or extending their UI and behavior. You can even write your own Screenlets! What’s more, Screens seamlessly integrates with your existing Android projects.


Figure 1: Here’s an app that uses a Liferay Screens Sign Up Screenlet.

Screenlets leverage the Liferay Mobile SDK to make server calls. The Mobile SDK is a low-level layer on top of the Liferay JSON API. To write your own Screenlets, you must familiarize yourself with Liferay’s remote services. If no existing Screenlet meets your needs, consider customizing an existing Screenlet, creating a Screenlet, or directly using the Mobile SDK. Creating a Screenlet involves writing Mobile SDK calls and constructing the Screenlet; if you don’t plan to reuse or distribute the implementation then you may want to forgo writing a Screenlet and, instead, work with the Mobile SDK. A benefit of integrating an existing Screenlet into your app, however, is that the Mobile SDK’s details are abstracted from you.

These tutorials show you how to use, customize, create, and distribute Screenlets for Android. They show you how to create Views too. There’s even a tutorial that explains the nitty-gritty details of the Liferay Screens architecture. No matter how deep you want to go, you’ll use Screenlets in no time. Start by preparing your Android project to use Liferay Screens.

Preparing Android Projects for Liferay Screens

To use Liferay Screens, you must install it in your Android project and then configure it to communicate with your Liferay Portal instance. Note that Screens is released as an AAR file hosted in...

Read More

Using Screenlets in Android Apps

You can start using Screenlets once you’ve prepared your project to use Liferay Screens. There are plenty of Liferay Screenlets available and they’re described in the Screenlet reference...

Read More

Using Views in Android Screenlets

You can use a Liferay Screens View to set a Screenlet’s look and feel independent of the Screenlet’s core functionality. Liferay’s Screenlets come with several Views, and more are being developed...

Read More

Using Offline Mode in Android

Offline mode in Liferay Screens lets your apps function when connectivity is unavailable or intermittent. Even though the steady march of technology makes connections more stable and prevalent,...

Read More

Architecture of Liferay Screens for Android

Liferay Screens applies architectural ideas from Model View Presenter, Model View ViewModel, and VIPER. Screens isn’t considered a canonical implementation of these architectures, because it isn’t...

Read More

Architecture of Offline Mode in Liferay Screens

Mobile users may encounter difficulty getting or maintaining a network connection at certain locations or times of day. Using offline mode with Screenlets ensures that your app still functions in...

Read More

Creating Android Screenlets

The Screenlets that come with Liferay Screens cover common use cases for mobile apps that use Liferay. They authenticate users, interact with Dynamic Data Lists, view assets, and more. However,...

Read More

Creating Android List Screenlets

It’s very common for mobile apps to display lists. Liferay Screens lets you display asset lists and DDL lists in your Android app by using Asset List Screenlet and DDL List Screenlet, respectively....

Read More

Creating Android Views

By creating your own Views, you can customize your mobile app’s layout, style, and functionality. You can create them from scratch or use an existing View as a foundation. Views include a View...

Read More

Packaging Your Android Screenlets

To reuse your Screenlet in another app or distribute it, you can package it in a module (Android library). You can optionally share it with other developers via jCenter or Maven Central. Developers...

Read More

Using Liferay Push in Android Apps

Liferay Screens supports push notifications in Android apps. To use them, you must configure some APIs and modify your app to consume and/or produce push notifications. This tutorial shows how to...

Read More

Accessing the Liferay Session in Android

A session is a conversation state between the client and server. It typically consists of multiple requests and responses between the two. To facilitate this communication, the session must have...

Read More

Adding Custom Interactors to Android Screenlets

Interactors are Screenlet components that implement server communication for a specific use case. For example, the Login Screenlet’s interactor calls the Liferay Mobile SDK service that...

Read More

Rendering Web Content in Your Android App

Liferay Portal represents web content articles as JournalArticle entities. Liferay Screens provides several ways to render these entities in your apps. The simplest way to display a...

Read More

Rendering Web Pages in Your Android App

The Rendering Web Content tutorial shows you how to display web content from a Liferay Portal site in your Android app. Displaying content is great, but what if you want to display an entire page?...

Read More

Using Web Screenlet with Cordova in Your Android App

By using Cordova plugins in Web Screenlet, you can extend the functionality of the web page that the Screenlet renders. This lets you tailor that page to your app’s needs. You’ll get started by...

Read More

Adding Offline Mode Support to Your Android Screenlet

Offline mode lets Screenlets function without a network connection. For offline mode to work with your Screenlet, you must manually add support for it. Fortunately, Liferay Screens 2.0 introduced a...

Read More

Android Best Practices

When developing Android projects with Liferay Screens, there are a few best practices that you should follow to ensure your code is as clean and bug-free as possible. This tutorial lists these....

Read More

Liferay Screens for Android Troubleshooting and FAQs

Even though Liferay developed Screens for Android with great care, you may still run into some common issues. Here are solutions and tips for solving these issues. You’ll also find answers to...

Read More
0 (0 Votes)
Mobile Previous