FusedLocationProviderClient.getLastLocation() returns a Location that has isFromMockProvider() to false even if it comes from a mock provider - google-play-services

I'm sorry, this is not really a question but an observation :).
Since I can't find a bugtracker for Play Services, and it's my understanding that the Play Services team monitor this tag, this is my only hope.
We're trying to avoid mock locations in our app, and this is preventing us from doing so.
This is reproducible very easily with the 'Fake GPS' app.

Related

A Conceptual Understanding of APIs

I have been learning coding for about a month now. I have some good experience with Python, and additionally I have completed this web development course on Udacity.
Now, I have a good foundation for programming, but one thing that confused me a lot is how to interact with various websites and APIs. The course I did briefly touched on this in terms of XML and JSON files and how some webpages offer their pages in these formats for easier reading by other machines.
But there are still a bunch of tasks which I have no idea how to approach whatsoever, but want to eventually do. I have constructed some hypothetical examples for the purpose of this question. I will post my current rough understanding of how I would do them below each one, and would appreciate feedback (on the API interaction, not on the front-end or on any back-end algorithms/AI/parsing):
Creating a phone application (disregarding the front-end part) which can then communicate with and perform rudimentary tasks on my computer.
I have no idea how to do this, and my guess would be that I would have to look into some external application/API meant for this process and implement this on both-ends of the system.
Being able to write a bot which goes on to a game website and controls the object via script. (e.g going onto a pacman game website written in flash and automatically controlling the character to avoid the ghosts)
I don't even know if this is possible, or how browser flash games interact handle the user-server interaction. Would I have to post some data via HTTP manually in the same way that playing in the keyboard would do? Or is everything done client side, in which case how would I fake user input? How would I get information on the ghost's position to work the AI?
Creating a mobile app for my school by allowing users to put their username and password into the app and then having the app automatically log in to the school and fetch certain data (e.g timetable) and return back in a readable form.
I'm guessing that I would take the input from the user on my mobile-app, and then navigate to the school's login page and POST this data in the relevant forms to log in. And then that I would (somehow, not sure), navigate to the timetable URL through my code while still managing to stay logged in, and then parse the html there?
I would appreciate some detail on how these kind of things are done, preferably with reference to these examples, so that I can get a better conceptual understanding.
Thanks!
Note: I have asked all those various questions mostly rhetorically, just so that those reading can get a better understanding of what my current programming level and understanding of APIs is at. I do not expect nor require specific answers for each and every question (so I hope this doesn't get flagged as being too vague or requiring too much detail!), I just would appreciate some responses telling me roughly how each of these APIs work approximately and how I would even start at looking at how to do these things.
You asked too many questions and honestly speaking I am not able to read and grasp entire text posted by you.
So, I am focusing only the title of your question:
"A conceptual understanding of API"
API (Application Programming Interface) means a set of functions which you can directly use by simply passing parameters to them.
Actually, in application development there are many common functions which every application programmer have to use. So, instead of coding them every time by every programmer, they are already coded in functions which you can use simply by passing parameters to them (if they need any external parameter).
Example:
I am offering you a maths API, set of functions {add, sub, mul, div}. You can pass two numbers to any of these four functions and get desired result instead of coding every time for ever operation like add, sub, mul and div.
Hope it helps...

SaaS Classification

As I am largely self taught I often struggle with knowing the terminology surrounding something I logically understand, which can cause difficulty when I want to research more about it.
I (think I) know that an online service/API that your application can communicate with (e.g. through http) but which sits on another company's server falls under SaaS but may have a more specific name I am unaware of.
How is this distinguished from an application you download and install on your own server and still communicate with through an API e.g. PredictionIO?
It is very difficult to word a question when essentially I am saying 'I have literally no idea what I am talking about can you please steer me in the right direction' so I apologise for how poorly this is asked but that is what makes it so difficult to google!
What I am looking for is the keywords I need to conduct my own investigation and perhaps some good high level resources so I can familiarise myself with the classifications
Thank you
While PredictionIO is a great product (or was not sure after SalesForce acquisition), I wouldn't call that SaaS.
Most people refer to SaaS as a true hosted solution where a customer only needs to log in and create an account to get started. PredictionIO still requires infrastructure, management of VMs, etc.
Examples of SaaS would be Dropbox, Crashlytics, MixPanel, Sumo Logic, SalesForce, Stripe, etc.

testing unexpected user behaviour?

I'm discovering that I'm REALLY horrible at testing, and I think to write good tests, you have to know what the user is going to do.
As an example, I've recently taken over an ajax app. It is really well written (I think) and I made some changes to implement a new feature.
When I go through the flow as we expect a user will use the app, everything works fine, but somebody else came along and just started clicking around and broke a feature. It didn't fail catastrophically, but it is definitely a bug. I can't imagine a user ever doing this, but, there is a bug in the app and I missed it in my testing.
How do you manage these sorts of cases? How do you envision anything and everything that a user could possibly do with the app and then test for it?
I understand that every app has bugs, so I'm not looking for support in how to deal with accepting that I'm not perfect.
How do you make sure you're testing as many possibilities as possible, and not just the expected behaviours?
Obviously having a team of dedicated testers will help, and performing things like hallway testing or Bug Hunts with your development peers will provide you with some nice bugs.
But the truth is that you are simply suffering from the same thing most developers do when testing out their apps. I wrote about it in my blog here, and then I wrote about some techniques you can use to improve the tests that you do here.
Testing is not rocket science, but it requires some knowledge and the correct mind-set.
Good luck!
-joel
(BTW, not the same joel that Matty mentioned :-) )
You can't anticipate what the user will do with your app. The only thing you can do is to let as many people use your app as possible and as you've already seen that'll help flush out your bugs.
Try doing some hallway testing. Do you have dedicated testers? If not, Joel'll tell you why you should.

