Django itself works with an HTTP Request/Response cycle. “Something” (browser, program, app, etc) issues an HTTP request to your server. Django receives that request and returns a response. That response can be pretty much anything - HTML, JSON, text, PDF, whatever.
So if MIT Appinventor allows you to issue HTTP requests to a server and do something useful with the response, then yes, they’ll work quite well together.
I would love to see this, when you get it running.
One thought I have, how will you test when you are in development with Django locally? I am asking because my first thought is since MIT AI is on the web, the request will come from their ip to your local machine. How is that done?
Yes, it’s possible to connect a Django project to an Android app built with MIT App Inventor.
While MIT App Inventor is primarily designed for creating simple mobile apps without extensive coding, you can use a combination of techniques to achieve this connection:
Django REST Framework:
Build RESTful APIs in your Django project using Django REST Framework. These APIs will provide endpoints for your Android app to interact with the Django backend.
API Integration in App Inventor:
In your MIT App Inventor project, use the Text Component to make HTTP requests to your Django REST API endpoints. You can use the Web Component or the TinyWebDB component for more complex interactions.
Data Exchange:
Use JSON or other suitable data formats to exchange data between your Django backend and the Android app. Django REST Framework provides tools for serializing and deserializing data into JSON.