android how to add byte[] data to cloud firestore databaseHow does database indexing work?How do I quickly rename a MySQL database (change schema name)?How to list the tables in a SQLite database file that was opened with ATTACH?How do save an Android Activity state using save instance state?Why is the Android emulator so slow? How can we speed up the Android emulator?How do I pass data between Activities in Android application?How do I display an alert dialog on Android?What are the options for storing hierarchical data in a relational database?How do I add a library project to Android Studio?Android Studio: Add jar as library?

Should I stop contributing to retirement accounts?

On a tidally locked planet, would time be quantized?

Offered money to buy a house, seller is asking for more to cover gap between their listing and mortgage owed

Which one is correct as adjective “protruding” or “protruded”?

Why should universal income be universal?

If a character has darkvision, can they see through an area of nonmagical darkness filled with lightly obscuring gas?

Multiplicative persistence

What is Cash Advance APR?

Non-trope happy ending?

Create all possible words using a set or letters

How can Trident be so inexpensive? Will it orbit Triton or just do a (slow) flyby?

Creature in Shazam mid-credits scene?

Why did the HMS Bounty go back to a time when whales are already rare?

Why electric field inside a cavity of a non-conducting sphere not zero?

Redundant comparison & "if" before assignment

Melting point of aspirin, contradicting sources

If infinitesimal transformations commute why dont the generators of the Lorentz group commute?

Store Credit Card Information in Password Manager?

Not using 's' for he/she/it

What is this called? Old film camera viewer?

What should you do when eye contact makes your subordinate uncomfortable?

Closed-form expression for certain product

Why does the Sun have different day lengths, but not the gas giants?

Is the U.S. Code copyrighted by the Government?



android how to add byte[] data to cloud firestore database


How does database indexing work?How do I quickly rename a MySQL database (change schema name)?How to list the tables in a SQLite database file that was opened with ATTACH?How do save an Android Activity state using save instance state?Why is the Android emulator so slow? How can we speed up the Android emulator?How do I pass data between Activities in Android application?How do I display an alert dialog on Android?What are the options for storing hierarchical data in a relational database?How do I add a library project to Android Studio?Android Studio: Add jar as library?













0















I have tried to upload my data of local database to Cloud Firestore database, and the data type of one field is byte[]. It can't be success or failure.



 Map<String, Object> setDetail = new HashMap<>();
j = cursor.getColumnIndex("sound");
byte[] sound = cursor.getBlob(j);
setDetail.put("sound", sound);
dbFire.collection("SetDetails").document(strWordID).set(setDetail)
.addOnSuccessListener(new OnSuccessListener<Void>()
@Override
public void onSuccess(Void aVoid)

)
.addOnFailureListener(new OnFailureListener()
@Override
public void onFailure(@NonNull Exception e)

);


The debugger steps over this line dbFire.collection("SetDetails").document(strWordID).set(setDetail)



then jumps out to the last line of zzj.class



final class zzj implements Runnable 
zzj(zzi var1, Task var2)
this.zzm = var1;
this.zzg = var2;


public final void run()
synchronized(zzi.zza(this.zzm))
if (zzi.zzb(this.zzm) != null)
zzi.zzb(this.zzm).onComplete(this.zzg);








If I continue running, it will jump to this line of Looper.java



 final int thresholdOverride =
SystemProperties.getInt("log.looper."
+ Process.myUid() + "."
+ Thread.currentThread().getName()
+ ".slow", 0);


I have read documents, Bytes is one of data types that Cloud Firestore supports, so what's wrong with it. Could anyone help me? Thanks!










share|improve this question









New contributor




Citrin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Have you tried to log the exception, what does it say?

    – Alex Mamo
    2 days ago











  • @AlexMamo Could not serialize object. Serializing Arrays is not supported, please use Lists instead (found in field 'sound')

    – Citrin
    2 days ago











  • So it's very clear, right? You should change the type from array to list.

    – Alex Mamo
    2 days ago











  • Thank you, I'll try it.

    – Citrin
    2 days ago











  • Ok and tell me if it works.

    – Alex Mamo
    2 days ago















0















I have tried to upload my data of local database to Cloud Firestore database, and the data type of one field is byte[]. It can't be success or failure.



 Map<String, Object> setDetail = new HashMap<>();
