I am trying to implement Microsoft Azure Cognitive Service Face Api for face recognition. Followed by https://go.microsoft.com/fwlink/?linkid=2184104 i created .NET Core console application and everything works fine. Now i would like to use this code in android app, but i am pretty stuck. Should i create rest api from existing C# code? Or there is android library that allows me to use face api directly like in console app?
Since Cognitive Services are already APIs, you could talk to the API directly and process the response right inside your Android code.
Please keep in mind that this does leave a potential security issue if the application is meant to go into the store / public. Users could look at the traffic or decompile your app, find your access keys and use your Cognitive Service for their own applications. In that case it could be interesting to wrap it in your own API and have some security checks in place there like rate limiting or call quota. Of course you need to make sure to use your access key inside of your own API to hide it from being seen externally.
Still, this leaves room for abuse. You now implemented a public API that, again, anybody could talk to. There are quite a few interesting discussions found on this, like this question right here on Stack Overflow: Restrict API requests to only my own mobile app.
Related
I am thinking of building an Android app that fetches Notes and Reminders associated with an Apple ID. Is it possible to access them with http requests somehow? icloud.com uses their data, so I thought maybe it is exposed via some API, but I cannot find any documentation.
There is none. The only thing exposed so far is the CloudKit api which is for accessing key value data that you created yourself.
If you want to access reminders, then you can use the iOS native api:
https://developer.apple.com/library/ios/documentation/DataManagement/Conceptual/EventKitProgGuide/ReadingAndWritingReminders/ReadingAndWritingReminders.html
A hacky solution that I use for getting the reminders I create or mark as done is IFTTT (https://ifttt.com/). You can download it on your phone. This has the option to get the reminders values out to a google document, google sheet or other place that you can later easily grab from with the google API. That is what I am currently doing. In addition if your intention is to create reminders you can use pyicloud (https://github.com/picklepete/pyicloud). Its small project that I am also using. Feel free to contribute!
I know that some may not like this answer, as it may be a very gray area, but assuming you had the user’s permission, you might be able to make your own API with a scraper tool that can expose an API to the data. This way you can make an Android app that accesses the user’s iOS data via the icloud.com site and then allows them to use it/manage it via your app on their Android devices.
Do a search for scrape tools and you’ll find loads of them available now. Their pricing often includes a free tier that may or may not be adequate for your purposes. ParseHub is a great one. There’s others out there that can get around certain troublesome limitations of the browser that ParseHub has if you find yourself stuck.
If the app you make has good success then it may be a good investment to pay for the upgrades.
If I have a website and an android application, it is correct to build a Rest API service to use it in both (web and app).
This way is more flexible to make changes one time right?
I'm using Hapijs and Catbox-Redis to handle the session store, also I am working on separated projects to deploy the API and Web projects on separated servers.
It is correct to use one API service for the Android Application and the Webpage?
It is absolutely appropriate. This is one of the big advantages of a services layer. It is very likely you will need some things that are specific to each, but most things will be common.
The really great thing will be when you have to write the THIRD interface that you don't know about yet (Google glass, apple TV, android watch, SOAP, who knows)
I'm trying to create a new user in IAM using Amazon web-service SDK for Android.
But after searching a lot I couldn't find any sample codes or documentation clearly stating the above functionality. I saw this and also this.
The first link only works for Java SDK only.
So my question is does AWS SDK for Android support a way to create a new IAM user programatically?
I also faced the same problem.I mailed AWS technical support team for solution.They clearly stated that android sdk for aws does not supports the new user creation for IAM.
Actually I am not sure about IAM implementation for Android, as a Web Service you can use them in a deeper level anyway, but I don't think this is your needs.
I suggest you read IAM Limits, which shows some limitation on users number, which may be a problem for future growth.
In your scenario I would suggest this article which will require another layer to control user authentications with token control, it will solve user limitations, will give you a lot more security and control over your system.
After all, you can still using IAM for user's power level control, as another security layer.
I've been reading through developers.google for a few days now and this process is still confusing me.
As far as I can tell, I need the following:
An Android application
A Java App-Engine backend that uses Endpoints (still not quite
understanding what these are).
Code within this backend that connects to my Cloud SQL instance.
My problem is that none of Google's examples seem to have an Android/Cloud-SQL example.
I've been using this guide on how to create an Android app with App Engine backend. But then it uses Google datastore stuff, I think? I need to use SQL rather than this.
In this guide there is mention of App Engine, but for a JSP web form front-end, and no mention of Endpoints.
So my questions boils down to, have I got the right idea with using EndPoints + Cloud SQL, and if yes, how does one achieve this? I'm quite a JDBC newbie in general, so I'm not quite sure how to achieve this off the top of my head.
you are on the right track.
Just for the record, if you don't have strong reasons (yet) to go for a SQL data store, do consider using Google Data Store as it is better seamlessly integrated into the SDKs and after a couple of compromises it should help you pushing your data design to scale nicer.
Let's split it into parts:
First you have your backend/api. This is basically your piece of code that operates on Google servers, which you'll access on an remote connection basis (http, socket, etc) - (same as most of the APIs we know work). I don't know which programming language you are using but here is some basic set up for your project and Cloud SQL on Python.
Cloud Endpoints is nothing more than a very cool feature that App Engine brought recently to avoid all the mess of creating and updating your client libs over and over again. It basically automates that task for you, by using annotations or references you put in your backend code to create client libraries for Java, Objective-C and JavaScript that you can then integrate into your clients.
Example: Let's say I have a controller on my api to operate with bananas, that has a method to delete a banana from the api. Annotating that method on your api code, will let endpoints script know that this methods is there to delete bananas, thus it'll gather it and include it in the generated clients libraries, so that you don't have to do that manually for any of your clients, nor every time you update you api code. [Here's] some documentation.
Android Application. That's certainly your business :) But I'm sure having your api libs already generated already helps a lot.
Hope it helps. Let me know if you need to get more into detail.
I created a game in Java using Libgdx framework. Now I would like to know if it is possible to use Google Play Game Services in a desktop (java/.jar) game, or is it meant just for mobile devices?
As I am faced with the same question, I do not have a complete answer, but I think the short answer is yes, you can.
But you'll have to use the rest API instead of a nice java API, and some features are not available (such as the real-time online multiplayer support). You can see the reference here:
https://developers.google.com/games/services/web/api/index
As you can see, the major stuff like anchievements, leaderboards, and turn-based multiplayer services should be available (and you can even see there is stuff like joining rooms, but they are marked as "For internal use by the Games SDK only."), so I guess the REST API covers the major needs.
I have yet to test this on a desktop aplication and for sure you'll want some support library to help with the quirks of the HTTP-REST protocol, but I think it is feasible.
EDIT: Since this API is meant for the web, you may still need some kind of initial JavaScript interaction with the user (using google's JavaScript libraries) in order to authenticate the user first, but the rest of the interaction can be done "server-side" (and in any language you want). Read this for more details:
https://developers.google.com/games/services/web/serverlogin