Problems with the Google Places API AddPlaceRequest - Android Studio - android-studio

I'm in the process of creating an application on Android Studio which allows a user to select a location on a map and add some details to that location - E.g. Select a football pitch and add some details to it such as 5 a side football match on Sunday at 12 o'clock.
Once these details are saved that location is saved onto the map along with those details.
I've decided to use the Google Places API as it has the AddPlace feature. Instead of adding a business to the map like the API was intended for, I want to tweak it so it can add an event instead.
However, the example found here at:
https://developers.google.com/places/android-api/add-place
Does not work in my application.
Here are the screenshots:
Code Snippet
Any help would be greatly appreciated - Thank you
G

The Add A Place function of the Places API isn't a good fit for what you're trying to do. Add Place is designed to allow users to add places that don't currently exist in Google Maps' database. It sounds like what you want to do is attach some metadata to a place that has meaning only to your app.
So, you'll need some persistent server storage for this metadata. There are lots of ways to do this but you might want to look at Firebase Realtime Database as a solution.
Also, from the screenshot, it looks like your error comes from not having defined mGoogleApiClient in in your app.

When you want to make a connection to one of the Google APIs provided in the Google Play services library (such as Google Sign-In, Games, or Drive), you need to create an instance of GoogleApiClient ("Google API Client"). See here: https://developers.google.com/android/guides/api-client

Related

Is sharing Google Analytics tracking id safe?

I currently creating a cross platform desktop application using Electron. I wish to add analytics to view user metrics. When I try to find for existing packages that provides metrics info, I found electron-ga.
The package uses GA to track user metrics and to set it up I need to include GA tracking id in my app. My question is, if I include the tracking id in an electron app and distribute my app, everyone can look at the tracking id and steal it right?
I would like to know if using this method is right?
Thank you.
It will be anyway publicly available (e.g. you can find the ga ID through the source code of any site that uses Google Analytics).
It can get very bad if someone wants to harm you, as he can just plug your ga ID in any of his sites unless you are prepared and protected.
What you can do to be sure that even if someone has your ga ID, he can't make use of it, is the folowing.
Go to your Google Analytics profile and create a custom filter. Choose "Hostname" for the filter field and fill the filter pattern with your site (e.g. mysite.com). Don't forget to use the "\" before of any ".".
This way, only this specific address will be able to make use of your ga ID.
That is ok. You could see many people push the ga id at website or app.
It is necessary. If you don't add tracking id to ga code. Then you cannot track user.

Creating an app to provide user with offline map and offline routing using Android Studio

I am trying to create a mockup of application that will allow user to use the app to navigate in a city.
The reason the map needed to be online is that my application needs to modify the mockup traffic light in the map based on traffic.
Currently I tried to OSM since Google map doesn't provide any traffic light data.
My problem is I have no idea how to create an offline map, by using OSMAnd, I am able to create an OBF file using OsmAndMapCreator, after that I have no idea how to implement it (I cannot find any tutorial online).
I also don't know which offline routing service to used, I have find that OSMAnd can be used to provide navigation but I don't know how to implement it in a new app.
I am sorry if this is off topic or being a vague question, but I have no more choice.
Thank you.

White-Label a UWP Application

I am about to start development on an UWP Application. One of the last minute requirements was to be able to support white-labeling the application for our partners. Does anyone have any experience doing this using the Universal Windows Platform that would be willing to give me some insight on resources I should be looking at?
Some basic questions I have is:
Is it possible? I read about it being done with iOS and Android.
How do you create the AppPackage for each partner?
Localization differences? Where one localization may refer to it as one product, but another refers to it as the other product.
Or is this something where I would bundle everything up and send it to the partner to create their own upload? If this is the case, is there a how-to on that?
Some of these might be basic questions, but this is the first time I have created a white-label application, so it is all new to me.
Have just replied to another one topic and looks that screenshot is still needed)
When you submit App to store you can find option:
This way you can make your app visible only to your partners. And you can also register as many apps as you like (each one for separate partner)
Or you can distribute your app thrue Windows Store for Business.
Take a look also at this link, it might be helpful for you
Distribute LOB apps to enterprises

Add a place to google maps with node

I am working on a little project that I would allow me to update the location of a food truck that moves often.
I know there are apps that one could download but I'm hoping to avoid telling people to download ANOTHER app to keep up, instead it would be awesome to just have it searchable on google maps and have GPS directions to the truck available.
I see that the places API allows adding and deleting of places, I'm not sure how long that takes to update but I will figure that out once I can actually add a place.
Has anyone been able to succesfully do anything like this before with node? I understand that the javascript API will not do add requests so it seems node is the best solution here.
If you look at the places API, Google said:
When you add a place, the new place is available immediately in Nearby Searches initiated by your application. The new place also enters a moderation queue to be considered for Google Maps.
So your truck won't be visible on the Google Maps until after Google Maps decided to add it. But more than this, if you look at the deleting section:
A place can only be deleted if:
*The place was added by the application that is requesting the
deletion.
*The place add request has not successfully passed through
the Google Maps moderation process, and the place is therefore visible
only to the application that added it.
Which is, in other words, you would not able to update its position ever again after they approved your location.
In stead, you should use the Javascript API to make your own webapp, to get something like this http://planefinder.net/flight/CPA872
UPDATE
Unfortunately, Place Add has been deprecated on June 30, 2017 and will stop working on June 30, 2018. So you cannot use this method anymore. For further details please refer to the corresponding geo blog post.

search contract within the Metro app of Windows8

I would like to know how can I implement the search contract from within the app, to search/find a few files present inside the application.
As far as I know, there are a lot of articles especially from msdn, blogs, etc which helps us create a normal search contract to search/look for apps/books, etc on win8 system, but I have not come across any valuable source for implementing search within the app.
Your response will eb of great help to me :) Thanks in advance..!
As I know, you can add a search contract using Add a New Item command in Visual Studio. The IDE will register the appropriate handlers to catch QuerySubmitted event or Search Activated events. The former is used for capturing search event while your application is the main app on screen and the second one is for situations where your application is not running as the active app.
What you search in your application isn't important. It's completely your own business. You can search for files inside your apps or anything else.
Recently I've read an article on MSDN about this. Maybe useful for you too
Adding search to an app
Also similar issue here on StackOverflow

Resources