As of April 12th, you must go to Progress SupportLink to create new support cases or to access existing cases. Please, bookmark the SupportLink URL and use the new portal to contact the support team.
Uploading of an image from an andorid app raising an exception of "user currently not logged in"
s
sharmistha rai
started a topic
almost 7 years ago
I'm making an android app that clicks an image and uploads the image, which has been saved in the phone storage to the cloud using kinvey at backend. But every time i run the code provided on the kinvey website which goes as -
import com.kinvey.java.core.UploaderProgressListener;
...
java.io.File file = new java.io.File(getFilesDir(), "chicken_fried_waffles.txt");
file.createNewFile();
mKinveyClient.file().upload(file, new UploaderProgressListener() {
@Override
public void onSuccess(Void result) {
Log.i(TAG, "successfully upload file");
}
@Override
public void onFailure(Throwable error) {
Log.e(TAG, "failed to upload file.", error);
}
@Override
public void progressChanged(MediaHttpUploader uploader) throws IOException {
Log.i(TAG, "upload progress: " + uploader.getUploadState());
// all updates to UI widgets need to be done on the UI thread
}
});
Then it throws me an exception -
E/Activity file: failed to upload file.
com.kinvey.java.KinveyException:
REASON: No user is currently logged in.
I don't what I'm doing wrong here. The ping functionality for the same is working fine. Please help
Best Answer
P
Pranav J
said
almost 7 years ago
Sharmistha,
Every app action needs an active user context. So you will need to login in the app and then upload the file.
sharmistha rai
I'm making an android app that clicks an image and uploads the image, which has been saved in the phone storage to the cloud using kinvey at backend. But every time i run the code provided on the kinvey website which goes as -
Then it throws me an exception -
E/Activity file: failed to upload file.
com.kinvey.java.KinveyException:
REASON: No user is currently logged in.
I don't what I'm doing wrong here. The ping functionality for the same is working fine. Please help
Sharmistha,
Every app action needs an active user context. So you will need to login in the app and then upload the file.
Please take a look at the following:
http://devcenter.kinvey.com/android/guides/users#ActiveUser
http://devcenter.kinvey.com/android/guides/files#Uploading
Thanks,
Pranav
Kinvey Support
Pranav J
Sharmistha,
Every app action needs an active user context. So you will need to login in the app and then upload the file.
Please take a look at the following:
http://devcenter.kinvey.com/android/guides/users#ActiveUser
http://devcenter.kinvey.com/android/guides/files#Uploading
Thanks,
Pranav
Kinvey Support
-
Can I add KinveyReferences and other custom Arrays to the User entity?
-
How can I use custom enums within my Entity?
-
Linking an image does not save with LinkedData
-
How can I get all records saved by the current user?
-
Why don't all users see the same data when querying?
-
Retrieving related file from datastore collection - continued
-
Problem implementing sign up / login
-
Can Android API be used for Java?
-
I'm not receiving push notifications
-
It is impossible to receive object according to the link
See all 259 topics