Skip to content

Commit d9babd5

Browse files
committed
Updated with small changes to fix blocking Android bug
1 parent 17b870d commit d9babd5

File tree

4 files changed

+16
-10
lines changed

4 files changed

+16
-10
lines changed

android/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ dependencies {
2222
compile 'com.facebook.react:react-native:0.20.+'
2323
compile 'com.google.android.gms:play-services-base:+'
2424

25-
compile 'com.google.firebase:firebase-core:9.8.0'
26-
compile 'com.google.firebase:firebase-auth:9.8.0'
27-
compile 'com.google.firebase:firebase-analytics:9.8.0'
28-
compile 'com.google.firebase:firebase-database:9.8.0'
29-
compile 'com.google.firebase:firebase-storage:9.8.0'
30-
compile 'com.google.firebase:firebase-messaging:9.8.0'
25+
compile 'com.google.firebase:firebase-core:10.0.1'
26+
compile 'com.google.firebase:firebase-auth:10.0.1'
27+
compile 'com.google.firebase:firebase-analytics:10.0.1'
28+
compile 'com.google.firebase:firebase-database:10.0.1'
29+
compile 'com.google.firebase:firebase-storage:10.0.1'
30+
compile 'com.google.firebase:firebase-messaging:10.0.1'
3131
}
3232

android/src/main/java/io/fullstack/firestack/FirestackPackage.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ public List<NativeModule> createNativeModules(ReactApplicationContext reactConte
2929
modules.add(new FirestackAuthModule(reactContext));
3030
modules.add(new FirestackDatabaseModule(reactContext));
3131
modules.add(new FirestackAnalyticsModule(reactContext));
32-
modules.add(new FirestackStorageModule(reactContext));
33-
modules.add(new FirestackCloudMessaging(reactContext));
32+
modules.add(new FirestackStorage(reactContext));
33+
// modules.add(new FirestackCloudMessaging(reactContext));
3434
return modules;
3535
}
3636

android/src/main/java/io/fullstack/firestack/FirestackStorage.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
import com.google.firebase.storage.StorageMetadata;
4444
import com.google.firebase.storage.StorageReference;
4545

46-
class FirestackStorageModule extends ReactContextBaseJavaModule {
46+
class FirestackStorage extends ReactContextBaseJavaModule {
4747

4848
private static final String TAG = "FirestackStorage";
4949
private static final String DocumentDirectoryPath = "DOCUMENT_DIRECTORY_PATH";
@@ -53,6 +53,7 @@ class FirestackStorageModule extends ReactContextBaseJavaModule {
5353
private static final String TemporaryDirectoryPath = "TEMPORARY_DIRECTORY_PATH";
5454
private static final String CachesDirectoryPath = "CACHES_DIRECTORY_PATH";
5555
private static final String DocumentDirectory = "DOCUMENT_DIRECTORY_PATH";
56+
private static final String BundlePath = "MAIN_BUNDLE_PATH";
5657

5758
private static final String FileTypeRegular = "FILETYPE_REGULAR";
5859
private static final String FileTypeDirectory = "FILETYPE_DIRECTORY";
@@ -62,8 +63,10 @@ class FirestackStorageModule extends ReactContextBaseJavaModule {
6263
private ReactContext mReactContext;
6364
private FirebaseApp app;
6465

65-
public FirestackStorageModule(ReactApplicationContext reactContext) {
66+
public FirestackStorage(ReactApplicationContext reactContext) {
6667
super(reactContext);
68+
69+
Log.d(TAG, "Attaching FirestackStorage");
6770
this.context = reactContext;
6871
mReactContext = reactContext;
6972

@@ -279,6 +282,7 @@ public Map<String, Object> getConstants() {
279282
constants.put(CachesDirectoryPath, this.getReactApplicationContext().getCacheDir().getAbsolutePath());
280283
constants.put(FileTypeRegular, 0);
281284
constants.put(FileTypeDirectory, 1);
285+
constants.put(BundlePath, null);
282286

283287
File externalStorageDirectory = Environment.getExternalStorageDirectory();
284288
if (externalStorageDirectory != null) {

lib/modules/storage.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ const FirestackStorageEvt = new NativeEventEmitter(FirestackStorage);
66
import promisify from '../utils/promisify'
77
import { Base, ReferenceBase } from './base'
88

9+
console.log('FirestackStorage ---->', FirestackStorage);
10+
911
class StorageRef extends ReferenceBase {
1012
constructor(storage, path) {
1113
super(storage.firestack, path);

0 commit comments

Comments
 (0)