I am exploring the APIs provided by Google. Firstly, I was experimenting with Google Cloud Vision API with Python in PyCharm in order to try to perform Optical Character Recognition with various texts.
So I wrote a basic program in Python in PyCharm which was calling this API, I gave to it as an input an image which included text e.g. the image/photo of an ice-cream bucket and then takes the text written on this bucket as an output.
Now I want to test the barcode scanner of Google Mobile Vision API. So ideally I would like to call the Google Mobile Vision API in a python program in PyCharm which calls this API, give as an input an image/photo of a barcode and take as an output the details saved in this barcode.
My question is if this can be (easily) done with PyCharm or if I should download Android Studio to do this simple task?
In other words, can I call easily a mobile API in an IDE which is not for mobile app development like Android Studio but in an IDE for desktop applications like Pycharm?
It may be a very basic question but I do not know if I missing something important.
The mobile vision API is designed only for Android and iOS. As far as I know, Pycharm does not work well with Java, so I would say that you would have to create an Android/iOS project in order to test it (It would be a lot harder trying to make it work with python than simply installing Android studio and cloning a mock project).
Related
I have just started exploring Firebase ML Kit by Google to test out face recognition capabilities. I tried official samples and it's working well.
Though, according to it's official documentation, we can schedule an install time download of the ML models required, I need a way to pre-install the models into the Android device itself, so it could be utilized in my app whenever in Offline scenarios(w/o internet).
If there is one, it would be of great help for my use case.
Thanks.
As of now, with ML Kit you cannot pre-install the face detection models on to the device in that manner. Like you mentioned, the models can be downloaded at install time, but the question indicates that you want beyond that - i.e. there is no internet during install time. If no internet, then the app cannot be downloaded and installed, which will limit your distribution.
UPDATE
[Confirmed from the comments that the user wants the models to be available offline even without downloading once during install time.]
As of now, that is not supported for built-in models like face detection.
However, if you use custom tflite models (i.e. bring your own model as opposed to using built-in models) with ML Kit then you can bundle it within your app when you build it on your desktop and distribute manually like you suggested. Here is the documentation for the custom model API which also contains links to quickstarter apps for Android / iOS.
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 a 30 line Java Android app which uses WebView to connect to our website. The website was the real development and it does all the work for scaling and adjusting. The app simply makes a WebView browser connection to it, plus it catches connectivity errors and uses Toast for some messaging. All is about 30 lines of Java, using Eclipse. The app is done, fully tested, signed and is being deployed to play store.
I want to have the same app supported on iphone and ipad. My question is this:
Is xcode and rewriting the app in Objective C the fastest and best path to port the app from Java/android to ios? Is there a shortcut? Is there a translation or transformation utility available?
Phonegap/Cordova doesn't seem to be applicable here (or is it?) as the app is not a js/html/Css app. I also understand that there are no plugins for ios in Eclipse. There are tutorials on how to do this in xcode (e.g., http://conecode.com/news/2011/05/ios-tutorial-creating-a-web-view-uiwebview/) but was wondering if there is a better path.
I remember a university project a few years back that was trying to build the translator from java to objective C plus all the needed ios libraries. Not sure if it became a product at any time.
Any pointers is appreciated.
The best path is using Objective-C or Swift in XCode, since WebViews are available in iOS too, and your app will be of a length comparable to the Android version.
I have one simple question, that is can I convert my android .apk app into ios using any software? If yes, then please give me the name of that software. If any alternative method for that please guide me.
Google has a tool to convert the back-end, nothing for front-end though
http://www.xda-developers.com/google-tool-helps-developers-port-android-apps-to-ios/
There is a new startup that clains to convert the APK to IOS.
It's called MechDome.
The goal is very simple and attractable:
Reduce time to market by eliminating cross-platform development. Automatically convert your existing Android apps to high-fidelity, native iOS apps.
There is nothing out there that would convert apk into ios app. To my knowledge there is also nothing out there that could translate android code to IOS. The operation is simply too complex for a simple tool to manage.
However, there are tools you could use to make your apps (developed by you) work across multiple platforms. I'm sure there are more, but here are 2 of them I found in minutes (look into them if you are interested): Apportable, Phonegap (discontinued as of 2020/03. It was made obsolete by ProgressiveWebApps - PWA).
In past decade or so WebApps have been picking up for anything that is not too graphically demanding as they can run on anything that has a Web Browser. With this style devs pretty much open their website in a platform-specific executable and it looks like an app.
As for your existing app depending on complexity of your software you have to rewrite from a little to a lot of code to adapt to IOS APIs.
In short: No. Unless your app is build on multiplatform framework, converting means manual adaptation.
There is no known way to convert an android app to iOS. MechDome which is a Developer Tool that Automatically Converts Android Apps into iOS Apps seems to have stopped as of 30/03/2021. link
However if it is your plan to launch android and iOS app from one coding project, use Flutter which allows you to launch on both platforms simultaneously.
Flutter is Google’s mobile UI framework that provides a fast and expressive way for developers to build native apps on both iOS & Android, using a single codebase.
Get started here link
I've been playing for some time with python and matplotlib and managed to create some neat desktop applications. [like graphical analysis tool for linear algebra, rendering engine for maps etc.
I was wondering if I could turn these applications into android apps. I'am completely new to android. I plan to use python (though I'm good with java) for the coding (I know this is possible with tools such as kivy or SL4P).
I want to know the limitations for using these tools in android. Can I even get matplotlib into android? I searched everywhere, but couldn't find how to go about a matplotlib based android app.
Any kind of pointers would be helpful.
I doubt you can embed matplotlib on an Android device (or any other kind of smartphone or tablet).
One alternative possibility would be to make your app connect to a back-end server that has matplotlib, and use that to generate the figures and send back images to the client.
Advantage: Can potentially get a working mobile prototype finished somewhat quickly by reusing existing code.
Disadvantage: The app cannot work offline since it relies on your central server.
Matplotlib cannot be compiled for android, numpy can though:
https://code.google.com/p/android-scripting/issues/detail?id=260