Skip to main content

Posts

Showing posts with the label Android

A Brief Introduction to RxJava2.x

Reactive programming is a programming style where the consumer reacts to the data as it comes in. Asynchronous programming is also called reactive programming. In reactive a programming observables are allowed to propagate event changes to registered observers. "The Observer pattern has done right. ReactiveX is a combination of the best ideas from the Observer pattern, the Iterator pattern, and functional programming." Building blocks for RxJava2.x Observables : Representing sources of data Subscribers (or observers) : Listens to the observables Methods : A set of methods for modifying and composing the data An observable emits items; a subscriber consumes those items. Observables : As mentioned above Observables are the sources for the data. Observable objects that emit a stream of data and then terminate. It can terminate either successfully or with an error. Subscribers : A subscriber objects that subscribe to Observables. An Observer receives a...

15 Key tips to reduce your Android App Size

Users often avoid downloading apps that seem too large, particularly in emerging markets where devices connect to often-spotty 2G and 3G networks or work on pay-by-the-byte plans. This article describes how to reduce your app's APK size, which enables more users to download your app. Understand the APK Structure Before discussing how to reduce the size of your app, it's helpful to understand the structure of an app's APK. An APK file consists of a ZIP archive that contains all the files that comprise your app. These files include Java class files, resource files, and a file containing compiled resources. An APK contains the following directories: META-INF/:   Contains the CERT.SF and CERT.RSA signature files, as well as the  MANIFEST.MF  manifest file. assets/:   Contains the app's assets, which the app can retrieve using an AssetManager object. res/:   Contains resources that aren't compiled into resources.arsc. lib/:   Contains the co...