Comments (24)
- Delete everything
- Clone
[email protected]:twilio/twilio-chat-demo-android.git
- Switch to
java
branch - Copy
google-services.json
which includescom.twilio.chat.demo
andcom.twilio.chat.demo.debug
client_infos tochat-demo-android/
folder. - Build.
Do NOT modify any names until you have built successfully in step 5.
from twilio-chat-demo-android.
You only need to edit the google-services.json file.
Find a section that google has generated for you - it contains your package name without flavors.
It's inside an array - copy the entire JSON object in that array to make another instance of it and simply rename the package.
E.g.:
in your original json file
{
"project_info": {
"project_number": "some number",
"firebase_url": "https://some url.firebaseio.com",
"project_id": "some id",
"storage_bucket": "some bucket.appspot.com"
},
"client": [ <-- here is the start of the array
{ <-- this is the first line you need to copy
"client_info": {
"mobilesdk_app_id": "blabla",
"android_client_info": {
"package_name": "com.twilio.chat.demo" <-- this is the package name
}
},
"oauth_client": [
{
"client_id": "other stuff",
"client_type": x
}
],
"api_key": [
{
"current_key": "very secret key"
}
],
"services": {
some services here
}
} <-- this is the last line you need to copy
], <-- this is the end of the array
"configuration_version": "1"
}
in this file you will copy the marked section, rename only the package id in the second copy and get something like this:
{
"project_info": {
"project_number": "some number",
"firebase_url": "https://some url.firebaseio.com",
"project_id": "some id",
"storage_bucket": "some bucket.appspot.com"
},
"client": [ <-- here is the start of the array
{
"client_info": {
"mobilesdk_app_id": "blabla",
"android_client_info": {
"package_name": "com.twilio.chat.demo" <-- original package name left as it was
}
},
"oauth_client": [
{
"client_id": "other stuff",
"client_type": x
}
],
"api_key": [
{
"current_key": "very secret key"
}
],
"services": {
some services here
}
}, <-- don't forget to add comma here!
{ <-- this is the first line you copied
"client_info": {
"mobilesdk_app_id": "blabla",
"android_client_info": {
"package_name": "com.twilio.chat.demo.debug" <-- this is the package name, updated to match your flavor
}
},
"oauth_client": [
{
"client_id": "other stuff",
"client_type": x
}
],
"api_key": [
{
"current_key": "very secret key"
}
],
"services": {
some services here
}
} <-- this is the last line you copied
], <-- this is the end of the array
"configuration_version": "1"
}
if you have other flavors in addition to debug just add more copies of this section and rename package to add those flavors too.
from twilio-chat-demo-android.
Not sure without build log what place you mean exactly.
I believe you're talking about google-services.json file? It should also have a matching package name.
from twilio-chat-demo-android.
Thanks for your response.
I have the same package name in google-service.json
file.
"client_info": {
"mobilesdk_app_id": "1:339526072298:android:a06401e0e9f54a82",
"android_client_info": {
"package_name": "com.twilio.chat"
}
},
from twilio-chat-demo-android.
com.twilio.chat
is the namespace for the SDK, it's probably a good idea to use some other name for your app.
Can you provide part of the build log where the error happens?
from twilio-chat-demo-android.
from twilio-chat-demo-android.
You changed the name in the google-services.json
but did not change the app name everywhere else (java packages, AndroidManifest.xml
etc).
There's still com.twilio.chat.demo
somewhere and it tries to find it in the google-services.json
.
I also recommend using some other name for the app, not com.twilio.chat
as this is inside Twilio domain and may conflict with other packages.
from twilio-chat-demo-android.
from twilio-chat-demo-android.
In fact when I use same package name which is in this demo project. Still getting the same error.
from twilio-chat-demo-android.
ok, Thanks for your time. Let me try it.
from twilio-chat-demo-android.
Checking, how did it go? Do you still have any problems building it?
from twilio-chat-demo-android.
Sorry, I haven't spent time on this demo due to another work. Whenever I check definitely let you.
from twilio-chat-demo-android.
Closing this due to inactivity, reopen when you have more feedback. Thanks!
from twilio-chat-demo-android.
Sorry for inactivity here. But I tried above steps and it's working fine.
Thank you Berkus Decker.
from twilio-chat-demo-android.
Great! Glad to hear.
from twilio-chat-demo-android.
I got the same problem with use of react-native-firebase.
In your copy client > client_info > android_client_info: your app name in google-services.json
then psate it to android > defaultConfig > applicationId.
this worked for me.
from twilio-chat-demo-android.
I had to change the app package name in google-services.json files too
from twilio-chat-demo-android.
org.gradle.api.GradleException: No matching client found for package name 'com.hypertrack.ridesharing.android.github' can someone help me with this ?
from twilio-chat-demo-android.
@MadSkills420 yes, you need to have matching app name in your google-services.json
from twilio-chat-demo-android.
even After Trying above Steps i have same issue
it night be the problem due to product flavors i am using in my project
from twilio-chat-demo-android.
@bhushang098 I usually copy the provisioning in google-services.json
and rename the second one to match the flavor I use (e.g. I add a second entry and rename it to "com.hypertrack.ridesharing.android.github.debug" etc)
from twilio-chat-demo-android.
thanks for Your Response berkus
i am quiet new to development can u please describe exactly how it is done
i have spent my whole day deleting and renaming packages
from twilio-chat-demo-android.
Got it , What i Have To Do
Thank You So Much @berkus
Really Great community and Great people ;)
from twilio-chat-demo-android.
You're welcome :)
from twilio-chat-demo-android.
Related Issues (20)
- NullPointerException when calling channel.getMessages() HOT 8
- Upload listener not working HOT 6
- how to implement typing indicator in android chat app using twillo? HOT 2
- How to load message by message id? HOT 13
- Login error. Error 0:3 Request to EMS service has failed, unable to set FPA token HOT 1
- Build Failing on CI with twilio sdk HOT 8
- Socket Time Exception on Samsung devices when using 4G mobile data. HOT 3
- Code Improvement HOT 4
- member.getAttributes() => attributes are always empty HOT 1
- Create Channel is missing the UniqueName value HOT 3
- Broadcast Functionality HOT 3
- Insecure TLS/SSL trust manager HOT 11
- SDK release section is outdated and not relevant in this repo HOT 9
- Make contribution to the project easier HOT 4
- Stop using this repo's tickets as gateway to the tickets for SDK HOT 3
- Channel synchronisation is taking more than 20 seconds with 143 live channels HOT 2
- JCenter is shutting down on May 1st, 2021 HOT 3
- Nested call back not getting result, want to get last message from each channel HOT 38
- APK size increases to 1.4 GB after integrating Programmable Chat HOT 5
- Sample JSON missing HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from twilio-chat-demo-android.