My new app AfsaneDB (Beta) is now in PlayStore!

Those who love reading classic literature can now enjoy literary masterpieces in this beautifully designed app.

Showing posts with label Android Apps. Show all posts
Showing posts with label Android Apps. Show all posts

Wednesday, 26 April 2023

Building an App Builder - Strategies, Limitations and Available Tools

As a budding app developer, creating an app builder for mobile devices is an exciting idea which I'm giving a lot of thinking since early 2019. However, there are several strategies, and limitations that need to be considered before embarking on this journey. In this blog post, I will explore these aspects in detail.

This would be a brainstorming session for me, where I'd just put all that I've found while researching this subject.

Techniques

Scratchware

Scratchware was an interesting project but is now deprecated. Its technique was unique, where the app was built on the device itself, without any internet connection. However, other app builders mostly build the app on the server. Therefore, it is not necessary that the build part should be on the server.

Scratchware was based on MIT App Inventor as per their website before the deprecation. Showing ads before each build, and giving options to arrange items (buttons, cards, inputs, labels etc.) in rows and columns were really awesome features. For logic, it used Scratch Programming blocks.

APK Editor

Another app builder that is worth mentioning is APK Editor, which uses ARSCLib. Another similar one is APK Explorer Editor, which offers a full version via Fdroid.Other repos for Apk Editor might be using apktool.jar. Apktool is also being used in many Android apps, like revanced. How are they able to run.jar tools is a mystery for me yet, as executing jar requires JRE while Android runs on Dalvik Virtual Machine.

A workaround (or not?) is to use jar library via custom Cordova plugin. Plugin docs suggest it can be done easily. See this suggestion from a stackoverflow answer:

Add lib-file element to your plugin.xml:

<platform name="android">

  <lib-file src="AztecReader.jar" />

</platform>

Anyway, ApkEditor recompiles the app on the device itself, without any internet connection. This approach proves that building an app builder on a mobile device is possible without the need for a server.

Cordova-like Environment

Creating a Cordova-like environment on a mobile device seems difficult. Even though initializing an empty Cordova app within the user's device is possible using Node Mobile or AndroidJs, compiling the APK will be tricky as it would need gradle, java jdk, android build tools, apksigner, etc. The end-users may not have these tools installed on their devices, making it difficult for them to compile the app.

Termux

Java runtime, etc., would be possible using Termux in android, but that would require end-users to have Termux installed, which may be a challenge.

Using a Sample App as a Base

Another approach could be to use a sample app as a base and replace its content at runtime using a user-defined config file. This approach is similar to the Cordova-like environment but is more simplified and straightforward.

Meta-data

One of the most popular strategies for creating an app builder is to use meta-data. In this strategy, the "app" you define is meta-data in a higher-level definition that is interpreted in a host wrapper app. This approach makes it easier to create apps as the app builder is more of a code generator.

Desktop - HTML to APK

A tool I found, and tested but never used in production or even to build anything remotely of any use for myself is Website to APK which is a desktop-based tool. The interface looks like it's built using the C# Windows Form Application. The options are really great, and it's user-friendly. 

Softonic's dev bio hyperlink suggests Pravesh Agrawal as the developer. Web, Github, Twitter.

It seems to be using all the standard tools in the background (probably running a bash script for build instructions). Options to select a URL or a local folder are awesome, along with an icon, splash screen, and setting up Admob ids in presumably pre-configured ad spaces. 

This perfectly depicts the "meta-data" type or a "base app" already set, which is modified based on the user's input. 

Available Tools

There are several tools available for creating an app builder on mobile devices. Some of these tools include: 

AppSheet: AppSheet uses a meta-data strategy to create an app builder. It interprets the higher-level definition in a host wrapper app, making it easier to create apps.

A sample response to the question "Building an App Builder - how do they do it?" on stackoverflow as a reference:

I work at AppSheet. There are two basic approaches an app builder can follow: (a) act as a code generator, or (b) implement an intepreter. In the former case, it spits out code that gets compiled into an executable package that can be installed and run on a device. In the latter case, the "app" you define is meta-data in a higher-level definition that is interpreted in a host wrapper app. Each has its strengths and weaknesses. AppSheet uses the latter approach. — Praveen Seshadri

Thunkable: Thunkable uses a simple drag-drop interface and loads of pre-defined templates and customizations. As far as I remember, It also uses Sratch for programming logic similar to Scratchware.

Andromo: Andromo is an online app builder that lets you create Android apps without any coding. It has a user-friendly interface that makes it easy to build apps.

BuildFire: BuildFire is another online app builder that offers a drag-and-drop interface for creating Android apps.

Conclusion

