Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How i get api key and android sender id #2341

Closed
chandawarlokesh opened this issue Feb 25, 2016 · 3 comments
Closed

How i get api key and android sender id #2341

chandawarlokesh opened this issue Feb 25, 2016 · 3 comments

Comments

@chandawarlokesh
Copy link

Your Rocket.Chat version: (make sure you are running the latest)
Hi all,
I am new in this rocket,chat and want to develop android apk using cordova and also create rocket.chat server locally on my machine can i use this server in cordova project???

i had used this link for it https://github.com/RocketChat/Rocket.Chat/wiki/Build-the-Android-Cordova-Web-App-and-connect-to-your-own-Rocket.Chat-Server

and on this step :
$ echo 'Bugsnag.apiKey = "YOUR-API-KEY-HERE";' > www/js/bugsnag_apikey.js
$ echo 'window.ANDROID_SENDER_ID = "YOUR-ANDROID-ID-HERE";' > www/shared/js/android_sender_id.js

for this step I dont know from where I ll get this API-KEY and ANDROID_SENDER_ID.

if any one know help Me

Thanks In Adv...

@engelgabriel
Copy link
Member

Hi, you need a Google Developer account

https://developers.google.com/cloud-messaging/android/client

@chandawarlokesh
Copy link
Author

Hi engelgabriel ,
Thank for reply I got it..

@chandawarlokesh
Copy link
Author

I am now creating app but getting other issue like

/Rocket.Chat.Cordova (develop)$ cordova platform add android
Adding android project...
Creating Cordova project for the Android platform:
Path: platforms\android
Package: com.konecty.rocket.chat
Name: Rocket.Chat
Activity: MainActivity
Android target: android-23
Android project created with cordova-android@5.0.0
Discovered plugin "cordova-plugin-sharingreceptor" in config.xml. Installing to
the project
Fetching plugin "https://github.com/burstaholic/cordova-sharingreceptor.git" via
git clone
Repository "https://github.com/burstaholic/cordova-sharingreceptor.git" checked
out to git ref "master".
cp: dest file already exists: d:\PROJECT WORK\RocketChat\Rocket.Chat.Cordova\plu
gins\cordova-sharingreceptor\LICENSE

cp: dest file already exists: d:\PROJECT WORK\RocketChat\Rocket.Chat.Cordova\plu
gins\cordova-sharingreceptor\LICENSE
cp: dest file already exists: d:\PROJECT WORK\RocketChat\Rocket.Chat.Cordova\plu
gins\cordova-sharingreceptor\package.json

cp: dest file already exists: d:\PROJECT WORK\RocketChat\Rocket.Chat.Cordova\plu
gins\cordova-sharingreceptor\LICENSE
cp: dest file already exists: d:\PROJECT WORK\RocketChat\Rocket.Chat.Cordova\plu
gins\cordova-sharingreceptor\package.json
cp: dest file already exists: d:\PROJECT WORK\RocketChat\Rocket.Chat.Cordova\plu
gins\cordova-sharingreceptor\plugin.xml

cp: dest file already exists: d:\PROJECT WORK\RocketChat\Rocket.Chat.Cordova\plu
gins\cordova-sharingreceptor\LICENSE
cp: dest file already exists: d:\PROJECT WORK\RocketChat\Rocket.Chat.Cordova\plu
gins\cordova-sharingreceptor\package.json
cp: dest file already exists: d:\PROJECT WORK\RocketChat\Rocket.Chat.Cordova\plu
gins\cordova-sharingreceptor\plugin.xml
cp: dest file already exists: d:\PROJECT WORK\RocketChat\Rocket.Chat.Cordova\plu
gins\cordova-sharingreceptor\README.md

skipping existing file: SharingReceptor.java
skipping existing file: sharingreceptor.js
Installing "cordova-sharingreceptor" for android
Installing "com.meteor.cordova-update" for android
Installing "cordova-plugin-appinfo" for android
Installing "cordova-plugin-console" for android
Installing "cordova-plugin-crosswalk-webview" for android
The module "ConfigParser" has been factored into "cordova-common". Consider upda
te your plugin hooks.
The module "xml-helpers" has been factored into "cordova-common". Consider updat
e your plugin hooks.
Installing "cordova-plugin-device" for android
Installing "cordova-plugin-dialogs" for android
Installing "cordova-plugin-facebook4" for android
Installing "cordova-plugin-file" for android

