Skip to content

jvgogh/friendlyping

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Friendly Ping

Friendly Ping demonstrates using GCM, Analytics, Sign In and AdMob together in a single application.

You can use this as a reference for how to implement your own basic application.

Getting started

Clone the code of the project:

git clone https://github.com/googlesamples/friendlyPing.git

To get started, you need to enable Google services for your app for at least one of the two available clients.

Android

Get a configuration file for your android app opening the following link in a new tab: https://developers.google.com/mobile/add

Use com.google.samples.apps.friendlyping as package name when creating your project, and enable the following APIs:

  • Google Sign-In
  • Cloud Messaging
  • Analytics
  • AdMob

Download the google-services.json file into friendlyPing/android/app/ If you want to check out the code, open Android Studio, select File > Open, browse to where you cloned the friendlyPing repository, and open friendlyPing/android (if you are in the Android Studio start screen, you can select Open an existing Android Studio project and use this same path). Don't build and run the client until you have one of the server running.

Note: if Android Studio cannot resolve @string/test_banner_ad_unit_id, it should not be a problem and you should still be able to build and run the app.

iOS

Make sure you have CocoaPods.

Open a terminal window and navigate to friendlyPing/ios, then run:

pod install

This creates a FriendlyPing.xcworkspace file in the folder. Run the following command to open the project in xcode:

open FriendlyPing.xcworkspace

Get a configuration file for your iOS app opening the following link in a new tab: https://developers.google.com/mobile/add

To configure the project, you need to provide a valid APNs certificate and some additional information to get a configuration file and finish setting up your project. If you don't already have an APNs certificate see Provisioning APNs SSL Certificates. When prompted, provide the Bundle ID associated with your APNs certificate, and enable the following APIs:

  • Google Sign-In
  • Cloud Messaging
  • Analytics
  • AdMob

Download the GoogleService-Info.plist file to your mac, then add it to the FriendlyPingSwift target in the xcode project. To configure Google Sign-In:

  • In the **Project > Target > Info > URL Types** panel, create a new item and paste your REVERSED_CLIENT_ID into the URL Schemes field. You can find your REVERSED_CLIENT_ID in the GoogleService-Info.plist file.
  • Also in the Project > Target > Info > URL Types panel, create a new item and type your bundle identifier in the URL Schemes field.

Don't build and run the client until you have one of the servers running. Dont' run 2 servers though :).

Go server

Read the Go server instructions. You can get your Server API Key and Sender ID for your project from its Download and install configuration page at https://developers.google.com/mobile.add.

Java server

Read the Java server instructions. You can get your Server API Key and Sender ID for your project from its Download and install configuration page at https://developers.google.com/mobile.add.

How to make contributions?

Please read and follow the steps in the CONTRIBUTING.md

License

See LICENSE

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 70.5%
  • Swift 21.4%
  • Go 7.3%
  • Other 0.8%