Android :: ClassNotFoundException When Using Custom Parcelable
Feb 21, 2010
I use a custom Parcelable to carry some data to a BroadcastReceiver. Here is what i do:
I register my intent and set the extra Parcelable on it along with an extra classloader (intent.setExtraClassLoader(..)). Next i schedule the execution of the broadcast via an AlarmManager.
So when the AlarmManager fires it looks at my intent with its parcel which it can not process since it doesn't use the supplied classloader (as it seams).
I think the classloader gets lost when Inten.fillIn copys the intent to a new one (see stack trace).
CODE:.......................
View 1 Replies
Jan 11, 2010
A component I have created works fine if I put it in the main project and reference it from any res/layout xml, but when I put it in a project on which the main project depends, I get a ClassNotFoundException in the xml.
Whilst after compiling the interface works fine, it is a pain in the * to design an interface without seeing what I am doing because of the error. Does anyone know how to solve it?
Stacktrace:
CODE:.........................
View 2 Replies
View Related
Oct 26, 2010
I have
ArrayList<String> ids = ArrayList<String>();
What would be the cleanest way to make it Parceleable? Apparently String itself is not parcelable, so Parcel.writeList(ids) is not working.I was thinking to either parcelize ArrayList<Uri> or put array contents into a Bundle.
View 2 Replies
View Related
Jul 23, 2010
Why does Android provide 2 interfaces for serializing objects? Do Serializable objects interopt with Android Binder and AIDL files?
View 1 Replies
View Related
Jun 11, 2009
I have a problem and cant realize a reason. I have ClassNotFoundException when starting Intent i = new Intent(EventInfo.this, AndricoMap.class); i.putExtra("address", address); startActivity(i);
There are log and class below
CODE:.....................
View 5 Replies
View Related
Sep 23, 2010
I have created and published my first android app. It's very simple. It works fine on simulator and some phones, but I am getting this error:
CODE:.......................
View 4 Replies
View Related
Feb 6, 2009
I follow the following example in creating a Parcelable object: http://code.google.com/android /reference / android /os / Parcelable .html . Writing unit test for parcelable object
View 4 Replies
View Related
Aug 16, 2010
I am following the Parcelable example in the Android developer guide with the intention of having a more complex object that I send to different activities. Right now, my class is a wrapper of a String member. If I put the object in the intent and read it back from the Intent it reads as expected, however, on the receiver side, it is always null-pointer.
View 1 Replies
View Related
May 20, 2010
I'm trying to create class with generics that will have ability to serialize its state using Parcelable interface.
The problem is that class has to contain constructor with single parameter - Parcel, but in my case I need to create class with additional parameters.
Besides, Parcelable.Creator doesn't allow to use generics.
Here is an example:
public class Sample<T> { ...
public Sample(Context ctx, SomeInterface iface, Parcel parcel) {...}
...}
What is the best practice to do it?
View 1 Replies
View Related
Aug 24, 2010
I am using the Hessian web protocol[1] or rather more the Android port Hessdroid[2] to fetch and unserialize objects from a web server. It works quite well but unfortunately I get this message:
CODE:......
When actually unserializing an object. The code within the library that throws the warning is:
CODE:.......
I guess the problem is that the class NewsSetCategory resides in a package and so cannot be loaded without the whole package name by the ClassLoader but this is a bling guess.
Is there a way to adapt the class path or to easily create a new PathClassLoader that will load classes directly from the package? Or does anybody else have any experience with Hessian on Android?
View 8 Replies
View Related
Jun 22, 2010
So I ran into a problem today while working on my Android program. I have a class that turns that an XML string into a Java object (third party) and it works fine in as a regular java project but on Android I get this weird error:
CODE:.......
I hide my application name and my package for obvious reasons but I was wondering if anyone has ever encountered problems like this. Class is in the correct package, which is a library I have added. Other classes that I reference before are there and those can be made. Are there any other reasons a ClassNotFound Exception is thrown?
View 2 Replies
View Related
Jun 18, 2010
I have seen examples implementing a custom Filter. The Android developer docs talk about implementing a Filterable interface. Does anyone have any advice and/or sample code on the best way to implement filtering in a ListView ?
View 2 Replies
View Related
May 3, 2009
I am writing a custom preference dialog derived from DialogPreference and I want to pass some custom attributes to the dialog through the preference's XML definition. Here's my preference.xml file:
CODE:...............
View 2 Replies
View Related
Mar 1, 2010
I am trying to get the images to have transparent backgrounds so the map is not blocked by a square marker with an image in it. What image editor and what settings should I use to get this to work?
I am trying to do some custom backgrounds for buttons and the same problem comes up: I get square corners and a background that does not scale with the buttons.
I think this all part of the same problem: I am not using the right tool with the right settings to create the images. I must be misinterpreting the documentation and examples that talk about a white border around the image and a black line along the top and left side for the expandable button background.
Here's a quick way to reproduce the problem:
Follow the directions to create the MapView program as described on:
http://developer.android.com/resources/tutorials/views/hello-mapview.html
For the icon I first used the image copied from the page:
Next I edited the picture in Microsoft Paint, and cut off the little guy's antennae. I'm not cruel and no real androids were harmed in that experiment. I surrounded the new picture with a pixel thick border of white, copied from the border that was around the rest of the image, and then copied the black that was there as well in the void areas of the image, outside the border.
I saved the image as myandroid.png and copied the file to the layout folder. Pointed the activity to the new pic and ran the program.
The image was displayed with a full square background and shadow, not the android shaped image and shadow that was there when the original image was used.
Custom Button background:
Follow the directions for the Relative Layout example at:
[url]
Next, I created an image to expand as a background for the button called backbutton.png. It too is surrounded by a white border and black filled on the corners, the top and one side per documentation I found in "Android Programming Tutorials" on page 298.
The background does not expand, nor do the corners round.
I wish I could show you screenies of what I have.
How do you create the images for the custom backgrounds and the images for the custom map markers and buttons? I need to know what image editor to use and the file attributes to set, so the images expand and display with the proper void spaces in them.
View 2 Replies
View Related
Sep 18, 2009
I try to implement a custom button(OnPressButton), and the code is in below. In LogCat, I can see the two parameters (btn_up/btn_down) value are below:
btn_up=@drawable/btn_up btn_down=@drawable/btn_up
But how can I convert this to point to R.drowable.btn_up and R.drowable.btn_down ?
CODE:....................
View 2 Replies
View Related
Jul 8, 2009
I'm creating my own View class, and defining custom xml attributes with a attrs.xml. As long as I provide each attribute manually, there is no problem, but
code:...................
The android:text is properly set in my instance, but the borderDrawable is not. I guess this has something to do with namespaces, because inside the styles.xml, the name="mypack:borderDrawable" is not handled by the XML parser's namespace facility, because its inside an attribute value. So "mypack" is in no way connected to "http://some.weird.url.com/seems/not/to/ matter" and adding it via xmlns:mypack... to the stylefile would not help, I guess. In the same file, "android:text" is somehow recognized, even though "android" is AFAIK only a ns-defintion for [url], which is also not declared in that file.
So what is the proper way to set a custom attribute in a style?
View 3 Replies
View Related
Feb 21, 2014
I just went through the process of compiling a custom ROM and they used a stock kernel. I would like to incorporate a different kernel when I compile and instead of the stock. I know I could compile them separately and have them flash together but I want one zip to flash. Just would like to go through the process to learn.
what I have to do when compiling?'
View 9 Replies
View Related
Aug 31, 2010
I have written an application(.apk) which i would wish to be run on boot-up . how to implement this?
View 2 Replies
View Related
Oct 11, 2010
I'm having a really hard time understanding how to use custom tabs in android. I don't want to just be able to set the text and stuff. How can I change the size, and the image, and all that.
View 1 Replies
View Related
Aug 16, 2010
im having a problem getting a custom view that i created on the xml layout file. i have a class named DrawingLayout which extends FrameLayout. it is found in the package Drawing
as stated on this page http://developer.android.com/guide/topics/ui/custom-components.html i used the following decleration in xml
<Drawing.DrawingLayout ... />
but whenever i run the program with that decleration i get a runtime exception error on SetContentView( ... )
is there something im not doing well? If you need any more details please tell me because i cant seem to figure this one out.
View 3 Replies
View Related
Sep 15, 2010
I was wondering what the feasibility would be for creating a custom Android build and deploying it on a currently available device on the market. Are there any documents or guidelines that describe the process?
View 3 Replies
View Related
Mar 9, 2010
The default drop down view of the spinner occupies the entire width of the screen. I tried to create a custom spinner which occupies only some portion of the width of the screen, but I'm unable to do. I want to see the objects behind the drop down. Here is what i tried, I changed the drop down view as,
adapter.setDropDownViewResource(R.layout.simple_spinner_dropdown_item); instead of
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
In the layout.simple_spinner_dropdown_item.xml file I specified the width, but it still occupies the entire width. Can any one help. Is there any other view which is similar to spinner but I should be able to see the background objects like a alert dialog. Is it really possible?
View 9 Replies
View Related
Apr 14, 2010
I have an XML file in my layout folder that has how i want my custom widget/view (not sure what correct terminology is here).but how do i make it so that i can programatically, add one or more to an activity
View 2 Replies
View Related
Sep 6, 2010
I applied custom font to an TextView, but it doesn't seems to change the typeface.
Here is my code:-
CODE:...............
View 2 Replies
View Related
Sep 9, 2010
I am trying to use custom font in android. I have written java code as given below.
CODE:.........
Where I have stored the custom font in "./assets/fonts/" folder.
But, I am getting nullpointerexception on the 3rd line.
View 1 Replies
View Related
Oct 7, 2010
Is there any chance of making Scroll bar like this by using existing android's Scroll view s .
View 2 Replies
View Related
Nov 17, 2010
I want to get the number of launcher:cellWidth in xml:
CODE:.........
I know that I can get it in a Custom view by:
CODE:....................
But how Can I get it in a Activity? not a Custom view.
View 1 Replies
View Related
Mar 6, 2009
I have a third-party jar file which I would like to use in my Android application. Is it possible? Or are we restricted to using only those jar files which are provided with the SDK?
View 10 Replies
View Related
Oct 12, 2009
I'd like to no if there's any possibility for an application to provide a custom ANR message to be displayed to the user? This will make sure that the customer is not confused when an ANR pops up.
View 5 Replies
View Related
Sep 2, 2010
I've got a custom xml file in my res/xml folder, and it's not an android xml file (in that it doesn't describe a button or set of views or anything, just data for my app) and now I want to read it with an XML Pull Parser, but I don't know where to find it on the android file system. I've googled a little bit and I cannot come up with a document that shows what the android file system even is. (I'm sure it's out there). Can anyone tell me how to find the xml file? or point me to a doc that tells me how to do the same?
View 3 Replies
View Related