This will be my new post if I go wrong please don't judge me hard :)
I'm developing an OpenCV project with Python and also I'm developing its mobile interface in Android. My purpose is to compare plant pictures and decide their species.Researchers who use Android application will take plant photos and upload them (such as 'tree leaf photo'). I intent to execute comparison algorithms in the cloud. I use Parse as mobile database so I thought that I could use Cloud Code in Parse to run my Python codes. Can I do this ?
You can have Parse Cloud Code call out to your Python code using HTTP if you want. Just as you can do the same from the Android app. This code can tell the web hook what images to download and process based on some condition (such as a researcher has uploaded a photo to be processed). Purely up to you how you trigger this. Your Cloud Code is JavaScript only though, same as your Android app is Java only (usually, unless you use Xamarin with C# or something else of course).
No. JavaScript is the only language currently supported for writing CloudCode.
Related
I am writing an iOS app. It will store details of something on a server somewhere.
I will write an Android app that will offer the same functionality.
I want to access the same database and retrieve the same data no matter whether it is the iOS or Android app being used.
I would appreciate some "keywords" for a technology that can abstract the back end data store so be something common for both iOS and Android.
If there is an example out there on GitHub a link would help me
Thank you
You can use any database that meets your data modeling needs and performance requirements, which one you chose should depend on the structure of your data. What you should be doing is building a shared middle tier server that persists your data and provides it to your iOS and Android clients. You probably want to pass the data between the client and the server as JSON documents using the http protocol. This is generally known as a REST api though you have to follow certain design principles to really be a REST api.
You could write your server side code in Swift, Java or Kotlin. This would allow you to reuse some code on either iOS or Android depending on which language you chose. You could instead use Xamarin/.NET Core to write the server and both clients in C# (or F#) which would maximize your code reuse.
If you don't need or want to use a relational database, you could use MongoDB or a similar JSON document store. You could pass those JSON documents directly to your clients. That would reduce the amount of server side code you need to write.
Here is a good link for using Microsoft Azure Cosmos DB. there are loads of samples and best practices. Information on how to secure the database. how to use partitioning correctly. Cosmos DB is really easy to implement as you don't need an ORM. it has everything built in. I am using Cosmos DB for Xamarin app I am building. It is working great so far. The best thing about it is you can scale up or down pretty easily from the azure portal. below is a good introduction and all the samples you need.
Introduction
Getting Started
Samples
Hope this helps.
I'm developing a C++ App that performs image processing on images captured by labtop Cam. Once I got the image i need to upload it automatically to my Firebase database to be available for an Android App attached to my system.
How can i pass these images to Firebase. Even though, I know there is no SDK for desktop Apps to the Firebase. Is there any intermediary solutions can handle this Auto-uploading process?
You know that you can run scripts with C++ using system (you can find more here)
So write code that uploads the image with python or nodejs (choose your preferred language that has firebase SDK), And you can execute it anytime with your C++ program.
I need to create a HTML page with will interact with Sqlite database. This page and database will reside on an android device. This HTML page will be accessed by devices(PCs) connected to this android device locally. Since I have .NET background with no experience in Sqlite Or android etc, I am clueless as to what technology/language I will have to use. C# won't work I suppose.
Any suggestions? How do I go about it?
You can use the following tools/libraries to achieve what you want:
NanoHTTPD Server: A lightweight HTTP server for Android. You can read more about it on the Github project page. You can either use the bare server and add features like routing, etc. on top of it or use the Nanolets class provided by NanoHTTPD. There isn't much documentation around Nanolets but they are more-or-less like servlets for Android. To know more about them checkout this test file.
Room Persistence library: Room is a lightweight orm for SQLite developed by Google and is a part of the Android Architecture Components library. It abstracts away lots of boilerplate code you would have to otherwise write when using SQLite on Android.
Although, if you are just getting started on Android or are otherwise learning Android I would still recommend bare SQLite framework shipped with Android to know what is actually going on under the hood.
Using the above mentioned libraries, you can create a server on your device that can serve your requests. I would recommend that you develop a REST-like API for your service and interact with the API from JavaScript in the browser running on the PC.
You can use any JavaScript frameworks like Angular, React, Vue or even jQuery to build a single page front-end application to your service, bundle the JavaScript in a single package (using something like webpack) and ship the resulting bundle alongwith your Android app (preferably inside the /resources or /assets directory). You can the serve the bundle from Android device whenever another device connects to it, and then use the API to handle business logic.
I need to build a chatbot which does not takes any online support.
I am using:
Python chatterbot to build conversation dialogues.
Android's google offline speech recognition to convert speech to text and vice versa.
I want to train the model on my PC and use the generated database.sqlite3 file on android.
The complete flow of the process is as follows:
Pretrained model generated database.sqlite3 which is placed in android.
Voice -> Text -> Local Android Server which runs python script using database.sqlite3 and generates response(text) -> Text to Voice
Now I have the problem of running Python on Android with all the environment needed to run the script on android. Kindly help me out with this.
I have searched stuffs and found setting local server on android using NanoHTTPD/AndroidSync. Now I want to use this server to run python script
If you have any better alternative to any of the steps above, kindly suggest.
In my experience, trying to get Python running on Android doesn't sound like the best way to accomplish this. I'd recommend splitting your project up into two parts:
1. A web application hosted somewhere
You can create a regular web application using a Python framework like Django or Flask. This application can provide a RESTful API that allows other applications to exchange information with your chat bot.
ChatterBot has built-in support for Django and there are numerous examples of the two being used together available. You can also take a look at the "How do I deploy my chat bot to the web?" section for a brief overview and some tips on how to get started.
2. The Android app
The app can access Android's native speech recognition technologies to interpret verbal information before it sends the recognized text to your chat bot API server.
I have to make a project for android tablets, But i don't know if I can use Phonegap instead of learning Java. My application has to:
Talk with SQL server: update, delete, etc (using web-services) if there is no connection with server application has to store data in local then has to update to remote
Show current location of user in map (like navigation)
User can add location or information on the map, (like tracking objects on locations)
Application will use Internet, so application has to be secure, application doesn't have a lot of users maximum users will be 50.
So what do you think? If you work in Phonegap can you suggest me to use it or I have to learn Java?
Short Answer is No You don't Have to , You can use PhoneGap or if you are a .NET Fan-boy then use Mono For Android instead
PhoneGap
when you start your new application project you will just need to load your html page to the app and this is all you need to know about java , and from this point you will start implementing in your HTML document using javascript , html , css , phonegap to access mobile APIs , jquery mobile etc
The best way to Access a remote server data from you "Web based app " is to make ajax calls to the remote server so keep in your mind that you will use Jquery Mobile (or any other UI frame work that support this functionality )
PhoneGap Storage Provides access to the devices storage options.
PhoneGap Geolocation The geolocation object provides access to the device's GPS sensor.
if you will use PhoneGap and looking to have a native look app recommended is kendo ui it is a little pricey $200 but worth it
plus what Ridcully said in his answer "If you want to program for Android in earnest, you will have to learn Java and the Android API."
If you want to program for Android in earnest, you will have to learn Java and the Android API.
If this is just a one time task, I think all of the required issues might be doable with Javascript/Phonegap.