I'm not really sure which strategy would work the best, but a couple of them looks promising to me. For Android on Android, editing the APK and recompiling might be the easiest one. Although I've to dig deeper to understand how APK editor and the likes do it. It's not just unzip and re-zip of the package, which often results in app corruption. 

A desktop app might be simple, but dependencies should be bundled within the executable in that case, otherwise, it'd again feel like something built for advanced users.

References

Scratchware Pro continued on GitHub

How do I build a Cordova 8.x cordova.jar to include in existing Android app?

Integrating Hybrid App (Cordova) with Native App (Java android app) — Part 1 by pankajbhandari08

Decompile and Modify APKs on the go with APKTool for Android [XDA Spotlight] introduces apktool by Andro Black

Android Studio: Add jar as library? Directly or using mavenCentral as per one of the comments

Including .jar file into cordova plugin with suggestion to add lib-file in plugin

Friday, 12 March 2021

App Release: OneSignal Push Manager - Secure & Free (Android+Web)

OneSignal Push Manager - Secure & Free (Android)
OneSignal Push Manager - Secure & Free
This app helps you manage your app credentials and provides intuitive UI for sending the notifications to your users.

Android: https://play.google.com/store/apps/details?id=com.sarbakaf.onesignalpush

Android app to manage & send push notifications via OneSignal

Features

  • Manage all your apps
  • Stores all your credentials in your phone
  • Offline storage, open-source and hence trustworthy
  • CRUD for app info with lovely UI
  • Simple notepad to save other necessary stuff
  • Send notifications to any of your apps, in any segment
  • From simple heading + message notifs to fancy ones, with icon, banner and extra data to pass-in the app (useful for deeplinks)

User Guide

  1. Get your "App ID" and "REST API Key" from OneSignal Dashboard.
  2. It is recommended by OneSignal NOT to save API key anywhere, therefore our app doesn't save it by default. It's optional.
  3. In the "APPS" section of our app (Push Manager), make a list of app names and IDs.
  4. In the "SEND NEW" section, fill the details and send in a segment of your choice.
  5. Button 1 can be used to send in a segment named 'Test', which you can configure from OneSignal Dashboard for your test devices.
  6. Button 2 can be used to send in a segment named 'All'.
  7. Button 3 can be used to send in any custom segment.
  8. Notepad can be used to jot down & save other necessary stuff.
  9. Profit?

Questions, suggessions and contributions are welcome.

The app is also available as a webapp for testing purposes here:  https://onesignal.netlify.app/

Shakeeb Ahmad

shakesvision

Saturday, 29 February 2020

Qaafiyah Expert (Android) - Release


Links:


Download Qafia expert
Qaafiyah Expert is a simple tool which contains

  1.  A rhyme generator, with support of diacritics, filter for Urdu poetic meters and 3 scripts for search. Works offline.
  2.  A lightweight diary with offline "save" support.
  3.  An online portal for awesome literary posts, updated periodically.


For those who were waiting for this

Why did it take so long?

Like always, I'd list many reasons (excuses?)
  1. God's wish.
  2. Learning android development takes some time.
  3. The basic structure had been completed in September 2019, which I had had on my mobile phone. I used to suggest qawaafi to people asking for them using the tool. But I wasn't satisfied. At the time of Windows software version (in 2016) I was new in the programming world. Not a pro now either, but whatever I've learned in these years, I thought to improve at least few things in it and add few features of my own interest. So, the app has seen many phases before being released to the public. The basic version had the same options I'd put in Windows app.
Now, those who used to constantly poke me via email or social media to provide the basic version at least, may say unspeakable things to me; but as I've said many times:
I have a constant urge to present the things in the best way possible.
So I delayed it. Although I've recently read in a gyaani's article that this bug of perfectionism should be killed ASAP.

One more reason for releasing it late is that nobody likes to update the app too many times. So, changing few things and releasing an update would do no good. And Google PlayStore, MashaAllah, bombards you with questions in every release, making it further difficult.

Requests

The app is still in the dev mode, so if you find any bug or want something to be included in the next version, please leave a review. If the response is good, I'll try to roll out next release soon.

Few features in upcoming versions

  • App interface language switch, for those who don't know Urdu script (Complete Internationalization)
  • Meanings and thesaurus on word-click
  • Taqti (Poetic Meter calculation)
  • Poetry workshop
I've two requests for you. First, to report bugs if you find any and if you want any other feature to be included in this app (other than the 4 mentioned above) then comment on the Play Store's rating page.
Second, If you have an idea for a new app, go to "online" section of this app and submit your idea on "Ek app aisi bhi."

I've few app ideas of my own interest, have to finish them too. Remember me in your supplications. 

Shakeeb Ahmad
February 16, 2020
Telegram: ShakesVision