j = cursor.getColumnIndex("sound");
byte[] sound = cursor.getBlob(j);
setDetail.put("sound", sound);
dbFire.collection("SetDetails").document(strWordID).set(setDetail)
.addOnSuccessListener(new OnSuccessListener<Void>()
@Override
public void onSuccess(Void aVoid)

)
.addOnFailureListener(new OnFailureListener()
@Override
public void onFailure(@NonNull Exception e)

);


The debugger steps over this line dbFire.collection("SetDetails").document(strWordID).set(setDetail)



then jumps out to the last line of zzj.class



final class zzj implements Runnable 
zzj(zzi var1, Task var2)
this.zzm = var1;
this.zzg = var2;


public final void run()
synchronized(zzi.zza(this.zzm))
if (zzi.zzb(this.zzm) != null)
zzi.zzb(this.zzm).onComplete(this.zzg);








If I continue running, it will jump to this line of Looper.java



 final int thresholdOverride =
SystemProperties.getInt("log.looper."
+ Process.myUid() + "."
+ Thread.currentThread().getName()
+ ".slow", 0);


I have read documents, Bytes is one of data types that Cloud Firestore supports, so what's wrong with it. Could anyone help me? Thanks!










share|improve this question









New contributor




Citrin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Have you tried to log the exception, what does it say?

    – Alex Mamo
    2 days ago











  • @AlexMamo Could not serialize object. Serializing Arrays is not supported, please use Lists instead (found in field 'sound')

    – Citrin
    2 days ago











  • So it's very clear, right? You should change the type from array to list.

    – Alex Mamo
    2 days ago











  • Thank you, I'll try it.

    – Citrin
    2 days ago











  • Ok and tell me if it works.

    – Alex Mamo
    2 days ago













0












0








0








I have tried to upload my data of local database to Cloud Firestore database, and the data type of one field is byte[]. It can't be success or failure.



 Map<String, Object> setDetail = new HashMap<>();
j = cursor.getColumnIndex("sound");
byte[] sound = cursor.getBlob(j);
setDetail.put("sound", sound);
dbFire.collection("SetDetails").document(strWordID).set(setDetail)
.addOnSuccessListener(new OnSuccessListener<Void>()
@Override
public void onSuccess(Void aVoid)

)
.addOnFailureListener(new OnFailureListener()
@Override
public void onFailure(@NonNull Exception e)

);


The debugger steps over this line dbFire.collection("SetDetails").document(strWordID).set(setDetail)



then jumps out to the last line of zzj.class



final class zzj implements Runnable 
zzj(zzi var1, Task var2)
this.zzm = var1;
this.zzg = var2;


public final void run()
synchronized(zzi.zza(this.zzm))
if (zzi.zzb(this.zzm) != null)
zzi.zzb(this.zzm).onComplete(this.zzg);








If I continue running, it will jump to this line of Looper.java



 final int thresholdOverride =
SystemProperties.getInt("log.looper."
+ Process.myUid() + "."
+ Thread.currentThread().getName()
+ ".slow", 0);


I have read documents, Bytes is one of data types that Cloud Firestore supports, so what's wrong with it. Could anyone help me? Thanks!










share|improve this question









New contributor




Citrin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












I have tried to upload my data of local database to Cloud Firestore database, and the data type of one field is byte[]. It can't be success or failure.



 Map<String, Object> setDetail = new HashMap<>();
j = cursor.getColumnIndex("sound");
byte[] sound = cursor.getBlob(j);
setDetail.put("sound", sound);
dbFire.collection("SetDetails").document(strWordID).set(setDetail)
.addOnSuccessListener(new OnSuccessListener<Void>()
@Override
public void onSuccess(Void aVoid)

)
.addOnFailureListener(new OnFailureListener()
@Override
public void onFailure(@NonNull Exception e)

);


The debugger steps over this line dbFire.collection("SetDetails").document(strWordID).set(setDetail)



then jumps out to the last line of zzj.class



final class zzj implements Runnable 
zzj(zzi var1, Task var2)
this.zzm = var1;
this.zzg = var2;


public final void run()
synchronized(zzi.zza(this.zzm))
if (zzi.zzb(this.zzm) != null)
zzi.zzb(this.zzm).onComplete(this.zzg);








