DEV Community

Evan Lin
Evan Lin

Posted on • Originally published at evanlin.com on

LINE Developer Meetup 13 (Part 2) - September 18, 2020

Preface

Hello everyone, I am Evan Lin from the LINE Taiwan DevRel team. I am very happy to share with you the third developer meetup of this year. This is also the first offline meetup held in Hsinchu after the pandemic. It is also the first time the LINE Taiwan engineering team has come to National Chiao Tung University to hold an offline event.

KKTIX event webpage: Event URL

At this LINE Developer Meetup, first, LINE Taiwan's CTO Marco Chen will introduce the LINE technology star internship program, and LINE's data engineering team leader Shawn Tsai will bring "How ML Powers LINE Services".

Article List

LINE Shopping App with Flutter / LINE Client Team - Evan Fang

Slides

(LINE Shopping App feature introduction)

Next, the speaker is Evan Fang from the LINE Taiwan client App development team. He will share how to use Flutter to develop the number one downloaded "LINE Shopping App". First, it mainly mentions that the LINE Taiwan Client App team is mainly responsible for the following products:

About the introduction of "LINE Shopping"

LINE Shopping partners with many well-known shopping websites, gathering more than 20 million products. Just enter the product you want to find in the search bar, and you can see the product information and prices from various shopping websites on one webpage, so you don't have to compare everywhere!

Through LINE Shopping, you can not only find the products you need in one place, but also get more rewards.

Flutter creates the LINE Shopping exclusive APP

In order to improve the user experience and create a more refined service interface, LINE Shopping also decided to launch its own APP this year. But it hopes to quickly get feedback from users and improve the user experience in real-time. The development team chose to use Flutter as the development program architecture, and through Flutter, it can develop Android and iOS applications at once. The reasons for choosing Flutter are as follows:

Performance Considerations:

As an integrated design framework, Flutter can operate directly on Canvas through Widget Rendering, which has performance similar to Native App.

Fast Development:

A single code base to develop Apps for two platforms. It is very suitable to use Flutter in the development of UI components. It can ensure the consistency of UI design, allowing users to have the same user experience.

Flutter supports Hot reload, which allows you to see the results of changes in real-time on the IDE without compiling.

Rich Development Resources:

Rich official guide tutorials, as well as Dart Devtool and pub.dev development resources for reference.

Final Results

The final results are also very impressive. Using Flutter, a consistent user design experience can be completed on iOS and Android platforms within three months. And it was recognized as the number one download for the month.

Problem Sharing

Of course, some problems will also be encountered when using the Flutter open-source package, but the LINE development team has also reported and communicated related issues with the Flutter team. The purpose is to make the package more perfect and to make the product more in line with user expectations. The following are some problems in a list:

  • Problem: Flutter cannot change the keyboard language on Android
    • Solution:
    • Use Hybrid composition and update Flutter to version 1.20.0 or later.
  • Problem: Hybrid composition will crash the app in some situations
    • Solution:
    • LINE provides related solutions, and the package team also understands and uses another solution to solve it.
  • Problem: Pages that read a large amount of data often run out of memory.
    • Solution:
    • Modify the reading method, only display the part that the user sees in the Viewport. Other parts of the resources are not pre-read and released after use, making the resources more effective.

Summary

The speaker also shared that Flutter is currently very suitable for developing pages that are not complex. It has higher performance, fast iteration, and development tools, and it is also quite easy to learn. But if you need to develop more complex pages, you need to be able to track the source code of the underlying package, and you can solve the problem when it occurs.

Finally, I hope everyone will download the LINE Shopping App and experience the performance developed by Flutter!

Serving Location-based data / LINE Hotspots - Julian Shen

Slides

Next, Julian Shen from the LINE SPOT development team will share some of the problems and experiences he encountered when dealing with geographic data (location-based data). Regarding LINE SPOT, you can refer to Julian's introduction to the LINE SPOT service at the TECHPULSE 2019 venue. For more LINE SPOT service introductions and LINE SPOT architecture introductions, please refer to this article "LINE TAIWAN TECHPULSE 2019 Technology Event Highlights".

This time, the content of LBS: Location-Based Service is mainly introduced. We can often see LBS-related games or services, such as check-in, maps, and navigation. Then, there are many technologies that can be used to find the distance between two points.

Find attractions within a few kilometers

In the process above, we often get GPS coordinates, or directly get the address. Addresses are convenient for humans to read, but the coordinates of latitude and longitude are what the computer really needs to process. If you want to find all the coordinates within a three-kilometer distance from a certain coordinate, do you need to calculate all the locations in the database? Here, a method called K-D Tree is introduced.

The K-D Tree method is to cut the map plane by the bisection method, and find the distance between every two points as a block. In this way, you can quickly find the two closest distance points.

How to cache search results

If a group of people need to find all coordinates within three kilometers at the same time LINE SPOT, is there a way to quickly cache the data and quickly respond to the needs of users? At this time, you can consider using the Hashing method to directly convert the latitude and longitude values into a string of text, and you can quickly find the results of the last search through this method. If you haven't searched, then run the K-D Tree search, so that you can quickly respond to the user without going through complex calculations.

Although this method can quickly know whether it has been searched, there are some problems as follows:

  • Due to the use of zig zag traversal for hashing, different latitudes and longitudes may have very similar results.
  • It may be quite close, and the geohashing results may be different on the boundary.

Other methods

Google has also proposed the S2 Cell ID method to distinguish geographic information. Uber has also proposed the H3 method, which divides the entire geographic information through hexagonal blocks. And because of the use of hexagons, the spherical geographic conditions of the earth can be expressed more accurately.

"LINE Hotspots" food recommendations

Don't say that Hsinchu City is a food desert anymore, LINE Hotspots also has a selection of "Ten Hsinchu Local Food Stores". I also hope that after the students understand the experience sharing of geographic information processing. You can also come to LINE Hotspots to share your Hsinchu food map.

Event Summary

Join the "LINE Developer Official Community" official account immediately, and you can receive the first-hand Meetup event, or push notifications of the latest news related to the developer program. ▼

"LINE Developer Official Community" Official Account ID: @line_tw_dev

About the "LINE Developer Community Program"

LINE launched the "LINE Developer Community Program" in Taiwan at the beginning of this year, and will invest manpower and resources in Taiwan for a long time to hold internal and external, online and offline developer community gatherings, recruitment days, developer conferences, etc., and has held more than 30 events. Readers are welcome to continue to check back for the latest updates. For details, please see:

Top comments (0)