I have migrated my app fully to jetpack compose. The app only has 4 screens. The problem is after migrating my app size is increased a lot. I've read some articles about comparison after migrating compose, and most of them show that compose is make the app size smaller but not for my case.
https://github.com/galihif/My-Quran
Before migrating to compose my release aab size is just 6MB
After fully migrating to compose my aab size is increased by almost 100% even though I have deleted all the unused XML files and dependencies.
When migrating I've also added some font files to my project, the total size is just 1,25MB. Is it cause my app size getting bigger?
I've also added dagger hilt for dependency injection when migrating
Related
We are about to start greenfield development of an Android library and considering using JetPack Compose for UI elements used there.
I know that one restriction to consider is API 21+ (not really a problem).
Are there any other reasons to use or not use Jetpack Compose for library development?
Well I'm not sure if that's a definite "no" for usage (that's rather subjective), but you have to bring the dependency on the compose along with the library. This will affect the library and app size
I am trying to create an app in Heroku. I have done different things to make it smaller (now it is shrunk to one third of its original version) and still its "compiled slot size" gets to 760M. So it keeps fail to push since it is larger than 500M. I am trying to figure out if there is a service that I can pay for the space and let me to push an app larger than 500M. I cannot find which service gives me such option.
I really need to solve this problem, because this is a very basic version of my app and I hope to expand it further to a commercial app.
Your slug is very large and you can try to reduce it further (especially if this is supposed to be a simple version of your application).
You can look at which dependencies you import and leave out what you don't really need: how to do it depends on your stack (for Java Maven apps you trim the POM file, Python the requirements.txt, etc..)
Check also out slugignore in case you can leave out files and assets from your project folder
A good option is to dockerize the application: the Docker images do not have the same slug restrictions.
If all the above is not successful you might need to look at a different provider (DigitalOcean has no slug restrictions but it does not have a free plan) or a change in your architecture (split the application in different components).
Hope this isn't a stupid question. When looking at Docker images, particularly from the official repository they list multiple versions and labels for each dockerfile. For instance:
9.1.6-php8.0-apache-buster, 9.1-php8.0-apache-buster, 9-php8.0-apache-buster, php8.0-apache-
buster, 9.1.6-php8.0-apache, 9.1-php8.0-apache, 9-php8.0-apache, php8.0-apache, 9.1.6-apache-
buster, 9.1-apache-buster, 9-apache-buster, apache-buster, 9.1.6-apache, 9.1-apache,
9-apache, apache, 9.1.6, 9.1, 9, latest, 9.1.6-php8.0, 9.1-php8.0, 9-php8.0, php8.0
My question is why do they list so many variations of the version in the link (i.e. 9.1.6-php8.0-apache-buster and 9.1-php8.0-apache-buster, etc.)? I'm not sure if this is for searching and spiders (though it wouldn't need to be included in the link like they do), or if it is because each dockerfile can be modified to any of those versions? (and if so, how?). For instance, the above drupal dockerfile supports 9 - 9.1.6 and the dockerfile can be adjusted to that version. TBH, it's mainly just confusing why they do their links like that if its just for search indexing because it looks like its supporting multiple versions of something.
Today, these tags may all point to the same image. However tomorrow, 9.1.7 may be released, and when that happens, all the 9.1.6 images will remain unchanged and a new set of 9.1.7 images are built with generic tags like 9.1 and 9. Additionally when 9.2.0 is released, or php 8.1 comes out, or the next version of debian is released, any of these could be breaking changes for an app. So in your Dockerfile, you might say:
FROM ${BASE}:9.1-php8.0-apache-buster
And by doing so, you'll get the 9.1.7 when it's released, but not 9.2.0, and you won't accidentally be shifted over to nginx, or upgraded from buster to bullseye when it becomes stable. The more change your app is able to tolerate, the more generic you may be in your base image tag. The risk being one of those changes may break your app.
You can be very specific and pin to an exact base image that doesn't automatically update, but then as security vulnerabilities are patched in newer base images, your child image would remain vulnerable since it's locked to an old base image that won't receive updates.
I am a newbie in Blackberry Development and has got stuck on a very complex thing.
I have to make an application which should be support all O.S 6 and 0.S 7 based mobile phones.
Now I have different screen resolutions for different handsets in BB OS 6 and 7.
Now how can i manage my background images, and its button positions to be synced on all size of devices.
I have created an images for the screen size of 640x480 and according to it I have placed some button on x,y positions. now if i install the same app on a screen size of 480x360 how can i manage the x,y positions and manage the background size according to device width and height.
Can anybody help? I am complete newbie.
Use preprocessor, built-in to Eclipse JDE-plugin, or third-party preprocessor and BlackBerry Ant Tools
Compile separate applications for different RIM OS versions using the same source code files with preprocessor directives inside.
Technically an application compiled with RIM SDK 6.0 is compatible with device with RIM OS 7.0, but to provide the best user experience make separate applications for separate RIM OS versions.
On preprocessing include those image files which are suitable for building a particular application version. If you need to support many screen sizes, then add the biggest possible images to your project and then scale them down at the runtime. Scaling down almost does not affect image quality.
Upon ant build process employ Alx task to collect all information about separate application versions into one alx file.
As a result you will have one alx file (application descriptor file, it is an xml-file), and a set of folders with cod files inside.
When all cod files are signed, you can also do it upon ant build process distribute this alx file with all folders with cod files as one zip archive.
Customer unzips this archive, connects device via usb to the computer, launches BlackBerry Desktop Manager and selects this one alx file. Directives generated by alx task will guide BlackBerry Desktop Manager to install application suitable for the device RIM OS version.
If you want to distribute your application wirelessly, then employ jadtool task and make a php page that reads browser user agent and redirects browser to a relevant jad file.
Before using OTA (over the air) method for distributing your application, add the following MIME-type instructions to the .htaccess file of your web-server.
AddType text/vnd.sun.j2me.app-descriptor jad
AddType application/java-archive jar
AddType application/vnd.rim.cod cod
While the approach suggested does provide the best user experience, it is also the most complex to manage.
Personally I try very hard to make one executable and have it evaluate at run time what it needs to do based on the form factor of the device. This is actually easier than you might think, helped significantly by the fact that most screens about the same width. So you can do things like scale your assets to match a proportion of the screen width, based on the screen resolution, and they will look OK on most devices.
And while there are some nice things to be had by using stuff that is specific to say OS7, at this stage I think you should focus on the bread and butter stuff that you can do with OS 5. So, I would recommend you develop something for OS 5.0 - it will run on OS 6.0 and OS 7.0 devices. Create the UI generically to cope with various screen sizes. Later, if you need to get more sophisticated, you can use the tools that have been described.
You will find more on how I try to do things by looking at this.
http://supportforums.blackberry.com/t5/Java-Development/Tutorials-for-new-developers-Part-1/m-p/1621711#M194036
I would suggest you look at tutorial 10.
I also recommend a cruise around here:
http://developer.blackberry.com/java/
One final thing though, are you aware that Java phones are no longer being developed by BlackBerry? If you are just starting development, you might consider learning C++/Cascades and developing for the BB10 phones.
I have a blackberry application with lots of images that was build for pre-OS7 handsets. I have to make it up to date with the new screen sizes, and my 5Mb app will be almost twice as big, which means over the limit for it to work.
What is the best way to handle that in the BB Java Plug-in for Eclipse ?
I've come to the conclusion that i have 2 choices :
Including the new images as a cod (or is it jar?) library in my current project, but didn't manage to do that. Most of what i read was for the JDE anyway and i'd like to do that in Eclipse.
Have a second Bundle for new handsets, but how to do that without having 2 different projects ?
Downloading the new images on install seems to be another one, but it's not an option for this project.
Details and/or links appreciated, as i'm quite new to BB development.
Many thanks
From my point of view the better way is to use only the biggest possible images in the project and scale them down proportionally for every device at the runtime.
When you scale down an image its quality {almost} does not change. There are exceptions, sure. But in general this rule works.
Also you may use preprocessor to build different cod files for different devices with different screens.
You can keep bigger images and get rid of smaller ones. You can handle devices that has lower resolution via image scaling. This way your application becomes smaller.
According to me i suggest you that you have to make same app for only Blackberry OS 7.0 because it has different different resolution and if you manager your application for all Blackberry OS than your app will become larger size and it may be possibilities that we cant upload our app in Blackberry app world.
Remove all previous OS graphic and put into for only Blackberry OS 7 and upload it on market so OS 7.0 user download the latest app.