Android :: Component ClassNotFoundException ?
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
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
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
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
Aug 20, 2009
I am putting one spinner and one button using following code. Can some one tell me how can i put some space between it?
View 4 Replies
View Related
Aug 31, 2010
Service Component is used to do some task which can be done without user interaction. But for that we have to run a thread in subclass of the Service. I think we can create a thread in Activity class itself then what is the use of Service component? Why don't we create another thread and write the non interacting code in this thread.
View 10 Replies
View Related
Apr 30, 2010
I have almost completed my Android application so am considering ways of distributing the application. I have seen some applications on Market have free limited/locked version and separate Unlock Key/License Key which unlocks extra functionality. How is this done? Has anyone here done this? If so, how well does it work? I am thinking maybe this is better then having two versions of the same application (i.e Lite and Pro).
View 1 Replies
View Related
Nov 18, 2010
I've created a custom component which works like a lock of a safe. customspinner - Project Hosting on Google Code on picture you see two different objects of my component.
If you need to create UI when user need to choose some element of a list, using this non standard component will be more intresting for user. And it is usefull - user can scroll and find a needed value very quickly.
View 4 Replies
View Related
Jul 9, 2010
I have created a simple class named Panel which extends the SurfaceView class and does some drawing in the onDraw method. When I use it from the code it works fine. For example this works as expected:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(new Panel(this)); ....
However when I try adding this component from an xml layout the program crashes:
XML file (main.xml):
<?xml version="1.0" encoding="utf-8"?> <org.anddev.Panel android:id="@+id/panel" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android"/>
Code:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);....
Error msg: Sorry!
The application Test (process org.anddev) has stopped unexpectedly. Pleas try again.
I can not figure out why the same class works when created in one way and doesn't work when created in another.
View 3 Replies
View Related
Aug 2, 2010
I am trying to integrate VP8 video codec into PV opencore FW in Froyo & test at PV test application level. I have done the following steps, 1. Made a new folder for vp8 @ external/opencore/codecs_v2/omx/ omx_vp8. 2. Made appropriate modifications in the omx_baseclass, omx_common etc. 3. Modified the PV test app (external/opencore/codecs_v2/omx/ omx_testapp) for testing VP8. 4. included the VP8 source code to froyo. 5. Included new oscluuid for VP8 With these modifications, the build is fine. The shared libraries and binaries are creating properly. Also OMX-MasterInit is passing. But the application fails at OMX_GetHandle(). *pHandle is coming as zero. I am using the PV OMX core. I am just adding a new codec which is not supported by PV Opencore and test at PV test_app level.Can you please answer my below queries: 1. Do we need to change the pvplayer.cfg file? Bcoz i am using the PC omx_core itself. 2. Any other changes needs to be done for integrating a new component into Opencore? Please provide you valuable inputs. Let me know if need any additional informations.
View 4 Replies
View Related
Jun 26, 2009
My company is in the process of evaluating if we can add support for Android to our product. I am currently working on porting our existing J2ME library to the Android framework and I have a question regarding our UI component. Right now, we have a custom menu that we allow our developers to bring up on the device. On J2ME, we simply have a single call that the developer makes to enter into the menu and then we handle the rest. On Android, it seems the best way to handle this is an Activity. But I have a few questions regarding this approach including is the really the best way to do something like this? Second, if it is, if there are multiple applications on the device that are using our library, are there going to be conflicts with them all having the same Activity embedded in them? Is it possible to create an Actvity at runtime and use it directly? Would there be any side effects of going about it this way?
View 2 Replies
View Related
Feb 14, 2009
I am working on couple android applications which share a common component. The component has Activities, Service and own AndroidManifest.xml. After research, it seems there is no concept of run time share library among applications in Android. So I am looking for a way to linked the share component with other applications at compile time. Applications which will use the component can come from external, therefore I will only provided the compiled file. I would like to build the component into own apk or jar file, can external application include my jar/apk file into their package and be able to start my activity? Please share your experience and advice.
View 3 Replies
View Related
May 27, 2010
I am looking for a calendar UI. Something like the Calendar UI of the Calendar Android Application but only with the view. (I know that's open source so I can extract the UI but it's a long process to remove all the staff unnecessary) Is there any open source Calendar UI project for android ?
View 2 Replies
View Related
Mar 9, 2010
IN our current project, I need to make a UI describled as follows.
Basically it is a text input, it will display a string returned from server , such as "I like banana". The word "banana" will be in red color. When user clicks "banana", it will have a dropdown list shows "apple, orange, pear". User would be able to select one of them, like apple. So the text in that UI would be "I like apple".
How could I build such a UI component in Android.
View 2 Replies
View Related
Nov 20, 2010
How do i do a if statement but i want like: else if not edittext.getText.toString.contains("hello") then doCode. and how do i setfocus on a component and remove the focus can not really figure that out.
View 2 Replies
View Related
Nov 2, 2009
I want to make Ticker Component but i dont know how to do this. I have seen "Marquee" but it start scroll on focus but i dont want. I want to scroll text if it is focused or not means in both conditions.
View 3 Replies
View Related
Sep 17, 2010
I am doing authentication with a third-party site that's supposed to redirect back to my app with auth token (OAUTH).
I have the callback working properly if I open the 3rd party site in a separate browser process via this.startActivity(new Intent(Intent.ACTION_VIEW, uri));
But, if I embed a WebView component in my layout, and open the url in that, the callback does not work. Webview says "You do not have permission to open myapp://callback?token=...." and quickly refreshes to "Web page not available...temporarily down..."
View 1 Replies
View Related
Jul 19, 2010
I am trying to get a SharedPreferences object from the PreferenceManager but don't want to pass in the Context to the class.
Can I get a "global" context from inside my class?
CODE:...................
View 1 Replies
View Related
Jun 17, 2009
First of all let me say that i am new to the JNI. However, i gathered some knowledge about it. As i was going through the android_media_MediaPlayer.cpp in ase mediajni to understand the way of operations of the android media framework, i saw the signatures of the JNI functions don't contain JNIEXPORT and JNICALL macros. Have these macros become redundant in JNI 1.4?
View 2 Replies
View Related
Jan 8, 2010
I am a game developer and have developed a nice global high scores module. The source code is in two different games of mine and anytime I make changes I carefully copy and paste the java files from one project to the other. As I increase the sophistication of this module, the copying and pasting can take a day or two to make sure I get it right. Now I am finishing up my third game and want to add the high scores module, but copying and pasting this in three separate projects seems absurd and will take up much of my time! Is there any way to externalize this module?
Unfortunately, the module makes reference to R for strings, layouts and other resources. It also uses common Android functions and resources from the Android library. Almost anything would be easier than the method I am using now--so any and all suggestions are welcome!
View 2 Replies
View Related
Oct 15, 2010
I developed my application and tested it on android emulator 1.6, 2.1 & 2.2 and on HTC Magic
its running PERFECTLY and the gui components look very neat...
However, when I tested it on Sony Ericsson Xperia X10 the gui components are looking fuzzy........
View 1 Replies
View Related
Mar 29, 2010
I'm trying to create a component using an xml layout file. I defined a layout with some custom attributes. This layout is inflated when user add it inside another layout. My problem is I don't know the parent, so I pass null for the parent viewgroup when I call inflate method. I think that's the reason why I see anything in my view. Do you know how can I do (I don't want to redefine onDraw method because I use existing component). Below my xml layout and my custom class.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content">
<ImageView android:id="@+id/img_btn_option" android:layout_width="wrap_content" android:layout_height="wrap_content"/>
<TextView android:id="@+id/txt_btn_option" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_toRightOf="@id/img_btn_option"
android:textColor="@color/font_white" android:textStyle="bold"/>
</RelativeLayout> public class ButtonOptionsView extends View {
public ButtonOptionsView(Context context, AttributeSet attrs) {
super(context, attrs);
LayoutInflater li =(LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
RelativeLayout vg =(RelativeLayout)li.inflate(R.layout.button_option, null);
TypedArray ta = getContext().obtainStyledAttributes(attrs,R.styleable.ButtonOption);
((ImageView)vg.findViewById(R.id.img_btn_option)).setImageResource(ta.getResourceId(R.styleable.ButtonOption_image,0));
((TextView)vg.findViewById(R.id.txt_btn_option)).setText(ta.getResourceId(R.styleable.ButtonOption_text,0));}
View 4 Replies
View Related
Dec 8, 2009
I've made a little test component that overrides ImageView, called myImageView, and prints some text and an arrayList of Doubles over whatever image is specified in the related xml. However, right now, the text and Doubles that are drawn over the image are defined within the myImageView class. Is there a way to pass the data from the main onCreate function to the myImageView class before the layout is drawn?
I'm new to OO programming, but based on my understanding of this:
http://developer.android.com/guide/topics/ui/custom-components.html
It's possible because ImageView is just like any other class. This leaves me with two initial guesses:
1. I could generate my test data in the main onCreate, and store it in the array's xml file, and then read that xml file with myImageView,
OR
2. I could extend view instead of ImageView, but because of my new- ness, then I would lose the ability to use it in an xml layout sense - and that's what I really want.
View 2 Replies
View Related
Jul 25, 2010
Could developer upload 'component'/SDK to android market? Now it seems only have 2 type: 'application' and 'Game'. I just wonder if android market has the mechanism for developers to upload component-wise programs which can be used in others's application. Then developers may get benefit from earch others. Or Is android provide a easy way to invok and communicate with other application from one application?
View 4 Replies
View Related
Mar 16, 2009
Wondering if we have few buttons on a LinearLayout, is it possible to set focus to a button programmatically?
View 4 Replies
View Related
Feb 18, 2010
I'll preface this with, I've just started learning Android so be gentle.
I come from an ASP.NET / Silverlight background so I was looking for something along the lines of controls.
I want to reuse a layout (a ListView item template) in other layouts.
Such that in my other layouts I can just add <myListItem /> to show it.
Is this, or anything like it possible? or are there better ways?
View 3 Replies
View Related
Jun 11, 2009
I'm just starting out on Android and Java programming, coming in from a C++ background. I was wondering - whats the best way to go about making a library/UI widget/component that I can license to third-party developers?
In C++ I'd ship the customers my headers and *.a files, but I don't know the equivalent in Java. Are there any good resources or links about this, maybe even from general Java development standpoint.
View 3 Replies
View Related
Apr 3, 2009
I want run my application in background, with "Service component", If the application is running in background then there should be icon of application, so when user click on icon the application should come in fore ground. Is this possible in Android, anybody having suggestions plz welcome. There is provision of Notification Manager for icon, but it is not reacting to user events. Is there any other way to this.
View 4 Replies
View Related