How to guarantee the continued functionality of my website with external APIs e.g Facebook Graph [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
With web APIs like Facebook constantly being updated and changed, any given change may take me a while to implement in terms of working out what has changed, and then updating it/correcting it.
If during this time a user cannot logon for example, they are not going to put their trust in my website.
So, how do you manage your dependencies on other services to ensure that if it works now it will work forever?
Well, frankly what you are asking for is that Facebook freeze their entire API and Graph implementation. This simply will not happen. In an ever changing technological world things are going to change. We as developers for a 3rd party platform are responsible for keeping up to date with any changes that 3rd party platform makes.
If you want to keep track of all the changes that Facebook are making to their API's then you should take a look at the Developers Roadmap. They list here all the changes that are being planned.
For serious changes, those what would essentially "break" the current functionality, Facebook guarantees at least a 90 day notification, before the changes are made.
Taken from the Facebook developers roadmap -
In the spirit of openness and transparency and to adhere to our
Breaking Change Policy, we publish this roadmap to help
developers plan for changes that may require code modifications. Like
all roadmaps, it may shift slightly, but we will share insight into
what is happening as details become available. We encourage developers
to subscribe to our blog, where we announce rollout plans and
timing.
Given all of this information, there are still things you can do to make sure your users always have access to your site. One thing would be to provide an alternative login method. It's really useful to be able to hitch a ride on Facebook authentication and seamlessly integrate your site's login with theirs, but what happens if one day Facebook (for some reason) goes down? That would mean that your users would be locked out of your site too! Consider offering an alternative if it is applicable to your situation.
Communication is key.
Most respectable web API providers (like Facebook Graph) have a developers blog, as well as mailing lists that provide feedback regarding upcoming changes to the API. Chances are, they don't want to break your app as much as you don't want it to break. So read the blogs, and/or subscribe to the mailing lists. And take note about upcoming "breaking changes" (as they're called.)
Additionally, it is up to heed their warnings and suggestions. If they say that a particular API call is deprecated, then there is a good chance that it won't be there after the next update. If a call you're making is deprecated, then make early strides to find an alternative method.

TokBox OpenTok Alternative? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I'd like to offer video chat on my website and was wondering if anyone can recommend an API/service that'll let me do so. I'm familiar with OpenTok, but not happy that it uses Flash. Also, the audio tends to have a lot of noise/feedback - unless you are wearing a headset.
Suggestions?
EDIT:
I'm using it for P2P right now, but do want to do group video chat in the future.
Flash is one of my primary concerns. I noticed Flash sometimes crashes when I'm using OpenTok. Though Flash crashes other times, too -- it seems to be more frequent when using it for OpenTok. I understand Flash has its benefits (the big one for me is that I can almost count on my users having it), but I'd like to explore other options if possible. Flash is supposed to be a dying technology?
Audio is the other major concern. There is generally an echo going on and a noticeable delay. Using the same set up (Internet connection, computer, mic/speakers, etc.) and comparing it to Skype, it's obvious that Skype is far more superior.
The player is my final concern. Here are the things I don't like about it:
I can't remove the top left icon that links to OpenTok. Thus, this isn't something I can truly white label.
The player comes with volume control, but not video control (e.g. to stop publishing, to stop subscribing). Instead, I am forced to implement my own via the API. Though the API makes it fairly easy to do, I don't think I should have to. Video control should be provided, just like volume control.
OpenTok for WebRTC should solve all the issues you've noted above. Find more info here:http://tokbox.com/opentok/docs/concepts/WebRTC.html
You may want to check out the API's provided by TenHands (http://www.tenhands.net) to see if this meets your needs. The integration should be fairly straight forward.
Now there is also EasyRTC (easyrtc.com)
To make clear what Gerry said. You can use EasyRTC to build and peer peer video conferencing application. Using easyrtc Lib you can easily make a group chat[video+audio+text+file transfer] within a short time, just see their demo. They already provide a good list of demo application and easyrtc lib is well documented.
Note that, easyrtc does not use flash they use WebRTC. And for video controller you can easily embed HTML5 video controller in the tag.
Thanks
Happy Coding
It seems that Twilio had a very good progress recently:
https://www.twilio.com/video
Here's a "comparison" list of API providers as defined by VSee:
http://vsee.com/api
An no .. I don't have any vested interest in VSee.