Android P Beta 4 from Developer’s perspective

Android P Beta 4 is currently accessible for Pixel gadgets and top gadget. Introduce the beta on any supported gadget for testing and development or just to attempt Android P.

Android P introduces great new features and capabilities for users and developers. Let’s take a look at what’s in for developers.

 

Animation

Android P has the new AnimatedImageDrawable class for drawing and showcasing GIF and WebP animated images. Its working is similar to AnimatedVectorDrawable in that RenderThread drives the animations of AnimatedImageDrawable.

An ‘AnimatedImageDrawable’ can be decoded with the new ImageDecoder.

 

Indoor Positioning with Wi-Fi RTT

Android P has added a platform for IEEE 802.11mc Wi-Fi protocol known by the name of Wi-Fi Round-Trip-Time (RTT). With this newly added feature you can take advantage of indoor positioning in your apps.

On Android P devices with hardware support, your apps can use the new RTT APIs to measure the distance to nearby RTT-capable Wi-Fi Access Points (APs).

Within a distance of  3 or more APs, multilateration algorithm can be used to estimate the device position. The result is typically accurate within 1 to 2 meters.

In-building navigation, fine-grained location-based services such as disambiguated voice control can be possible with this accuracy.  

 

Display cutout support

Android P provides support for the edge-to-edge screens with display cutout for camera and speaker. With the new

‘DisplayCutout’ class you can find out the location and shape of the non-functional areas where content shouldn’t be displayed. The existence and the placement can be found with ‘getDisplayCutout()’ method.

A new window layout attribute, ‘layoutInDisplayCutoutMode’, allows your app to lay out its content around a device’s cutouts. You can set this attribute to one of the following values:

LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT

LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES

LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER

 

Multi-camera support and camera updates

Now different streams can be accessed from two or more physical cameras on devices running Android P.

Devices with dual-front or dual-back cameras, you can create interesting features like seamless zoom, bokeh, and stereo vision. The API lets you call a logical or fused camera stream that automatically switches between two or more cameras.

Android P also enables support for external USB/UVC cameras on supported devices.

Session parameters are also introduced as a new feature that helps to reduce delays during initial capture.

In Android P the multi-camera API supports monochrome cameras for devices with FULL or LIMITED capability. Android P also enables support for external USB/UVC cameras on supported devices.

 

ImageDecoder for drawables and bitmaps

ImageDecoder is added to Android Pto provide an innovative approach for decoding images. ImageDecoder can be used to decode an image rather than the BitmapFactory and BitmapFactory.Options APIs.

ImageDecoder lets you create a Drawable or a Bitmap from a byte buffer, a file, or a URI.

ImageDecoder has many other ways that allow you to further enhance the image. For example, you can use the ‘setPostProcessor()’ method to modify the appearance of the image, such as applying a circle mask or rounding corners

 

Security enhancements

A number of new security features are introduced in Android P. A unified fingerprint authentication dialog and high-assurance user confirmation of sensitive transactions.

 

On-device system tracing

In Android P, you can now record system traces from your device. System tracing allows you to capture timing data for each process that’s running on an Android device and to view the data in an HTML report. It is useful for identifying what each thread is doing and for viewing globally important device states.

 

Notifications

Android P introduces several enhancements to notifications, all of which are available to developers targeting Android P and above.

Android P enhances the messaging experience with following features:

Simplified support for conversation participants. Many other APIs, such asaddMessage(), now hold the Person class instead of a CharSequence. The Person class also supports the Builder design pattern.

Android P now displays images in Messaging Notifications on phones.

The app can retrieve the ‘EXTRA_REMOTE_INPUT_DRAFT’ sent by the system when a user inadvertently closes a messaging notification and save replies as drafts.

‘setGroupConversation()‘ can be used to purposefully identify a conversation as a group or non-group conversation.

Use ‘RemoteInput.setChoices()’ to provide an array of smart reply to the user

 

Android Studio TIPS for Devs.

If you have decided to bounce into Android advancement or have been filling in as an Android developer for some time now, you have reached the ideal place.There is no alternate route or a simple method to become a successful developer. However, if you will invest the exertion and heart required, you will unquestionably get all that you deserve.
On your mission of becoming an Android developer and for increasing your chances of success as an Android developer we have prepared a few tips. There are some paramount things one should always take care of if you aspire to achieve great skills.

1. Change Android Logcat colors.
To change Android Studio Logcat you need to go to: Preferences (Settings on Windows / Linux machines) → Editor → Colors & Fonts → Android Logcat and change the foreground color for every type of log.

2. Use split screen for increasing efficiency.
To open split screen :Right Click on tab you wanted to split → Vertical / Horizontal Split →and that’s it.

3. Enable multi cursor feature
To Enable multi Cursor :Press (alt + j for windows) or (ctrl + g for mac) →select the word with multiple occurance you want to rename and start typing .

4. Move hardcoded strings to resources
Step : 1 Press option + return (Windows / Linux: alt + enter).

Step : 2  Enter name of string in Resource Name hit OK...and you are done.

5. Format Your Code
 Quickly Hit cmd + option + l (Windows / Linux: ctrl + alt + l) to format your code , it works like a charm for messed up programmers, gives proper indentation, and spaces wherever needed.

Before Formatting

After Formatting

6. Quickly close a tab
While holding Shift key and click on the opened tabs to close them to quickly close the unusable tab.

Conclusion
Making progress as another Android App designer isn’t simple, yet isn’t inconceivable either. What’s more, with all the true stories of overcoming adversity that are out there, what influences you to surmise that you can’t be one of them.
Last but not the least- Think Big. As Palomar stated: “You need to think your app will be downloaded by millions users” Except if you target a small group and you know about what that implies for your business, you should plan for an impressive future and have faith in progress.

Happy Coding