Real Time Database on Android with Google Maps - php

we have a android project that needs the following objectives:
*we also have a web application for this app that needs to communicate with the same database as the android application
what I have done so far:
a view of a map with a pinpoint on my current Location
mysql db containing information (including latitude and longtitude position)
registration and login
Real Time Database Objectives:
state that people are online or offline(updating a database).
Google Map Objectives:
When I press a button, the map will show other users who are online within a given radius so basically I need to view online people who are near me
Send a message to them [2 ways]
2.1 I send them a message by clicking their icon
2.2 I send everyone[online people within the radius] the message
Questions:
I am currently using php mysql for login/register. Can I use this for a real time database or is there any other way?
is Firebase somehow similar to a hosting site?
if there are other needed information needed, pls inform me, I may not have included information that could help with my questions :)
ill update my question too if I have more questions.
thank you.

I think for your requirements its is more appropriate to use Firebase as it fulfills all your expectations and provides additional features.

Related

Develop a website that tracks phones using GPS

We are currently halfway developing our thesis and there's a certain module we are having a hard time with. It's about a module that locates the position of a mobile phone using GPS.
We are developing a port management website and we need that module to keep track of people getting in and out of a particular area. we just need to integrate the mobile phone's GPS and have it tracked on the website.
We are new to this technology so we apologize if the question is quite vague. we appreciate your answers! thank you!
We are developing this kind of applications for long and what I feel from your question is that you are trying to simply track the mobile phone! If it's an iOS, you can make an app and install it to send the GPS data to an web service (preferably RESTful) and again fetch the data on the web site from that same service to track the phone in real time. Most of the companies use this approach to track anything (Car, Person etc.) that carries a cell phone.
Explaining your end goal or sharing a bit more of your target may yield better replies.
You actually don't need to create an app.....
You could create a webpage and get the location of a device by using HTML5 Geolocation and send the location to server/webservice. However, this means that you need open the page with a browser to get it working.
As for keeping track of people getting in and out of a particular area, you could get the GPS co-ordinates of the two corners of the area, and well, after that, do the math to calculate if its within the bounds or outside.
create one android/IOS app that constantly updates it's co-ordinates (lang-lat) to database present on the webserver .
you will need following things
1)mobile app Android/IOS , it will send mobiles location using GPS to webservice
2)webservice that receives position from mobile apps and updates position of mobile in database.
3)website that will fetch data from that database and perform operation eg.suppose if user in certain area
if (location==chicago city) ##check the lang-lats for location from database
{ do this }

Fusion Tables insert row with PHP basic example

Is there is an updated PHP client library for Fusion Tables? or maybe a very concrete copy+paste insert rows example?
I I have visited https://code.google.com/p/google-api-php-client/ and downloaded their latest release file, but while having examples for lots of other google apis, I can't find any mention of fusion tables examples.
Additionally I have been trying to get https://github.com/marciuz/fusion-table-php-api-and-shell fantastic project to work, but keep receiving "invalid credentials" errors when using my fusion tables enabled server api key with his shell or with the php examples he uses. This is even for basic SHOW TABLES commands.
Is there a scope issue here I am missing?
Is there a very simple php example I can use to just copy and paste my credentials (clientID, client secret, redirect uri, api key) into and get right to inserting rows into my Fusion Tables? Maybe something like Invalid Credentials Error when passing Oauth 2.0 Access Token to Fusion Tables API in PHP, only hopefully it includes how to create the access token, and helps to insert rows instead of modifying styling?
I am trying to not reinvent the wheel on this one, and have been looking high and low for a simple working example to insert rows, that is not over my inexperienced head. Thank you, this has been literally driving me crazy.
Here is what worked for me:
"Ok so I finally got this to work and I thought Id share this with everyone In case you get stuck like I did. One step that seems to be missing from all usage examples I've seen is the service account email address needs to be added via Google Docs.
Select the document (FT) in Google Docs Click "Share"
Select "Add People" Enter your service account email address, e.g. myservice...#developer.gserviceaccount.com Ensure "Can Edit" is selected. Un-check "notify people via email" Click "Share and Save"
This was a complete guess on my part but seems to have fixed my problem. I can finally insert into my FT via my service account. Hope this helps."
For anyone else looking out there, I found this code and fix very useful for finally getting a solution with the google-api-php-client. https://groups.google.com/forum/#!msg/google-api-php-client/9d2lQAppTvg/vh8CRhWJb_YJ

Integrate Google Drive with my CRM to allow creation and collaboration on files

Here is the deal - our internal CRM is used for managing the huge amount of estimate requests we receive each day. The software is built with php / codeigniter / mySql. It allows our sales team to store a lot of information regarding the lead and when the time is right, generate estimates and even contracts.
Let’s focus on the contract.
When the user hits the "Create contract" button, the software gathers all the information like Client name, address, social security number and stuff like that. Using this information and a couple of On/off options it generates the contract dynamically. Of course it always needs some editing, that’s where my problem starts.
The user has to edit the document in a TinyMCE box - sort of a WYSIWYG editor. This editor sucks for complex editing.
We use Google apps for business, so here is what I would like to do: When the user hits the Create Contract button, the software has to gather the dynamic information and create a file on Google Drive with our contract layout and information. Then the user is free to edit the file using the Google Drive interface which is great.
Does anybody know a approach for this?
Best regards and sorry for the bad English.

Google Checkout and PHPMyAdmin

I am creating a website with a google checkout link that lets customers purchase a digital product. This digital product is a credit to their account on the site. Therefore, I need to know how to make the completion of a google checkout order change a field in my PHPMyAdmin database. I would very much appreciate your answers.
phpMyAdmin is merely an administration interface to a database called mySQL.
Consider working through a basic PHP / mySQL tutorial first to get a fundamental understanding how these things work - especially if you're programming things in connection with commercial activity.
https://stackoverflow.com/questions/1610543/recommended-way-to-learn-php
However, a good and complete code sample that you could derive from can be found here:
Good tutorial on how to update your Mysql database with a PHP form?
You need to implement a web service on your server as described in the document Implementing the Notification API. You can do whatever you want in your web service when you receive a notification, including updating your data base.

trying to find a web service

i am trying to find a web service that allows a user to send a company name (or better still will return a list of all company names, thus allowing the user to select one) and then get the share price, this will then feed in to another api - yahoo currency converter to work out the price of the share
the issue i am having is that i cannot find a web service to get share info, google registration for theres does not seem to be working and as such i dont no what to do
i am to be coding this in php
if anyone could point me to a good web service i would appreciate it
thanks
edit : i did find this but am unsure if it is appropriate http://www.xignite.com/xGlobalQuotes.asmx?WSDL
How about:
http://www.sharepricewebservice.co.uk/
They get their data from Yahoo Finance, so I'm sure Yahoo would have an API somewhere. This page may help: http://developer.yahoo.com/finance/

Categories