The Android Persistent storage location now defaults to "Internal". Please check
this plugins README to see if you application needs any changes in its config.x
ml.

If this is a new application no changes are required.

If this is an update to an existing application that did not specify an "Android
PersistentFileLocation" you may need to add:

  "<preference name="AndroidPersistentFileLocation" value="Compatibility" />

"

to config.xml in order for the application to find previously stored files.

Installing "cordova-plugin-file-transfer" for android
Dependent plugin "cordova-plugin-file" already installed on android.
Installing "cordova-plugin-inappbrowser" for android
Installing "cordova-plugin-legacy-whitelist" for android
Installing "cordova-plugin-rocket-chat" for android
Installing "cordova-plugin-splashscreen" for android
Installing "cordova-plugin-statusbar" for android
Installing "ionic-plugin-keyboard" for android
Installing "phonegap-plugin-push" for android

/Rocket.Chat.Cordova (develop)$ cordova build android
Discovered plugin "cordova-plugin-sharingreceptor" in config.xml. Installing to
the project
Fetching plugin "https://github.com/burstaholic/cordova-sharingreceptor.git" via
git clone
Repository "https://github.com/burstaholic/cordova-sharingreceptor.git" checked
out to git ref "master".
cp: dest file already exists: d:\PROJECT WORK\RocketChat\Rocket.Chat.Cordova\plu
gins\cordova-sharingreceptor\LICENSE

cp: dest file already exists: d:\PROJECT WORK\RocketChat\Rocket.Chat.Cordova\plu
gins\cordova-sharingreceptor\LICENSE
cp: dest file already exists: d:\PROJECT WORK\RocketChat\Rocket.Chat.Cordova\plu
gins\cordova-sharingreceptor\package.json

cp: dest file already exists: d:\PROJECT WORK\RocketChat\Rocket.Chat.Cordova\plu
gins\cordova-sharingreceptor\LICENSE
cp: dest file already exists: d:\PROJECT WORK\RocketChat\Rocket.Chat.Cordova\plu
gins\cordova-sharingreceptor\package.json
cp: dest file already exists: d:\PROJECT WORK\RocketChat\Rocket.Chat.Cordova\plu
gins\cordova-sharingreceptor\plugin.xml

cp: dest file already exists: d:\PROJECT WORK\RocketChat\Rocket.Chat.Cordova\plu
gins\cordova-sharingreceptor\LICENSE
cp: dest file already exists: d:\PROJECT WORK\RocketChat\Rocket.Chat.Cordova\plu
gins\cordova-sharingreceptor\package.json
cp: dest file already exists: d:\PROJECT WORK\RocketChat\Rocket.Chat.Cordova\plu
gins\cordova-sharingreceptor\plugin.xml
cp: dest file already exists: d:\PROJECT WORK\RocketChat\Rocket.Chat.Cordova\plu
gins\cordova-sharingreceptor\README.md

skipping existing file: SharingReceptor.java
skipping existing file: sharingreceptor.js
Plugin "cordova-sharingreceptor" already installed on android.
ANDROID_HOME=c:\Users\lokesh.chandawar\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.7.0_72
Reading build config file: d:\PROJECT WORK\RocketChat\Rocket.Chat.Cordova\build.
json

Configuring > 0/2 projects > root project > Resolving dependencies ':classpat

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project 'android'.

    Could not resolve all dependencies for configuration ':classpath'.
    Could not resolve com.android.tools.build:gradle:1.0.0+.
    Required by:
    :android:unspecified
    Failed to list versions for com.android.tools.build:gradle.
    > Unable to load Maven meta-data from https://repo1.maven.org/maven2/co
    m/android/tools/build/gradle/maven-metadata.xml.
    > Could not GET 'https://repo1.maven.org/maven2/com/android/tools/bu
    ild/gradle/maven-metadata.xml'.
    > peer not authenticated

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug
    option to get more log output.

BUILD FAILED

Total time: 1 mins 1.335 secs
ERROR building one of the platforms: Error: cmd: Command failed with exit code 1

You may not have the required environment or OS to build this project
Error: cmd: Command failed with exit code 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants