Skip to content

Android: Deprecation warnings about SDCardDir and SDCardApplicationDir #54

Closed
@ataillefer

Description

@ataillefer

Branch: 0.10.9

Just calling the following code:

import RNFetchBlob from 'react-native-fetch-blob';

const url = http://my.server.com/my/upload/API;
const headers = { Authorization: 'Bearer xxxxxxxxx' };
const body = RNFetchBlob.wrap('file:///storage/emulated/0/Android/data/some/local/file');
const res = await RNFetchBlob.fetch('POST', url, headers, body);

generates the following warnings in the Android logs:

W ReactNativeJS: SDCardDir as a constant is deprecated and will be removed in feature release. Use RNFetchBlob.android.getSDCardDir():Promise instead.
W ReactNativeJS: SDCardApplicationDir as a constant is deprecated and will be removed in feature release. Use RNFetchBlob.android.getSDCardApplicationDir():Promise instead. This variable can be empty on error in native code.

These warnings have been added by 22fd32a but apparently there are still some occurrences of SDCardDir and SDCardApplicationDir in the code of the 0.10.9 branch.

I'm aware that the 0.10.9 branch isn't stable yet but it is intended to be released with a bunch of bug fixes so I believe that these warnings should be fixed before the release.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions