CHAPTER EIGHT
PUTTING IT ALL TOGETHER PACKAGING AND DEPLOYING
After completing this unit, Student must able to:
• Explain android packaging and deploying mobile application
• Identify performance best practices
From the Packaged Components page, use the Create Packaged Components wizard to create
and immediately deploy packaged components to a runtime environment.
Procedure
1. From the Deploy menu, select Packaged Components.
The Packaged Component landing page opens.
2. Click the Create Packaged Component button.
The Packaged Components wizard opens. The Component Explorer displays only the
list of components eligible for deployment.
3. From the Component Explorer, select the check box next to one or more components
that you wish to create in the packaged component.
You can use the search bar in the components list to search for a component by name
or component ID, or use the filter icon to narrow results by deployed status, component
type, packaged component status, or packaged component ID.
If the component was created as a packaged component previously, a version history of
the component appears in the right-most pane.
4. Optional: Use the Action menu to view details about your selected component and
its dependent components, view historical details of all packaged component versions
created for the selected component, or deselect the component as a candidate for
packaging.
5. Click Next: Add Details.
The Add Details screen of the wizard opens.
6. Optional: Click the View Included Components action to see the primary component
and all dependent components included with your selected component.
7. Optional: Provide the following information:
o Version For All— Enter the unique version ID that you want to apply to the
selected component(s). The version must be unique to previously packaged
components and can contain alphanumeric characters. If you do not populate
1|Page
the field, Boomi Integration automatically generates a version number for each
component individually, which increments based on the latest revision number
respectively.
Remember that though you may have several components selected at this point
for packaging, each component results in its own individual package at the
completion of the wizard; only the version number, notes, and sharing options
are applied in bulk to each selected packaged component.
o Package Notes for All— include a note about the version of the packaged
component you are about to create.
o Sharing— (Disabled by default) enable the Sharing option to allow Process or
API component types to be shared to the Process Library or Integration Packs
once they are created as a packaged component.
8. Once you are finished, click the Create Packaged Component button. The button
shows the number of components that are selected for creation.
Your selected component(s) is created as a new version of the packaged component,
and is added to the version history table on the Packaged Component Screen.
Additionally, you are presented with a dialog in which you can choose to immediately
deploy the new version of the packaged component.
9. Click Deploy to deploy the new version of your packaged component.
The Deploy wizard opens.
10. In the Deployment Environment field, select an environment from the list of available
options. Optionally add notes about the deployment that you may want to reference
later.
11. Click Next: Select Versions.
The next screen of the Deployments wizard opens.
12. From the Component Explorer, select the check box next to one or more packaged
components that you wish to deploy to the environment that you selected in Step 10.
13. Optional: Use the Action menu to compare two versions of a packaged component,
or to deselect the component for deployment.
14. Optional: Click the View Details link in the Selected Version column to view details
about the version of the packaged component that is currently selected. If applicable,
click the View Details link in the Deployed Version column to view details about
another version that was most recently deployed.
2|Page
Click Close on the Package Component Details dialogs to return to the Deployment
wizard.
15. Optional: Click the Select different package link to select a different version of the
packaged component in which to deploy. Select a different version of the packaged
component to mark it instead as the candidate for deployment and click Select Package,
or click Cancel to return to the Deployments wizard.
16. Click the Next: Review button.
The next screen of the Deployments wizard opens.
17. Review and confirm that all selections and details are correct, then click the Deploy
button.
The Deployment Successful dialog appears and informs you that your recent
deployment was successful.
18. Click View Deployments to see only your recent deployment in the Deployments table,
or click Close to see all deployments.
[Link] Best Practices
Performance - the most significant aspect of a mobile app. The first thing users will notice over
and over again is your app's startup time. And they are likely to give a thumbs down to the app
if it's slow. As per Nimbledroid, poor app performance has made 86% of users (counting myself
in) uninstall their apps.
So, if your app needs to show some content to a user, it has less than 11 seconds to load. But
here's the sob story - only 40 out of 100 Android apps start under 2 seconds while 70 take at
least 3 seconds. This answers your question of which part of the app development process you
should focus the most on: it's Android app performance.
Yes, android devices have multiple cores, so building smooth android apps is really difficult -
right? Actually, it's not. You can do a lot of things on Android in different ways, and the only
challenge you'll face is picking the best option. If you want to optimize android app
performance, you must know what's happening under the hood. Fortunately, you can find
bottlenecks, show and measure what's happening with the help of a lot of tools.
Well then, it's time to stop relying on your gut feeling or hoping for the best and know how to
improve the performance of your android app that will win the hearts of users.
Tips and Tricks to Improve Android App Performance
3|Page
• Reduce the App Size
• Optimize Networking
• Optimize Images and Videos
• Optimize Screen Size
• Optimize Offline Model
• Improve Memory usage
• Scale Down the App Launch Time
• Hit a Smooth Frame Rate
• Work Efficiently with Threads
• Identify Latency Killers
• Use StringBuilder instead of String
The smoother your app performs, the harder it will hit the market. Personally, I would not mind
spending a couple of extra bucks for exceptionally improved performance, and I've seen clients
do so too. Truly the wise said - time is money!
Anyway, please keep in mind that premature optimization during the mobile app development
process can spoil the whole game for you. Spending time on micro-optimization won't work
for you as well. Try to optimize code that runs frequently. The onDraw() function is such an
example that runs every frame with an ideal 60 times/second pace. As drawing goes slower
than any other operation, redraw only when you absolutely need to.
Okay, enough theory! Let me cut to the chase and look at some actions you should consider if
android app performance matters to you:
Reduce the App Size
Smartphones aren't powerful GPUs yet. And here's a jaw-dropping fact - it's modestly
configured mobile phones that consume most of the global Android market share. Even though
some of them don't support 2G/3G, users generally avoid downloading huge apps, especially
when there's a hurry. So, the less space it consumes on your phone, the better it is for users.
Android App Bundles
Android App Bundle is the latest upload format that consists of all the resources and compiled
code. It delays APK building and signing to Play Store. Such features make the job
exceptionally easy as app bundles create APKs that are optimized as per the device.
4|Page
Though the compressed download size of your app should be 150mb or less to publish in the
Play Store, minimizing the app size as small as possible is still a great idea to improve your
android app performance.
Android Size Analyzer
This is an efficient Android app performance tool that can help you choose and implement a
lot of solutions to shrink the size of your app. You can find Android size analyzer as an Android
Studio plugin and a standalone JAR (as a command line).
As a Plugin > Install the Android Size Analyzer from the plugin marketplace in Android Studio
and use it as a plugin. Run an analysis on your Android app with it, and you will find a tool
window with all the suggestions on how to enhance your app performance.
As a Command-Line > Github has the latest version of Android Size Analyzer as a ZIP or TAR
file. Extract the ZIP file and run the size-analyzer script so that you can see the size of your
files. Additionally, the size [Link] script (windows) is there to run these two commands:
./analyzer check-bundle
./analyzer check project
Handle network requests effectively as your app will use the internet to upload or download
data. One of these network requests is cellular data, and another is the battery. Heavy usage of
both mobile network and WiFi consumes a lot of battery.
Suppose you have to download a 1 MB file. So you need to stimulate the mobile or WiFi radio
to make a network request and download the file. However, the radio won't sleep instantly after
the task. For the next 20-40 seconds, it will be in an adequately active state based on your
device.
So, can you do something about it? Yes, batching. Prefetch things that users may use and
download the data they may need in the next 3-4 minutes so that the radio doesn't wake up
every couple of seconds.
You can also improve app performance by editing the batch parameters based on the user's
charging condition or internet type. For example, you can't prefetch much data if the user is on
cellular internet with a low battery, unless it's WiFi while charging.
5|Page
Efficient API Design > Android app performance heavily relies on API design. Workarounds
on APIs generally bring too much pressure on network restrictions. Hence, ensure to have
completeness and consistency while designing the API payloads of your android app.
Start with UI and go all the way to data to design a complete and consistent API payload that
will improve android app performance.
Apart from APIs, your Android app loads quite a number of images and videos. Usually, other
properties load those images as well, like the website of your app. Images and videos on
desktop websites are different (in terms of resolution, screen size, and device type) than on
mobile apps.
Hence, you must optimize images and videos in your app for mobile devices with measured
and limited resources. When your Android app requests images, ensure they are served with
the best size and resolution. You can also use adaptive video buffering and progressive images
so that your app can successively download images rather than waiting for the complete image
to download. This way, users don’t view a blank image due to an improvement in perceived
latency.
In the same way, adaptive video streaming techniques effectively modify the video resolution
as per the network setup. When bandwidth is low, you can lower the video quality so that users
can at least watch the video and not a loading screen.
Additionally, did you know that you can use the WebP format besides JPEG or PNG images
as well? Yes, WebP is technically more streamlined, although you need to put extra effort into
creating WebP images. And for local network traffic, SVG (Scalable Vector Graphics) format
is another good choice that can save your disk space as well.
Lastly, you can use image caching, vector images, libraries like Fresco or Picasso and apply
color filters instead of varied sets of colored images. All these are effective ways to improve
android app performance.
8.1. Android Field Service App
The Field Service mobile app for Android and iOS is an all-in-one tool for mobile workers on
the go. This enterprise-class mobile experience leverages Salesforce in a lightweight design
optimized for a modern mobile workforce. Offline capability means that users can keep
working without internet connectivity and know that all their changes are saved. And the app
is highly customizable, allowing you to tailor it to your unique field service needs.
6|Page
Service Appointments
• The Recently Viewed service appointments list view shows all service appointments
assigned to a user even if the user hasn’t viewed them.
• Service appointment list views of more than 2000 don’t display labels as dropdown
values on the mobile app’s Schedule tab.
• The schedule list isn't refreshed unless the ScheduleUpdateFreq timeout value is
reached.
Service Reports
• Users can’t select a template when creating a service report in the mobile app. Instead,
a template is selected based on this order:
1. The work order template
2. The work type template
3. The standard template
• Service report previews have these limitations:
1. Although users can make an offline request to generate a service report, the final
PDF is created only when the user’s device is online.
2. The app doesn’t automatically get the latest data before generating a service
report preview, so data in service report previews can be out of date. This
limitation applies to online and offline service report previews.
3. If a reference field exceeds the maximum priming depth of 2, it isn’t populated.
4. Formula field values can be inaccurate in a preview because they aren’t
dynamically calculated.
5. Roll-up summary fields are blank.
6. Related lists behave differently in mobile previews.
The order of records in related lists can differ between the preview and
the printed report.
If a service report template includes a related list, the list populates only
if it's on the page layout of the record that the service report is being
generated for.
7|Page
On the printed report, all related lists are printed. In the mobile preview,
a related list must be on the preview page layout to appear on the
preview.
7. These elements aren’t visible:
Cases related list
Headers and footers
Organization fields
Certain data fields
Images in rich text fields on a service report template or service
appointment, work order, or work order line item page layout
• The Digital Signature object Place field isn’t supported.
• Text fields and rich text area fields are truncated to 255 characters. This limitation
occurs on rich text area fields, other types of text fields, standard fields, and custom
fields.
Inventory Management
• A maximum of 1,000 products are shown in inventory lists. This number is also the
maximum number of inventory items that can be primed.
• If you use the setting Enable Multiple Locations, the Add and Add All buttons are
removed from the Product Required screen. Instead, manually add the required products
for multiple inventory locations.
Chatter
• The Feed tab in iOS is supported only on the work order, work order line item, service
appointment, and case objects. The Feed tab in Android is supported only on the work
order, work order line item, and service appointment objects.
• (Android only) Chatter is disabled when the app doesn’t have internet connectivity.
Knowledge
• (iOS only) If images in knowledge articles are hosted outside of Salesforce, they display
normally. Images uploaded to Salesforce don’t load correctly. As an alternative, we
recommend using an image link that users can open themselves. You can avoid this
8|Page
issue by selecting the option to use POST requests for cross-domain sessions. Find this
option on the Session Settings page in Setup.
• (iOS only) Some knowledge articles of supported UI languages, such as Japanese, don't
show in the Field Service mobile app.
• (Android only) The Knowledge Article action isn’t visible on the Work Order Overview
screen. View knowledge articles using the related list.
• (Android only) In Knowledge Article details, field names such as Title don’t display on
Android devices.
• If a device is running in any of Salesforce’s 26 supported languages, the app
automatically translates knowledge articles to that language. If the device isn’t running
in a supported language, no knowledge articles are shown.
Barcode Scanner
• The barcode scanner is compatible only with 1D serial barcodes and 2D QR codes.
• In barcode scanning, the Android app uses the Zebra Crossing library. The iOS app uses
Apple’s built-in libraries, except for AVMetadataObjectTypeFace. For details, see
AVMetadataObjectType.
Briefcase Builder
• Related lists don't work offline when the records are primed with Briefcase Builder.
• The Product object in the Inventory tab isn’t supported.
Flows
• Select formula functions and operators are available offline.
• Backslash \ characters and single quotes ( ' ) aren’t supported in flow formula fields.
• Screen flows launched using quick actions or app extensions aren’t supported.
• Email alert actions aren’t supported in flows.
• Paused flows aren’t supported. If you leave a flow in progress and/or exit the Field
Service mobile app, you can’t resume the flow where you left off.
• The wasSelected operator can’t be used in decisions.
• For eval() functions, the boolean values true and false are case-sensitive.
• Hardcoded ID values must be 18 digits long. 15-digit values aren’t supported.
9|Page
• Apex classes aren’t supported in flows.
• Fault connectors aren’t supported in flows.
• When uploading images in flows, the content document IDs parameter isn’t supported.
Admins must create a flow confirmation screen to show which images were uploaded.
Videos and other file types aren’t supported.
• Flows don’t support the following elements. Adding these elements to a flow causes it
to display an error. o Lightning components (except for file upload) o
Output parameters on file upload except for “Uploaded File Names” o
Choice resources with Display Text Input enabled o Actions with output
parameters
Chapter Review Question
1. List and explain all package in android files
2. Create a project that can be manage employees of one organization using
android application?
10 | P a g e