If I continue running, it will jump to this line of Looper.java



 final int thresholdOverride =
SystemProperties.getInt("log.looper."
+ Process.myUid() + "."
+ Thread.currentThread().getName()
+ ".slow", 0);


I have read documents, Bytes is one of data types that Cloud Firestore supports, so what's wrong with it. Could anyone help me? Thanks!







android database google-cloud-firestore






share|improve this question









New contributor




Citrin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Citrin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 2 days ago







Citrin













New contributor




Citrin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 2 days ago









CitrinCitrin

33




33




New contributor




Citrin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Citrin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Citrin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • Have you tried to log the exception, what does it say?

    – Alex Mamo
    2 days ago











  • @AlexMamo Could not serialize object. Serializing Arrays is not supported, please use Lists instead (found in field 'sound')

    – Citrin
    2 days ago











  • So it's very clear, right? You should change the type from array to list.

    – Alex Mamo
    2 days ago











  • Thank you, I'll try it.

    – Citrin
    2 days ago











  • Ok and tell me if it works.

    – Alex Mamo
    2 days ago

















  • Have you tried to log the exception, what does it say?

    – Alex Mamo
    2 days ago











  • @AlexMamo Could not serialize object. Serializing Arrays is not supported, please use Lists instead (found in field 'sound')

    – Citrin
    2 days ago











  • So it's very clear, right? You should change the type from array to list.

    – Alex Mamo
    2 days ago











  • Thank you, I'll try it.

    – Citrin
    2 days ago











  • Ok and tell me if it works.

    – Alex Mamo
    2 days ago
















Have you tried to log the exception, what does it say?

– Alex Mamo
2 days ago





Have you tried to log the exception, what does it say?

– Alex Mamo
2 days ago













@AlexMamo Could not serialize object. Serializing Arrays is not supported, please use Lists instead (found in field 'sound')

– Citrin
2 days ago





@AlexMamo Could not serialize object. Serializing Arrays is not supported, please use Lists instead (found in field 'sound')

– Citrin
2 days ago













So it's very clear, right? You should change the type from array to list.

– Alex Mamo
2 days ago





So it's very clear, right? You should change the type from array to list.

– Alex Mamo
2 days ago













Thank you, I'll try it.

– Citrin
2 days ago





Thank you, I'll try it.

– Citrin
2 days ago













Ok and tell me if it works.

– Alex Mamo
2 days ago





Ok and tell me if it works.

– Alex Mamo
2 days ago












1 Answer
1






active

oldest

votes


















0














To write a byte array type field on Android, use Blob.fromBytes() to convert a byte array to a Blob object, then provide the Blob object to update() or set().






share|improve this answer























  • Thank you very much, it works.

    – Citrin
    yesterday










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);






Citrin is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55281418%2fandroid-how-to-add-byte-data-to-cloud-firestore-database%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














To write a byte array type field on Android, use Blob.fromBytes() to convert a byte array to a Blob object, then provide the Blob object to update() or set().






share|improve this answer























  • Thank you very much, it works.

    – Citrin
    yesterday















0














To write a byte array type field on Android, use Blob.fromBytes() to convert a byte array to a Blob object, then provide the Blob object to update() or set().






share|improve this answer























  • Thank you very much, it works.

    – Citrin
    yesterday













0












0








0







To write a byte array type field on Android, use Blob.fromBytes() to convert a byte array to a Blob object, then provide the Blob object to update() or set().






share|improve this answer













To write a byte array type field on Android, use Blob.fromBytes() to convert a byte array to a Blob object, then provide the Blob object to update() or set().







share|improve this answer












share|improve this answer



share|improve this answer










answered 2 days ago









Doug StevensonDoug Stevenson

81.9k997115




81.9k997115












  • Thank you very much, it works.

    – Citrin
    yesterday

















  • Thank you very much, it works.

    – Citrin
    yesterday
















Thank you very much, it works.

– Citrin
yesterday





Thank you very much, it works.

– Citrin
yesterday












Citrin is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















Citrin is a new contributor. Be nice, and check out our Code of Conduct.












Citrin is a new contributor. Be nice, and check out our Code of Conduct.











Citrin is a new contributor. Be nice, and check out our Code of Conduct.














Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55281418%2fandroid-how-to-add-byte-data-to-cloud-firestore-database%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript