{"action":"created","issue":{"url":"https://api.github.com/repos/geektimecoil/react-native-onesignal/issues/547","repository_url":"https://api.github.com/repos/geektimecoil/react-native-onesignal","labels_url":"https://api.github.com/repos/geektimecoil/react-native-onesignal/issues/547/labels{/name}","comments_url":"https://api.github.com/repos/geektimecoil/react-native-onesignal/issues/547/comments","events_url":"https://api.github.com/repos/geektimecoil/react-native-onesignal/issues/547/events","html_url":"https://github.com/geektimecoil/react-native-onesignal/issues/547","id":330256193,"node_id":"MDU6SXNzdWUzMzAyNTYxOTM=","number":547,"title":"does not recognize the device in the dashboard when install the signed apk in device.","user":{"login":"Amir-M7","id":17439071,"node_id":"MDQ6VXNlcjE3NDM5MDcx","avatar_url":"https://avatars0.githubusercontent.com/u/17439071?v=4","gravatar_id":"","url":"https://api.github.com/users/Amir-M7","html_url":"https://github.com/Amir-M7","followers_url":"https://api.github.com/users/Amir-M7/followers","following_url":"https://api.github.com/users/Amir-M7/following{/other_user}","gists_url":"https://api.github.com/users/Amir-M7/gists{/gist_id}","starred_url":"https://api.github.com/users/Amir-M7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Amir-M7/subscriptions","organizations_url":"https://api.github.com/users/Amir-M7/orgs","repos_url":"https://api.github.com/users/Amir-M7/repos","events_url":"https://api.github.com/users/Amir-M7/events{/privacy}","received_events_url":"https://api.github.com/users/Amir-M7/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2018-06-07T12:45:32Z","updated_at":"2018-06-12T00:56:39Z","closed_at":null,"author_association":"NONE","body":"Description:\r\n\r\nWhen i generate signed apk and install on device , it does not recognize the device in the dashboard. But in debugger environment, recognizes the device and show in dashboard and it's not a problem.\r\n\r\nEnvironment\r\n\r\n```\"react-native\": \"0.55.4\"\r\n\"react-native-onesignal\": \"^3.2.4\"\r\n\"react-native-navigation\": \"^1.1.469\"\r\ncompileSdkVersion : 26\r\nbuildToolsVersion :  \"26.0.2\"\r\ncompile 'com.android.support:appcompat-v7:26.0.1'```\r\nusing yarn \r\n\r\n\r\n**Steps to Reproduce Issue:**\r\n\r\n  1. Install the OneSignal SDK using yarn in my project\r\n  2. Initialize the SDK in the  app/build.gradle az example project\r\n  3. Attempt to receive a push notification\r\n\r\napp/build.gradle : \r\nbuildscript {\r\n    repositories {\r\n        maven { url 'https://plugins.gradle.org/m2/' } // Gradle Plugin Portal \r\n    }\r\n    dependencies {\r\n        classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.10.0, 0.99.99]'\r\n    }\r\n}\r\n\r\napply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'\r\napply plugin: \"com.android.application\"\r\n\r\nimport com.android.build.OutputFile\r\n\r\n/**\r\n * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets\r\n * and bundleReleaseJsAndAssets).\r\n * These basically call `react-native bundle` with the correct arguments during the Android build\r\n * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the\r\n * bundle directly from the development server. Below you can see all the possible configurations\r\n * and their defaults. If you decide to add a configuration block, make sure to add it before the\r\n * `apply from: \"../../node_modules/react-native/react.gradle\"` line.\r\n *\r\n * project.ext.react = [\r\n *   // the name of the generated asset file containing your JS bundle\r\n *   bundleAssetName: \"index.android.bundle\",\r\n *\r\n *   // the entry file for bundle generation\r\n *   entryFile: \"index.android.js\",\r\n *\r\n *   // whether to bundle JS and assets in debug mode\r\n *   bundleInDebug: false,\r\n *\r\n *   // whether to bundle JS and assets in release mode\r\n *   bundleInRelease: true,\r\n *\r\n *   // whether to bundle JS and assets in another build variant (if configured).\r\n *   // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants\r\n *   // The configuration property can be in the following formats\r\n *   //         'bundleIn${productFlavor}${buildType}'\r\n *   //         'bundleIn${buildType}'\r\n *   // bundleInFreeDebug: true,\r\n *   // bundleInPaidRelease: true,\r\n *   // bundleInBeta: true,\r\n *\r\n *   // whether to disable dev mode in custom build variants (by default only disabled in release)\r\n *   // for example: to disable dev mode in the staging build type (if configured)\r\n *   devDisabledInStaging: true,\r\n *   // The configuration property can be in the following formats\r\n *   //         'devDisabledIn${productFlavor}${buildType}'\r\n *   //         'devDisabledIn${buildType}'\r\n *\r\n *   // the root of your project, i.e. where \"package.json\" lives\r\n *   root: \"../../\",\r\n *\r\n *   // where to put the JS bundle asset in debug mode\r\n *   jsBundleDirDebug: \"$buildDir/intermediates/assets/debug\",\r\n *\r\n *   // where to put the JS bundle asset in release mode\r\n *   jsBundleDirRelease: \"$buildDir/intermediates/assets/release\",\r\n *\r\n *   // where to put drawable resources / React Native assets, e.g. the ones you use via\r\n *   // require('./image.png')), in debug mode\r\n *   resourcesDirDebug: \"$buildDir/intermediates/res/merged/debug\",\r\n *\r\n *   // where to put drawable resources / React Native assets, e.g. the ones you use via\r\n *   // require('./image.png')), in release mode\r\n *   resourcesDirRelease: \"$buildDir/intermediates/res/merged/release\",\r\n *\r\n *   // by default the gradle tasks are skipped if none of the JS files or assets change; this means\r\n *   // that we don't look at files in android/ or ios/ to determine whether the tasks are up to\r\n *   // date; if you have any other folders that you want to ignore for performance reasons (gradle\r\n *   // indexes the entire tree), add them here. Alternatively, if you have JS files in android/\r\n *   // for example, you might want to remove it from here.\r\n *   inputExcludes: [\"android/**\", \"ios/**\"],\r\n *\r\n *   // override which node gets called and with what additional arguments\r\n *   nodeExecutableAndArgs: [\"node\"],\r\n *\r\n *   // supply additional arguments to the packager\r\n *   extraPackagerArgs: []\r\n * ]\r\n */\r\n\r\nproject.ext.react = [\r\n    entryFile: \"index.js\"\r\n]\r\n\r\napply from: \"../../node_modules/react-native/react.gradle\"\r\n\r\n/**\r\n * Set this to true to create two separate APKs instead of one:\r\n *   - An APK that only works on ARM devices\r\n *   - An APK that only works on x86 devices\r\n * The advantage is the size of the APK is reduced by about 4MB.\r\n * Upload all the APKs to the Play Store and people will download\r\n * the correct one based on the CPU architecture of their device.\r\n */\r\ndef enableSeparateBuildPerCPUArchitecture = false\r\n\r\n/**\r\n * Run Proguard to shrink the Java bytecode in release builds.\r\n */\r\ndef enableProguardInReleaseBuilds = false\r\n\r\nandroid {\r\n    compileSdkVersion 26\r\n    buildToolsVersion \"26.0.2\"\r\n\r\n    defaultConfig {\r\n        applicationId \"**********\"\r\n        minSdkVersion 16\r\n        targetSdkVersion 22\r\n        versionCode 1\r\n        versionName \"1.0\"\r\n        ndk {\r\n            abiFilters \"armeabi-v7a\", \"x86\"\r\n        }\r\n    }\r\n   \r\n    splits {\r\n        abi {\r\n            reset()\r\n            enable enableSeparateBuildPerCPUArchitecture\r\n            universalApk false  // If true, also generate a universal APK\r\n            include \"armeabi-v7a\", \"x86\"\r\n        }\r\n    }\r\n    buildTypes {\r\n        release {\r\n            minifyEnabled enableProguardInReleaseBuilds\r\n            proguardFiles getDefaultProguardFile(\"proguard-android.txt\"), \"proguard-rules.pro\"\r\n            signingConfig signingConfigs.release\r\n        }\r\n    }\r\n    // applicationVariants are e.g. debug, release\r\n    applicationVariants.all { variant ->\r\n        variant.outputs.each { output ->\r\n            // For each separate APK per architecture, set a unique version code as described here:\r\n            // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits\r\n            def versionCodes = [\"armeabi-v7a\":1, \"x86\":2]\r\n            def abi = output.getFilter(OutputFile.ABI)\r\n            if (abi != null) {  // null for the universal-debug, universal-release variants\r\n                output.versionCodeOverride =\r\n                        versionCodes.get(abi) * 1048576 + defaultConfig.versionCode\r\n            }\r\n        }\r\n    }\r\n}\r\n\r\ndependencies {\r\n    compile fileTree(include: ['*.jar'], dir: 'libs')\r\n    compile 'com.android.support:appcompat-v7:26.0.1'\r\n    compile 'com.facebook.react:react-native:+'\r\n    compile project(':react-native-navigation')\r\n    compile project(':react-native-onesignal')\r\n}\r\n\r\n// Run this once to be able to run the application with BUCK\r\n// puts all compile dependencies into folder libs for BUCK to use\r\ntask copyDownloadableDepsToLibs(type: Copy) {\r\n    from configurations.compile\r\n    into 'libs'\r\n}\r\n\r\nand android/build.gradle : \r\nbuildscript {\r\n    repositories {\r\n        jcenter()\r\n        maven {\r\n            url 'https://maven.google.com/'\r\n            name 'Google'\r\n        }\r\n    }\r\n    dependencies {\r\n        classpath 'com.android.tools.build:gradle:2.2.3'\r\n\r\n    }\r\n}\r\n\r\nallprojects {\r\n    repositories {\r\n        mavenLocal()\r\n        jcenter()\r\n        maven { \r\n           \r\n            url \"$rootDir/../node_modules/react-native/android\"\r\n        }\r\n        maven {\r\n            url 'https://maven.google.com/' \r\n            name 'Google' \r\n    }\r\n}\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/geektimecoil/react-native-onesignal/issues/comments/396431929","html_url":"https://github.com/geektimecoil/react-native-onesignal/issues/547#issuecomment-396431929","issue_url":"https://api.github.com/repos/geektimecoil/react-native-onesignal/issues/547","id":396431929,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NjQzMTkyOQ==","user":{"login":"Nightsd01","id":8186991,"node_id":"MDQ6VXNlcjgxODY5OTE=","avatar_url":"https://avatars0.githubusercontent.com/u/8186991?v=4","gravatar_id":"","url":"https://api.github.com/users/Nightsd01","html_url":"https://github.com/Nightsd01","followers_url":"https://api.github.com/users/Nightsd01/followers","following_url":"https://api.github.com/users/Nightsd01/following{/other_user}","gists_url":"https://api.github.com/users/Nightsd01/gists{/gist_id}","starred_url":"https://api.github.com/users/Nightsd01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nightsd01/subscriptions","organizations_url":"https://api.github.com/users/Nightsd01/orgs","repos_url":"https://api.github.com/users/Nightsd01/repos","events_url":"https://api.github.com/users/Nightsd01/events{/privacy}","received_events_url":"https://api.github.com/users/Nightsd01/received_events","type":"User","site_admin":false},"created_at":"2018-06-12T00:56:39Z","updated_at":"2018-06-12T00:56:39Z","author_association":"COLLABORATOR","body":"@Amir-M7 @phantom1299 Can you please copy + paste your `MainApplication.java`? \r\n\r\nIn the `getPackages()` method, are you sure you're returning `new ReactNativeOneSignalPackage()`?"}}
{"actor":{"display_login":"Nightsd01"}}