Commit Graph

225 Commits

Author SHA1 Message Date
Yuri Kulikov
d34a4db55c Remove android.support.annotation.NonNull import (#1471)
Remove android.support dependency to simplify the work
with androidx.

Related issue: #1462
2018-12-12 17:10:32 +03:00
Yuri Kulikov
693b769ba6 [Feature] Re-try mechanism for CodePush Rollbacks (#1467) 2018-12-06 13:48:26 +03:00
Nickolay Toropov
b1dd46724f Updated proguard rules to keep mBundleLoader field (#1425) 2018-10-08 15:41:51 +03:00
Alexander Goncharov
c876971518 Added compatibility with latest RN version(0.56) (#1342)
* Added using project-wide properties.
* Upgrade compileSdkVersion to 26 version
* Upgrade buildToolsVersion to 26.0.3 version
* Upgrade targedSdkVersion to 26 version
2018-07-10 18:30:15 +03:00
Krunal Shah
ba151ef99f remove unused constant (#1340) 2018-07-10 17:47:35 +03:00
Alexander Goncharov
09883dd6f1 Prevent removing ReactNativeDevBundle in LiveReload (#1332) 2018-07-09 16:26:26 +03:00
Nickolay Toropov
19b1a5ede7 Updated docs for clearUpdates method and added logging. (#1329) 2018-06-29 17:36:48 +03:00
Marc
8b5b8eab0a Expose clearUpdates method to RN for purging downloaded packages (#1269)
This is useful when changing to a deployment with an older version than
the currently installed package.
2018-06-29 11:30:18 +03:00
Anna Kocheshkova
201735ebad Get update folder method (#1323)
* Exposed current update path.

* Check for null

* API reference update
2018-06-25 16:16:47 +03:00
Alexander Goncharov
4aa735c728 Prevent crashing app by catching errors (#1286)
* Convert all @ReactMethod in try-catch block

* Fix Exception type

* Replaced e.printStackTrace() with CodePushUtils.log(e)

* Combined catches with the same handler.
2018-05-24 15:08:38 +03:00
Nickolay Toropov
e0bc8b00d2 Fixed app crash caused by multiple callback invocation from java code. (#1289)
Added CodePushUtils.log method for logging exceptions.
2018-05-24 13:52:59 +03:00
Nickolay Toropov
21f8388f6a Fixed app crash caused by BadTokenException. (#1287) 2018-05-24 13:52:40 +03:00
Dat Vong
d34e8d0dfb For identity Accept-Encoding (#1237)
If the server returns gzip encoding, the size check will fail because getContentLength() could potentially return -1 for gzipped content.
2018-03-30 17:24:22 +03:00
Artem Egorov
80828674af Fix for IllegalStateException while CodePushUpdateManager.downloadPackage (#1206) 2018-02-16 15:32:26 +03:00
Chris Mark
6acd21d058 Allow setting the deploymentKey on Android (#1115) 2017-12-24 23:48:41 -08:00
Andrew Jack
1adad0df29 Fix proguard error in Android build (#1018) 2017-09-27 10:37:40 +03:00
Ruslan Bikkinin
e1cdd90e4e Add double hash checking support for code signing (#1005)
Add double hash checking support for code signing for both android and ios SDK
2017-09-18 13:37:44 +03:00
Sergey Akhalkov
32f82e6050 Fix dex index overflow exception (#1007)
fix DexIndexOverflowException due to com.auth0.jwt #1002

use another lib - nimbus-jose-jwt
2017-09-18 12:49:16 +03:00
Ruslan Bikkinin
5e332bbe83 Implement code signing for client android SDK (#966)
* Add new optional way to create CodePush instance based on builder pattern
Add constructor with additional option PublicKeyFilePath

* Adapt changes from old code-signing branch

Add `com.auth0:java-jwt:3.2.0` to deps
Adapt changes from code-signing branch
Fix errors appeared due to jwt library update.

* Non-breaking change of CodePush constructor, downgrade jwt library

Replace publicKey by publicKeyResourceDescriptor in CodePush constructor
Downgrade jwt library to 2.2.2 due to issue with base64 decoding

* Make code signing optional

* Add small improvements

Replace CodePushUnknownException catch with
CodePushInvalidPublicKeyException in certain places
Make mPublicKey static
Add additional log for applying updates

* Rename method verifyJWT with verifyAndDecodeJWT

* Add minor fixes

Add additional checking for potential problems with code-signing
integration
Fix Public Key parsing from strings.xml

* Fix constructors

* Fix constructors bug

* Fix log messages
2017-09-13 12:08:17 +03:00
Andrew Jack
d37ee85620 check if package metadata is null (#992) 2017-09-12 10:56:12 +03:00
Kevin Cooper
d78956bc65 Restore compatibility with RN v0.46 (#980)
* Revert "Remove overriden createJSModules"

This reverts commit dff9f47a4b8b31e9ad4bfe36acf57fff8291163d.

* Remove @Override annotation to support RN v0.47
2017-09-05 10:19:43 -07:00
Ruslan Bikkinin
416af9b738 Fix incorrect long value restoration from strings.xml (#956)
Fix potencial incorrect long value restoration from strings.xml (please,
see https://github.com/Microsoft/cordova-plugin-code-push/issues/264)
2017-08-08 16:22:55 +03:00
Tomas Roos
dfe154de5c Remove overriden createJSModules (#895)
Since of recently in master the unused createJSModules has been removed and ReactPackage's no longer contain the definition of createJSModules. There for it must be removed in order to not yield a compile error. This is breaking change.

ce6fb337a1
2017-08-02 12:46:28 +03:00
Andrew Jack
e6936b3aa0 Prevent Rollback crash when binary was updated. (#924)
* Prevent Rollback crash when binary was updated.

* Self review
2017-07-17 17:29:56 +03:00
Sergey Akhalkov
9bc0770845 add support for RN 0.46.x (#905) 2017-07-07 13:05:40 +03:00
Sergey Akhalkov
d62f3df4bf add support for RN 0.45.x (#901)
* add support for RN 0.45.x

* add support for RN 0.45.x

* to last

* remove additional calls

* remove support for RN 0.46.x that has been added due to as of now it is not compatibale with RN 0.45.x
2017-06-26 11:37:37 +03:00
max-mironov
a2e17a88bc Merge branch 'remove_unsupported_rn_versions' of https://github.com/AndrewJack/react-native-code-push 2017-06-02 15:35:25 +03:00
Andrew Jack
bb0e206149 If current package folder is null don't delete (#870) 2017-06-02 11:32:34 +03:00
Andrew Jack
c6310363be Remove support for legacy React Native versions 2017-06-01 17:27:16 +01:00
Max
bb997f01d8 Fix return value for get update metadata (#864)
* Fixed issue with error on parsing plist path

See https://github.com/Microsoft/react-native-code-push/issues/534#issuecomment-302069326 for details

* Changed return value to null for getUpdateMetadata instead of empty string

In accordance with docs and https://github.com/Microsoft/react-native-code-push/issues/862
2017-06-01 14:12:07 +03:00
Max
b8bd4a021c Fixed issue with [Android] restartApp() throwing exception w/ release build (#861)
* Fixed issue with error on parsing plist path

See https://github.com/Microsoft/react-native-code-push/issues/534#issuecomment-302069326 for details

* Fixed issue with [Android] restartApp() throwing exception w/ release build

https://github.com/Microsoft/react-native-code-push/issues/847

* Changed return value to null for getUpdateMetadata instead of empty string

In accordance with docs and https://github.com/Microsoft/react-native-code-push/issues/862

* Code refactoring: moved variable assignment out of loop
2017-06-01 14:10:33 +03:00
Sergey Akhalkov
54351dbe19 installModes: implement new ON_NEXT_SUSPEND install mode (#770)
Restart the app _while_ it is in the background, but only after it has been in the background for "minimumBackgroundDuration" seconds (0 by default), so that user context isn't lost unless the app suspension is long enough to not matter.
2017-04-11 12:52:18 +03:00
Neo
300a8358e3 [android] RN0.43 capacity (#735)
Fixed android project build issues that have place due to the following breaking changes: 
facebook/react-native#12329
facebook/react-native#12396
2017-03-23 13:24:54 +03:00
Sergey Akhalkov
2b02ce90ef Flow type checking fix: use "CodePushHash" file name instead of "CodePushHash.json" (#763)
`CodePushHash.json` file name breaks flow type checking.
To fix the issue we need to delete `CodePushHash.json` file and
use `CodePushHash` file name instead to store the hash value.
Relates to https://github.com/Microsoft/react-native-code-push/issues/577
2017-03-22 13:27:37 -07:00
Sergey Akhalkov
1c5f4a1a15 build.gradle: set Android SDK Build Tools version to 23.0.1 (#747)
`react-native-code-push@1.17.1-beta` release introduces Android SDK Build Tools inconsistency between React Native app and react-native-code-push Module.
It's convenient to have the same version of Android SDK Build Tools both for React Native app and react-native-code-push module, due to https://github.com/facebook/react-native/pull/11422#issuecomment-266814770
2017-03-08 00:53:11 +03:00
BO KANG
cf4c72cc4e revert back the android API bundle support from 25 to 23 2017-03-03 12:22:33 -08:00
Ray Vafa
4180f9cd6c Update Android SDK to 25.0.2 (#725) 2017-02-27 17:48:43 -08:00
Christian Meunier
73f0984689 Update Android SDK to 23.0.3 (#710)
Fixes #709
2017-02-21 18:06:11 -08:00
Sergey Akhalkov
341a205a1d codePushNativeModule: launch async tasks in parallel (#693)
AsyncTasks are executed on a single thread to avoid common application errors caused by parallel execution.
So to make it possible to use tools like AsyncStorage while CodePush downloading an update we should use
`asyncTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);` code instead of `asyncTask.execute()`
2017-02-09 11:44:03 +03:00
Sergey Akhalkov
4df7235dd4 CodePush: changed implementation of getBinaryResourcesModifiedTime method (#683)
Due to “the last modified date on all files in an apk now have the time stamp of 'Fri, Nov 30 1979 00:00:00'”
(https://code.google.com/p/android/issues/detail?id=220039) we have to store apk build time value in
`app/src/main/res/values/strings.xml` file and use it further in `getBinaryResourcesModifiedTime` method

Fix https://github.com/Microsoft/react-native-code-push/issues/650
2017-02-09 11:40:31 +03:00
Richard Hua
d9a85c87f3 Support React Native 0.36.0 and 0.37.0 (#602)
* Upgrade example app to react-native@0.37.0
* Fix crash on restart caused by loadBundle() being called twice
2016-11-14 22:40:36 -08:00
Martin Konicek
ae0d35244f [Android] Let npm take care of versioning (#589) 2016-11-11 17:52:10 -08:00
Swordsman-Inaction
5bcea7be35 Fix comparison method in setJSBundle (#587) 2016-10-31 22:30:11 -07:00
Richard Hua
3dce59f36e Ignore OSX metadata when hashing updates (#561)
On Android, prevent hash mismatches by ensuring the hashing algorithm ignores OS X metadata (.DS_Store and __MACOSX). This addresses #472, and mirrors #471, which is the iOS side of the fix.
2016-10-11 10:49:40 -07:00
Richard Hua
22d2a146d2 Support RN 0.34 (#557)
* Upgrade example app to RN 0.34.1
* Fix Android reflection logic to support RN 0.34 (as reported in #536), while maintaining backward compatibility
* Bump package.json and update supported RN versions in README
2016-10-06 16:18:07 -07:00
Connor McEwen
30b27337d3 Check that the previous package is not null 2016-09-28 13:41:20 +01:00
Felipe Lima
8c4c8046c6 Remove unnecessary config from AndroidManifest
This was causing some manifest merging issues for us, however it seems
like this stuff is completely unnecessary, especially for an android
library, so I'm removing it all.
2016-09-21 10:46:38 -07:00
Geoffrey Goh
1846018d26 fix android import regression 2016-08-31 17:24:46 -07:00
Geoffrey Goh
c376c301d5 Merge pull request #491 from igrayson/patch-1
[Android] Support React instances with no Activity
2016-08-30 13:05:54 -07:00
Ian Grayson
f6ea4ec00d [Android] Support React instances with no Activity
This change aims to support applications which run React Native's catalyst instance in the background, sometimes without an activity.

We're using this change today in an RN 0.27 application, which overrides `ReactActivity#createReactInstanceManager` to afford us control of the instance's lifecycle, so that we may run and launch without an `Activity` (i.e., in response to push notifications and other triggers).

If we agree with this approach, I'll update this PR with documentation/etc.
2016-08-29 13:52:28 -07:00