2
2
24siteup2019-01-24 09:01:23
Android
24siteup, 2019-01-24 09:01:23

How to reduce the size of an .apk to a few kilobytes in Android Studio?

I'll try to be brief. There is such an article expert.chistov.pro/public/587908/. In it, a person offers to download an Android application written by him, which intercepts Broadcast from a barcode scanner to the 1C mobile platform. I downloaded this app and it works.
Because Since I have long wanted to try to write something for Android, I decided to write an application with exactly the same functionality. Created an application in Android Studio 3.3. And, in principle, I managed to write a working application. Its essence is as follows (to explain very briefly): when the application starts (stops), the service starts (stops) and the application is immediately closed by the finish() method.
There are two questions that are bugging me:
1. When I launch my application, I can see how it opens and immediately closes. And when you run an application created by that person, this is not observed. I asked him about the "invisible" interface, he answered me like this: "if the interface is not created and the application is assigned the role of a service, then where will it (the interface) appear from?)".
2. Smoothly moving on to the second question: After his answer, I decided to use Android Studio to compare his .apk and my .apk. And I saw that our applications use almost the same classes and functions. In particular, I saw that in MainActivity it uses the finish() function. I can assume that his application works the same way as mine: it opens, the service starts (stops) inside, and closes with the finish() method.
I also noticed that my .apk weighs several times more than his .apk. In general, knowledgeable people, tell me how he achieved such a small .apk size and why when you start his application it is not visible that it opens ???
I post it (men.apk) and my (my.apk) files, as well as my source code (BarcodeFor1C.rar): https://drive.google.com/file/d/1_O7ZRjXN770Vs_22m...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
2
24siteup, 2019-01-24
@24siteup

I figured it out myself from this article: https://habr.com/en/post/339938/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question