cyoni / Share-My-Story-Android

An Android app that lets users to post their stories either publicly or privately.
0 stars 0 forks source link

installation #1

Open carlostkd opened 4 years ago

carlostkd commented 4 years ago

Hello im looking for something like this app can you please provide a installation firebase guide to test the app? thanks in advanced

cyoni commented 4 years ago

Hi, yes I can do that for you. I will also have to add a class I did not add intentionally. However, I am busy this week so I will try do that this weekend.

carlostkd commented 4 years ago

Nice thanks in advanced i ill wait for that.

cyoni commented 4 years ago

I just uploaded the missing file. You can check it on the history. In order to run the app in your environment you need to deploy the functions in "functions/index.js" to your account.

You can read how to do that here https://firebase.google.com/docs/functions/get-started

And then you need to enable Google Sign-In in your Firebase and set it up through this tutorial https://developers.google.com/identity/sign-in/android/start-integrating

Good luck!

carlostkd commented 4 years ago

Thanks i will check

carlostkd commented 4 years ago

Hello, when i try to deploy functions im facing this error:

Error: Missing permissions required for functions deploy. You must have permission iam.serviceAccounts.ActAs on service account share-adventures@appspot.gserviceaccount.com.

To address this error, ask a project Owner to assign your account the "Service Account User"

its something from my side or related to the app?

Thanks in advanced

cyoni commented 4 years ago

It seems like that your project points to mine. You need to create a new app in your Firebase and connect it to yours in Android Studio and then try again.

carlostkd commented 4 years ago

i did that i also change the package name, added my sha-1 everything is fine on firebase side, on android studio > tools > firebase i have all green. i also have tried firebase use --add "my project name" but then on deploy functions i always get the same error.

cyoni commented 4 years ago

There must be a file that points to my project. It's all I know... I've never had that problem before.

carlostkd commented 4 years ago

ok, i tried to find that file without success , make everything from scratch and i get this error afther added google-json:

private void initGoogleOptions() { GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN) .requestIdToken(INSERT HERE YOUR TOKEN) .requestEmail() .build();

which token are this? i added my webclient id from the credentials page following this https://developers.google.com/identity/sign-in/android/start-integrating

but no luck thanks for your time.

carlostkd commented 4 years ago

ok have some progress here:

logged out from firebase cli login again now deploy functions works fine

i replaced your code: .requestIdToken(INSERT HERE YOUR TOKEN)

to this : .requestIdToken(getString(R.string.default_web_client_id))

created a new signed apk replaced the sha-1 on the firebase, replaced the new google-json on the app

now the app runs on the phone but canot sign in get error 10 on the firebase the google sign in is enabled, any sugestions?

cyoni commented 4 years ago

Visit https://developers.google.com/identity/sign-in/android/start-integrating

Scroll to: Get your backend server's OAuth 2.0 client ID

Then you need to paste your unique client ID in the first argument of requestIdToken.