parcel

RuntimeException: Parcel android.os.Parcel: Unmarshalling unknown type code when using android bundle

蓝咒 提交于 2019-12-13 14:22:14
问题 I am getting the below error message: java.lang.RuntimeException: Parcel android.os.Parcel@41141190: Unmarshalling unknown type code 7602286 at offset 16 at android.os.Parcel.readValue(Parcel.java:1921) at android.os.Parcel.readMapInternal(Parcel.java:2094) at android.os.Bundle.unparcel(Bundle.java:223) at android.os.Bundle.getFloat(Bundle.java:981) I am sending an object as a message using WiFi direct. Hence I am converting the object into byte array while sending and reversing the

Unmarshalling unknown type code 6881391 at offset 4752 After Upgrading to Support Libraries 23.2.0

。_饼干妹妹 提交于 2019-12-12 02:49:33
问题 My app has been working well at Support Libraries 23.1.1. However, after upgrading to Support Libraries 23.2.0, it starts to crash. The crash happens when I navigate from an activity back to the main activity (for example, I open the about activity from main activity's actionbar menu, then press back button to go back to main activity, then it crashes). The crash log is here: FATAL EXCEPTION: main Process: com.myapp.blah.blah, PID: 22124 java.lang.RuntimeException: Unable to start activity

startActivity(intent) is doing nothing

半腔热情 提交于 2019-12-11 18:44:47
问题 I'm trying to start an activity with a switch statement like that: public class MainActivity extends AppCompatActivity { public static String key = "1010"; private Bitmap bitmap = null; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } @Override public boolean onCreateOptionsMenu(Menu menu) { this.getMenuInflater().inflate(R.menu.items, menu); return true; } @Override public boolean

Typescript - How can I import png files into my typescript file?

为君一笑 提交于 2019-12-11 14:31:16
问题 I put up my own typescript project with the Parcel compiler and got everything running on the built-in server. I implemented pixi.js and wanted to import .png files into my .ts files. But when I try to import it says it can't find the module, even tho both files are in the same folder? What am I missing? I tried to do the following npm install @types/node --save-dev tsconfig.json (located in my root folder) { "compilerOptions": { "types": ["node"], "typeRoots": ["node_modules/@types"] } } 回答1

Android: Having Difficulty passing an Object from one activity to another using Parcel

别来无恙 提交于 2019-12-11 05:15:02
问题 I've read MANY articles on how to use Parcel and I've used it in my app but it isn't working. I've just created an activity where you can connect to a computer using Sockets . I've opened a java.io.PrintWriter on the Socket's OutputStream and I want to have another activity (which is opened on touching a button in the 1st activity) use this same PrintWriter . I think the mistake I'm making here is of not cloning PrintWriter object . I don't know how to clone it. Here's the 1st Activity (I've

Parcel, ClassLoader and Reading Null values

穿精又带淫゛_ 提交于 2019-12-11 03:56:59
问题 I am trying to understand how to read null values from Parcel properly. Let's look my use case: public class MyModel implements Parcelable { private Long id; private String name; public MyModel() {} public MyModel(Parcel in) { readFromParcel(in); } @Override public int describeContents() { return 0; } @Override public void writeToParcel(Parcel dest, int flags) { dest.writeValue(id); dest.writeValue(name); } public void readFromParcel(Parcel in) { id = (Long) in.readValue(Long.class

How to update kml file/layer dynamically?

三世轮回 提交于 2019-12-11 01:39:23
问题 I am using a kml file for displaying map with custom boundary lines. That kml file is downloaded from some website. In that file, inside the placemark tag there is no point tag for display icons. Eg: <Placemark> <name>Spot 2</name> <description>.....</description> <styleUrl>....</styleUrl> <MultiGeometry><Polygon><outerBoundaryIs><LinearRing><coordinates> ......... </coordinates></LinearRing></outerBoundaryIs></Polygon></MultiGeometry> </Placemark> That is what placemark tag contains in my

React application with external plugins

无人久伴 提交于 2019-12-10 09:56:16
问题 I'm building a React application bundled using Parcel or Webpack. The application should be able to embed external React components developed by third-parties and hosted elsewhere as modern javascript modules: // https://example.com/scripts/hello-plugin.js import React from 'react'; export default class HelloPlugin extends React.Component { render() { return "Hello from external plugin!"; } } Host application loads these components using asynchronous import like this, for example: //

What is the use of flags in Parcelable?

隐身守侯 提交于 2019-12-10 01:24:04
问题 I have been writing Parcelable s to Parcel without any focus on flags field, which is a parameter in the method signature and it has worked fine but I have run into an implementation where I can no longer ignore them: public static <K extends Parcelable, V extends Parcelable> void write(Parcel dest, Map<K, V> map, int flags) { if (map == null) { dest.writeInt(-1); } else { Set<Map.Entry<K, V>> entrySet = map.entrySet(); dest.writeInt(entrySet.size()); for (Map.Entry<K, V> entry : entrySet) {

TransactionTooLargeException only on Nougat [duplicate]

柔情痞子 提交于 2019-12-08 19:49:34
问题 This question already has answers here : android.os.TransactionTooLargeException on Nougat (13 answers) Closed last year . I've go an app that works well on devices with Android versions lower than Nougat. When I launch the app on a device with Nougat and I press home button, the app crashes and in logcat I have: !!! FAILED BINDER TRANSACTION !!! (parcel size = 1819712) Unhandled exception java.lang.RuntimeException: android.os.TransactionTooLargeException: data parcel size 1819712 bytes at