How to send large byte arrays between activities in Android?

后端 未结 3 1196
我在风中等你
我在风中等你 2020-12-11 03:36

I need to send byte[] data from Activity1 to Activity2, in order to writedata(\"FileOutputStream.write(data)\") in a jpg

3条回答
  •  被撕碎了的回忆
    2020-12-11 04:24

    Following are the steps:

    1) Create table in sqlite with byte and id columns 2) Save this byte and his id (you will give) from Activity 1 3) Go to Activity 2 (do not forget to send parameter id) 4) In Activity 2 get this parameter from intent and query database using id to get you byte.

    I hope this helps.

提交回复
热议问题