Mobile #134: Flutter Slide-to-Act Widget, React Native Scaler, .NET Meteor Update, Vision Transformers, Data-as-a-Product, Google puts $100B into AI.
April 19, 2024
Hi,
Welcome to the mobile app development world with _mobilepro! In this edition we cover mobile development community discussions on:
In our relatively new section captures internet jibber-jabber about the mobile ecosystem:
Data-as-a-Product and Data-Contract: An evolutionary approach to data maturity
ISPs can charge extra for fast gaming under FCC’s Internet rules, critics say
Google will pump more than $100B into AI, says DeepMind boss
Today's news covers release stories on Apple, Android, and Ionic. Want to boost your mobile development game? Then don’t miss our tutorial from the book ‘C# 12 and .NET 8 – Modern Cross-Platform Development Fundamentals - Eighth Edition’! And if you are currently developing an iOS app, checkout this week's resources on iOS tools.
P.S.: If you have any suggestions or feedback, or would like us to feature your project on a particular subject, please write to us. Just respond to this email!
If you liked this installment in our new series, fill in our survey below and win a free PDF on your Packt account.
Thanks,
Apurva Kadam
Editor-in-Chief, Packt
Mobile App Dev Community Speak
What are Mobile developers discussing? What are the latest tips and tricks? Shortcuts and experiments? Cool tutorials? Releases and updates? Find it all out here.
Implementing the Slide-to-Act Widget in Flutter - One thing that makes Flutter really cool is its many different rich widgets. From simple parts to fancy design elements, Flutter gives developers lots of tools to make rich and beautiful-looking screens. One of the beautiful widgets is the Flutter Slide to Act Widget, which is a widget that allows user to slide their finger on the screen to perform a specific function, instead of the general boring way of just clicking on a button or widget. Without wasting any time, let's dive into coding.
React Native Scaler - Dreaming of perfecting app aesthetics across multiple devices? You’ve come to the right place! react-native-scaler isa library that provides a set of scaling functions to help you make your React Native app responsive. It exports an initScalers function that returns four scaling functions: scaleWidth, scaleHeight, moderateScaleWidth, and moderateScaleHeight. This article is a guide to installation, initialization, usage, functions and more!
.NET Meteor Update – Unlock a new level of productivity for .NET MAUI in VS Code. The .NET Meteor and DotRush extension will help you focus on your app tasks by assisting you during development. Both extensions are opensource so you can try them out yourself!
Flutter Flavor – Elevate your Mobile App Development with a dash of customization in Flutter Projects using Flavor. Flutter flavor makes mobile application development simpler and more seamless, as well as the solution to the problem of efficiency and speed in the complex development of mobile applications that need to implement multiple environments. Implementing Flutter Flavor will not only speed up and simplify the development process, but it will also reduce the risk of errors that will occur if you separate ingredients manually.
Auto Image Slider in Android – Want to add an automatic image slider to your Kotlin app? In this post, I'll guide you through the step-by-step process of implementing this feature. An image slider is a view that showcases multiple images one at a time. Users can control the slider manually by swiping or using dedicated action buttons to navigate to the next or previous image. Let's dive into how you can bring this dynamic image experience to your Kotlin app!
Mobile App Dev Repos
Check this space for new repos, projects and tools each week! This week we bring you a collection
of iOS tools for logging tools, frameworks, integrations and more in your apps:
Lighty - Easy to use and lightweight logger for iOS, macOS, tvOS, watchOS and Linux.
JustLog - Console, file and remote Logstash logging via TCP socket.
Twitter Logging Service - Twitter Logging Service is a robust and performant logging framework for iOS clients.
Reqres - Network request and response body logger with Alamofire support.
TraceLog - Dead Simple: logging the way it's meant to be! Runs on ios, osx, and Linux.
OkLog - A network logger for iOS and macOS projects.
Spy - Lightweight, flexible, multiplatform (iOS, macOS, tvOS, watchOS, Linux) logging utility written in pure Swift that allows you to log on different levels and channels which you can define on your own depending on your needs.
Diagnostics - Allow users to easily share Diagnostics with your support team to improve the flow of fixing bugs.
Gedatsu - Provide readable format about AutoLayout error console log.
Pulse - Pulse is a powerful logging system for Apple Platforms. Native. Built with SwiftUI.
Internet Jibber-Jabber
Interesting stories and curious musings from the Internet.
A Visual Guide to Vision Transformers - This is a visual guide to Vision Transformers (ViTs), a class of deep learning models that have achieved state-of-the-art performance on image classification tasks. Vision Transformers apply the transformer architecture, originally designed for natural language processing (NLP), to image data. This guide will walk you through the key components of Vision Transformers in a scroll story format, using visualizations and simple explanations to help you understand how these models work and how the flow of the data through the model looks like.
Apple Removes Game Boy Emulator iGBA From App Store - Apple today said it removed Game Boy emulator iGBA from the App Store for violating the company's App Review Guidelines related to spam (section 4.3) and copyright (section 5.2), but it did not provide any specific details. iGBA was a copycat version of developer Riley Testut's open-source GBA4iOS app, which has long been distributed outside the App Store. The emulator rose towards the top of the App Store charts following its release this weekend, but users on social media complained that the app was a blatant rip-off overlaid with ads.
Data-as-a-Product and Data-Contract: An evolutionary approach to data maturity - This article attempts to apply a well-recognized model of evolutionary progression to understand data evolution. The objective is to aid in visualizing data maturity and assist companies in identifying their tipping point, i.e., when they will start seeing significant benefits from implementing data contracts and treating data as a product.
ISPs can charge extra for fast gaming under FCC’s Internet rules, critics say - FCC plan rejected request to ban what agency calls "positive" discrimination. Some net neutrality proponents are worried that soon-to-be-approved Federal Communications Commission rules will allow harmful fast lanes because the plan doesn't explicitly ban "positive" discrimination.
Google will pump more than $100B into AI, says DeepMind boss - Google will eventually invest $100 billion in AI, according to DeepMind CEO Demis Hassabis. The chief of DeepMind, which Google acquired in 2014, made his prediction on Monday during a TED conference in Vancouver, reported Bloomberg. Someone had asked Hassabis about the rumored$100 billion Stargate supercomputer that Google's rivals Microsoft and OpenAI are apparently planning.
Mobile App Development Tutorial
Equality of Types
It is common to compare two variables using the == and != operators. The behavior of these two operators is different for reference types and value types.
When you check the equality of two value type variables, .NET literally compares the values of those two variables on the stack and returns true if they are equal.
In Program.cs, add statements to declare two integers with equal values and then compare them, as shown in the following code:
int a = 3;
int b = 3;
WriteLine($"a: {a}, b: {b}");
WriteLine($"a == b: {a == b}");
Run the PeopleApp project and view the result, as shown in the following output:
a: 3, b: 3
a == b: True
When you check the equality of two reference type variables, .NET compares the memory addresses of those two variables and returns true if they are equal.
In Program.cs, add statements to declare two Person instances with equal names, and then compare the variables and their names, as shown in the following code:
Person p1 = new() { Name = "Kevin" };
Person p2 = new() { Name = "Kevin" };
WriteLine($"p1: {p1}, p2: {p2}");
WriteLine($"p1.Name: {p1.Name}, p2.Name: {p2.Name}");
WriteLine($"p1 == p2: {p1 == p2}");
Run the PeopleApp project and view the result, as shown in the following output:
p1: Packt.Shared.Person, p2: Packt.Shared.Person
p1.Name: Kevin, p2.Name: Kevin
p1 == p2: False
This is because they are not the same object. If both variables literally pointed to the same object on the heap, then they would be equal.
Add statements to declare a third Person object and assign p1 to it, as shown in the following code:
Person p3 = p1;
WriteLine($"p3: {p3}");
WriteLine($"p3.Name: {p3.Name}");
WriteLine($"p1 == p3: {p1 == p3}");
Run the PeopleApp project and view the result, as shown in the following output:
p3: Packt.Shared.Person
p3.Name: Kevin
p1 == p3: True
The one exception to this behavior of reference types is the string type. It is a reference type, but the equality operators have been overridden to make them behave as if they were value types.
Add statements to compare the Name properties of two Person instances, as shown in the following code:
// string is the only class reference type implemented to
// act like a value type for equality.
WriteLine($"p1.Name: {p1.Name}, p2.Name: {p2.Name}");
WriteLine($"p1.Name == p2.Name: {p1.Name == p2.Name}");
Run the PeopleApp project and view the result, as shown in the following output…read more.
Read C# 12 and .NET 8 – Modern Cross-Platform Development Fundamentals - Eighth Edition now!
What's Happening in Mobile App Dev?
Latest releases, updates, launches and news on mobile app dev!
Apple
Web Distribution now available in iOS 17.5 beta 2 and App Store Connect - Web Distribution lets authorized developers distribute their iOS apps to users in the European Union (EU) directly from a website owned by the developer. Apple will provide developers access to APIs that facilitate the distribution of their apps from the web, integrate with system functionality, and back up and restore users’ apps, once they meet certain requirements designed to help protect users and platform integrity. For details, visit Getting started with Web Distribution in the EU.
Android
How to effectively A/B test power consumption for your Android app’s features - The new Power Profiler in Android Studio helps Android developers by showing power consumption happening on devices as the app is being used. Understanding power consumption across Android devices can help Android developers identify and fix power consumption issues in their apps. They can run A/B tests to compare the power consumption of different algorithms, features or even different versions of their app.
Ionic
Announcing Capacitor 6.0 - Capacitor 6, the latest upgrade to native runtime for webapps is here. This release brings experimental Swift Package Manager support, aligns with Apple’s new privacy requirements, and introduces improvements across the board, ensuring your projects are future-proof and more efficient.
Ionic 8 is here! - The release of Ionic 8 I s announced! This stable release comes after several betas and release candidates with improvements suggested by the Ionic community. What’s new? Enhancements to theming, accessibility, revised iOS designs, a new Picker experience, and a new password toggle component.
And that’s a wrap.
P.S.: If you have any suggestions or feedback, or would like us to feature your project on a particular subject, please write to us. Just respond to this email!