-
Couldn't load subscription status.
- Fork 590
Integration Firebase Functions #108
Integration Firebase Functions #108
Conversation
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
samples-refs_heads_mobile-auth-mobile-mobile_proxy_server-android_app/.gitignore
Show resolved
Hide resolved
samples-refs_heads_mobile-auth-mobile-mobile_proxy_server-android_app/app/build.gradle
Outdated
Show resolved
Hide resolved
samples-refs_heads_mobile-auth-mobile-mobile_proxy_server-android_app/app/build.gradle
Outdated
Show resolved
Hide resolved
...fs_heads_mobile-auth-mobile-mobile_proxy_server-android_app/app/src/main/AndroidManifest.xml
Outdated
Show resolved
Hide resolved
...erver-android_app/app/src/main/java/com/example/mlapitest/utils/KnowledgebaseManagement.java
Outdated
Show resolved
Hide resolved
|
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
dialoflow/app/src/main/java/com/google/cloud/examples/dialogflow/ui/ChatActivity.java
Outdated
Show resolved
Hide resolved
dialoflow/app/src/main/java/com/google/cloud/examples/dialogflow/ui/MainActivity.java
Outdated
Show resolved
Hide resolved
dialoflow/app/src/main/java/com/google/cloud/examples/dialogflow/ui/WelcomeActivity.java
Outdated
Show resolved
Hide resolved
dialoflow/app/src/main/java/com/google/cloud/examples/dialogflow/ui/WelcomeActivity.java
Outdated
Show resolved
Hide resolved
dialoflow/app/src/main/java/com/google/cloud/examples/dialogflow/ui/WelcomeActivity.java
Outdated
Show resolved
Hide resolved
dialoflow/app/src/main/java/com/google/cloud/examples/dialogflow/utils/KnowledgebaseUtils.java
Outdated
Show resolved
Hide resolved
dialogflow/app/src/main/java/com/google/cloud/examples/dialogflow/utils/ApiRequest.java
Show resolved
Hide resolved
| @Override | ||
| protected void onPreExecute() { | ||
| super.onPreExecute(); | ||
| showProgressDialog(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this line gone, you can remove the onPreExecute() method override now that we just use the default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
dialogflow/README.md
Outdated
| - [Create a Service account](https://cloud.google.com/iam/docs/creating-managing-service-accounts) with the following IAM role: `Dialogflow API Client`. Example name: `dialogflow-client`. ([For more info on: how to add roles to a Service Account](https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource)) | ||
| - Under Dialogflow-client, Click on edit permission icon on the right and add another role as follows and save the changes: | ||
| - Dialogflow Client | ||
| - Dialogflow Reader |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooo let's add a small note that sorta explains why we chose each Role.
- Dialogflow Client (Used by the app to make detect intent requests)
- Dialogflow Reader (Used by the app to list knowledge bases)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
|
Oh I forgot about this one, we need to add the LICENSE to the top of the java files. |
| */ | ||
| private void showProgressDialog() { | ||
| AlertDialog.Builder builder = new AlertDialog.Builder(this); | ||
| builder.setMessage("Please wait..."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: "Please wait..." --> "Fetching auth token..."
Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
…ocs-samples * 'master' of https://github.com/deekshithreddyr/android-docs-samples: Update README.md Update README.md
dialogflow/app/src/main/java/com/google/cloud/examples/dialogflow/utils/ApiRequest.java
Outdated
Show resolved
Hide resolved
|
I think my last 2 big things are:
To something under 100 columns. |
|
Hi there, |
index.js Link update
…ocs-samples * 'master' of https://github.com/deekshithreddyr/android-docs-samples: Update README.md Code readability update
| public static void playAudio(byte[] byteArray) { | ||
| MediaPlayer mediaPlayer = new MediaPlayer(); | ||
| try { | ||
| File tempFile = File.createTempFile("dialogFlow", null, Environment.getExternalStorageDirectory()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename temp file to speech2speech or something similar.
| } | ||
|
|
||
| class Holder { | ||
| TextView text1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can text1 be a bit more descriptive?
Not sure of its purpose
| getNewToken(); | ||
| } | ||
| } else { | ||
| Toast.makeText(this, "Please enter or say some message to send.", Toast.LENGTH_SHORT).show(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: Let's switch this to just Please enter a message
I tried with the voice and not saying anything and the audio already has a way to detect if nothing is said and they only press the send button when typing, where the audio is automatically sent.
| setContentView(R.layout.activity_settings); | ||
|
|
||
| if (AppController.PROJECT_ID.equals("GCP_PROJECT_ID")) { | ||
| Toast.makeText(this, "Please update the GCP_PROJECT_ID in strings.xml", Toast.LENGTH_LONG).show(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to have this toast happen but not shut down the app?
I forgot to update the strings.xml and took me a few openings to notice the toast message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Side question that I don't know if it is possible, but can you retrieve the project id from the google-services.json file?
IF so, that would be neat.
| @@ -0,0 +1,13 @@ | |||
| *.iml | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a README for speech to speech
| protected void onPostExecute(List<Language> response) { | ||
| super.onPostExecute(response); | ||
| if (TextUtils.isEmpty(sourceLanguageCode)) { | ||
| sourceLanguageList.addAll(response); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing this is me not having set up the correct permissions yet, but I got an error and crash.
java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.Object[] java.util.Collection.toArray()' on a null object reference
at java.util.ArrayList.addAll(ArrayList.java:588)
at com.example.translate.ui.SettingsActivity$LanguageList.onPostExecute(SettingsActivity.java:304)
at com.example.translate.ui.SettingsActivity$LanguageList.onPostExecute(SettingsActivity.java:283)
| Map<String, String> data = new HashMap<>(); | ||
| data.put("deviceID", firebaseInstanceId); | ||
|
|
||
| FirebaseFunctions.getInstance() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After an hour or more. I got some weird message:
No description provided.