How do I set up application designer in an android device from apk installer rather than grunt adbpush by connecting to PC?

I want to set up an application designer in the android device from apk installer.
I have the directory on PC and I usually use ‘grunt adbpush’ for pushing it to the android device (USB Debugging enabled), but now, I want the android application to set up the app designer. If someone can give some ideas about how to do that, it would be helpful.
Thank you!

Hi @Apurva_Bhargava!

So the app designer is something you do on your computer – not the android device – to design the apps. Then you push the apps to your android device.

Here’s an example of getting started with the app designer:
https://docs.odk-x.org/getting-started-2-architect/

1 Like

@Apurva_Bhargava I am a bit confused about what you are seeking to do. Could be more specific on the functionality you are seeking?

The ‘reset the app server button’ pushes the config files and database to a server from the Android device (based on the contents inside the opendatakit directory). You can also push config files and such to a server using suitcase - though we do not have good documentation on that.

Here is the beginning of the documentation: https://docs.odk-x.org/suitcase-intro/

An ODK-X application is a collection of files and database tables that get rendered by ODK-X frameworks (e.g., Tables, Survey). To share the “ODK-X application” the config files and database tables are synchronized with a server to share “the application” to other devices. Two standard methods of getting the files synchronized is from the Android device or using Suitcase.

1 Like

I created an application that uses the services provided by ODK-X Services. It has the androidlibrary module (https://github.com/odk-x/androidlibrary) as a dependency, I am not using Survey or Tables applications. The services work on local database (inside opendatakit folder) which is basically created from app designer. So, what I am hoping to achieve is that if anyone downloads my application, an opendatakit folder with config/assets files is created automatically.

Which brings me to another question… if I don’t already have the opendatakit folder on my android device but on the server (pushed from another device), then, will running sync download the same to my device?

1 Like

**DISCLAIMER: THIS ANSWER is NOT meant for people who are trying to use ODK-X as designed and documented. This response is to help an experienced programmer use only a portion of the ODK-X frameworks. This response might confuse you and cause problems if you do not have a good understanding of the ODK-X frameworks.

What you are suggesting might work in theory. You will have to give it try to know if it will work.

The synchronization protocol syncs the information in the “config” folder and “data” folder (database rows).

It does NOT sync the “system” folder as those libraries and interfaces are installed by the APKs (e.g., Tables, Survey) since the code in that folder generally provides the bridge from webviews to the java code in the APKs. Services does not use the Android WebView to render it’s user interface; therefore, I do not believe it needs the “system” folder. Therefore, Services should be able to synchronize.

One thing to keep in mind that when designing your “custom application” in app designer you could have begun to rely on something in the “system” folder, You could move anything you need from the “system” folder to the “config” folder and the synchronization protocol should replicate it to the other mobile devices. (Generally you should NOT duplicate libraries from ODK-X “system” folder to the “config” because you run the risk of libraries with different versions having BAD interactions in the webkit - again this is a special case when you are not using ODK-X’s Web UIs).

Again it might work as I have not tried this out to find out of there are any issues.

2 Likes

This is a very helpful response.
I will try syncing to see if downloading data files works. I realised before that ODK-X Survey or Table generate some device configuration files (probably related to the system folder you mentioned) and I cannot reset the server without these. After the server has been setup, then, it doesn’t matter if other devices have Survey or Tables or anything else. You are correct, I am not using the webviews or the frameworks designed for directly using Services. I have still been helped by you mentioning about the system folder. Thank you!

Update:
It worked. On an android device with no opendatakit folder (application designer files), syncing with the server set up the complete folder on the android device. This eliminated the need for running some script before installation.

1 Like