Android :: Simple Binary Text Clock - Application Crashes?
May 13, 2010
I want to create a simple android binary clock but my application crashes. I use 6 textview fields: 3 for the decimal and 3 for the binary representation of the current time (HH:mm:ss).
Here's the code:
CODE:........................
View 1 Replies
Oct 3, 2010
I've been writing a simple drawing App as homework for university. Drawing works fine, but the canvas should also be cleared when the App is coming back from the background. When switching back i get the following code...
View 2 Replies
View Related
Oct 18, 2009
I am using the Android Emulator to debug my application, first off it is ridiculously slow, I mean like 15mins to load slow and on top of it, my Alarm Clock application fails?Am I the only one, or do other people experience this? Is there a fix or will I just have to go cook steaks while the emulator is booting?
View 3 Replies
View Related
Apr 28, 2010
I have yet to try this on an actual device, but expect similar results. Anyway, long story short, whenever I run my app on the emulator, it crashes due to an out of memory exception.
My code really is essentially the same as the camera preview API demo from google, which runs perfectly fine.
The only file in the app (that I created/use) is as below-
CODE:..................
View 2 Replies
View Related
Aug 24, 2010
Im looking for a digital clock widget that is just the clock. No weather or anything like that. Sounds simple enough? Well, the problem is, I find all these nice clocks but theyre all 1x2 or even 1x1. Im looking for something atleast 1x4. 2x4 is fine also. I like beautiful widgets but I dont want the weather.
View 11 Replies
View Related
Oct 5, 2010
I've been looking everywhere but nowhere can I find an app that's just a plain digital clock, just like the one that appears on the locked phone screen. Something simple, unobtrusive, and easy to read.
View 1 Replies
View Related
Aug 13, 2010
I am developing a financial app that stores data in a file.I have noticed that text file i/o is pretty slow. If I switch to a binary format, how much faster will it be? 2x? 10x?I could write my own timing tests but I am hoping someone else has already done it.
View 3 Replies
View Related
May 12, 2010
I thought this would be easy to find:
A text editor that can create/edit text files from the SD card.
i.e. Windows Notepad on the Desire?
View 4 Replies
View Related
Sep 19, 2009
I think I already know the answer to these, but I'm going to ask anway:
1) Is there a straightforward way to set the background color of a tab in its unselected state?
2) Is there a simple way to align the text on a tab?
View 2 Replies
View Related
Nov 16, 2010
intentTest.java:
package intentTest.xyz.com;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button
public class intentTest extends Activity {
Button b;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
b = (Button) findViewById(R.id.b);
b.setOnClickListener( new View.OnClickListener() {
public void onClick(View view) {
Intent intent = new Intent(intentTest.this,seond.class );
startActivity(intent);
}});
}}
main.xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="First screen"
/>
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="click"
android:name="@+id/b"
/>
</LinearLayout>
seond.java:
package intentTest.xyz.com;
import android.app.Activity;
import android.os.Bundle;
public class seond extends Activity{
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.second);
} }
second.xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="second screen"
/>
manifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="intentTest.xyz.com"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".intentTest"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".seond"></activity>
</application>
</manifest>
I get the following error code:
11-16 01:26:07.156: ERROR/AndroidRuntime(779): Uncaught handler: thread main exiting due to uncaught exception
11-16 01:26:07.166: ERROR/AndroidRuntime(779): java.lang.RuntimeException: Unable to start activity ComponentInfo{intentTest.xyz.com/intentTest.xyz.com.intentTest}: java.lang.NullPointerException
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2401)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at android.app.ActivityThread.access$2100(ActivityThread.java:116)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at android.os.Handler.dispatchMessage(Handler.java:99)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at android.os.Looper.loop(Looper.java:123)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at android.app.ActivityThread.main(ActivityThread.java:4203)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at java.lang.reflect.Method.invokeNative(Native Method)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at java.lang.reflect.Method.invoke(Method.java:521)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at dalvik.system.NativeStart.main(Native Method)
11-16 01:26:07.166: ERROR/AndroidRuntime(779): Caused by: java.lang.NullPointerException
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at intentTest.xyz.com.intentTest.onCreate(intentTest.java:18)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2364)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
... 11 more
View 5 Replies
View Related
Dec 7, 2009
I want to use a map in my application but I can't get it to run.
It always crashes with the following error:
CODE:.....
My XML file:
CODE:...................
My layout:
CODE:...............
In my code I add the map like this:
CODE:.............
View 5 Replies
View Related
Jun 17, 2010
Can someone explain to me why this AlertDialog crashes? code...
View 1 Replies
View Related
Nov 19, 2010
In my application I've implemented such that pressing the hardware volume keys displays a Toast with the current volume. Things go well most of the times. However long presses of the volume keys do succeed in crashing my application. The Log generated on crash is the following...
The approach I follow:
I have a toast Object and for every key press event detected I inflate a view ,set the view elements within, set it to the toast and then show the toast.
Any idea what is going wrong ? code...
View 1 Replies
View Related
May 26, 2010
My app crashes when the device orientation changes..Tried debugging on real device, but I have no clue where the crash exactly happens.. I would appreciate if someone could throw some light on this:
Below is the error log...
View 2 Replies
View Related
Jan 18, 2010
I am trying to run an application on an android emulator, but it crashes. i am following a howto
i don't know what to do, it just crashes. other applications are running fine, can anyone tell me what i am doing wrong.here is the code...
View 4 Replies
View Related
Sep 2, 2010
I want to do very simple android program,
Refer some good tutorial.
View 3 Replies
View Related
Nov 24, 2010
So I started with this little write-up. I wanted to try to make an application that will take pictures while running in the background. To start though I wanted an application that once opened would simply take a picture every X seconds. After recreating the classes and methods show in the walk through below I ran into a few problems.
http://itp.nyu.edu/~sve204/mobilemedia_spring10/androidCamera101.pdf
For starters its seems that the onCreate function sets up all the objects for the application, but if you try to take a picture through any other method than onClick (IE directly calling it) the application actually hasn't setup the canvas or the preview yet.
My first question:
Is there any conditional method that you can setup that will wait till all the "onCreate" objects are created and their associated methods are called and finished? How do I wait for the application to finish putting together my surface and starting the cameras preview before automatically starting to take pictures?
My second question:
I am required to have a preview available to take pictures. Is there anyway to push this application to the back (IE running in the background) while still taking pictures? Is drawing to a canvas a requirement? (From what I can tell AFAIK, you are required to have a surfaceholder to start preview, when you put up another screen or application that pauses the current application and closes the surface/canvas you were presenting that preview on). If my understanding is correct on all of this the best I will be able to do is make a 1x1 pixel canvas that will still take up the screen due to the application being in the foreground.
My Third question:
Is there any way around this? Can you still utilize the camera in some fashion without requiring the preview be drawn?
View 1 Replies
View Related
May 21, 2010
My app is using the camera on the phone. For phones w/ 2.0+ I have been able to activate the Flash. When I test on a phone with 1.5 OS on it the app crashes. I get: java.lang.reflect.InvocationTargetException and the Cause is java.lang.VerifyError: fishers.Nav.TakePicture$1
I assume because you have to access the flash differently in apps below 2.0? Can anyone give me some advice or links to examples showing how I could make it work over the whole range of Operating System version or is that just not at all do-able?
View 5 Replies
View Related
Nov 11, 2010
I have a small mp3 (326KB) in my res/raw folder. In my code, I have mPlayer = MediaPlayer.create(FakeCallScreen.this, R.raw.sample); Player.prepare(); mPlayer.start(); The application just crashes when it tries to start the activity, I cannot figure out why.
View 2 Replies
View Related
Sep 20, 2010
I have registered a Receiver component for ON_BOOT_COMPLETED broadcast, in my application. The receiver does just prints a line in its onReceive() callback. However, when I boot the emulator(by executing Run as->Android application command from Eclipse) and unlock the screen on start up, I get an ANR dialog displayed in my Application. Following are the exceptions logged:
CODE:.............................
View 4 Replies
View Related
Jan 18, 2010
I am very new to android programming. i was following a guide in here, to create an application that shows the current location, i did as was told in the guide, but whenever i try to run it, it crashes, and asks for "force Close",
does somebody know what i am doing wrong? here is the code....
View 2 Replies
View Related
Sep 10, 2010
I've got a little problem...Well, let me first state what I'm trying to accomplish. I had a spinner that pulls strings out of a stored array.
Like so, you dont need to read it though:
CODE:...........................
So far I've got a custom SimpleAdapter.
Here is the Problem!! : the text comes up but not the image. Heres the code:
CODE:........
I plan to use a switch statement to set different images to each name. however i stopped here until i can get any image to show. How i'm calling
CODE:........................
View 1 Replies
View Related
Feb 10, 2009
I am trying to make a simple application to parse the XML using SAXParser but it is not finding the xml file which I have added in the project. How and where should I add the XML file?
View 6 Replies
View Related
Jun 14, 2010
Shown are a few lines of code. If I play a single sound, it runs fine. Adding a second sound causes it to crash.
private SoundManager mSoundManager;
/** Called when the activity is first created. */
@Override public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); setContentView(R.layout.sos);
mSoundManager = new SoundManager(); mSoundManager.initSounds(getBaseContext());
mSoundManager.addSound(1,R.raw.dit); mSoundManager.addSound(1,R.raw.dah);
Button SoundButton = (Button)findViewById(R.id.SoundButton);
SoundButton.setOnClickListener(new OnClickListener() {
public void onClick(View v) { mSoundManager.playSound(1);
mSoundManager.playSound(2); } } ); }
View 1 Replies
View Related
Jan 25, 2010
I have a G1 Android that's been rooted. My problem is that Market and Gmail crashes on launch. I also cannot get to the Data Synchronization page. It displays the page for a split second and then instantly closes out. Is there a way to reset the apps? I've tried factory reset and upgrading to a newer version of Cyanogen mod without success.
View 1 Replies
View Related
Oct 19, 2010
I am writing an android application that check the username and the password of the user once a login button is clicked
i run the app in the emulator and when i click on login button the application is crashed code...
View 1 Replies
View Related
Aug 26, 2010
I am new to Android.. and smartphones for that matter. I am looking for a very simple app that has bill reminders. I do not really want it to have access to the network, therefore using data constantly.
I guess I just want to be able to put in my bills and have them show up on a screen so I can see what is due, and paid. A pop up reminder would be okay.
I downloaded Astrid, but it looks like that one uses network access constantly. I prefer this to not be the case. Does an app of this sort that does not access the network whenever it wants even exist?
View 2 Replies
View Related
Sep 12, 2010
My Android Desire is a superb device and will do almost anything I want. Even cleans up around the house and makes coffee and feeds the cat. However, there is one simple thing I cannot get it to do: provide me with a simple text editor like Wordpad so that I can write little texts on the go. I've searched everywhere for this function. I cannot imagine that it is missing from the phone, it's so basic. When I search for "text" I get all sorts of stuff on writing "text" messages, i.e. SMS messages (the term "text" seems to have lost its original meaning and is now used almost exclusively to refer to SMS messages). Where is the Desire equivalent of Wordpad or Notepad or, better, Notepad++?
View 33 Replies
View Related
Jan 15, 2010
I am having search application, which loads data retreived from the webservice.While application on create it shows progress dialog once its done with loading data it dismiss the progress dialog.problem is while loading if i change the orientation of the phone it works fine it try to load activity again, but if i start shaking the cellphone while it is loading data application get crashed, any solution?
View 1 Replies
View Related
Jan 14, 2010
I'm nearly ready to publish my OpenGL game. I've been browsing this newsgroup and I've seen quite a few posts regarding crashes, blank screens, etc when running an OpenGL application on the Droid. I have three questions:
1) What are some common pitfalls that occur when trying to support the Droid/Nexus One? So far, I've tested my game on the Android 2.0 emulator (both WVGA & FWVGA) and everything works fine but I'm still paranoid.
2) I've placed my textures (png) in the assets folder. Will these images be pre-scaled automatically? I've read about specifying density independent images for resources but do the same rules apply for images stored in the assets folder? I'm afraid that pre-scaling will cause my textures to become non-power of 2.
3) What additional strategies have developers been taking to ensure their application works on the newer devices when they only have access to G1/G2 hardware?
View 10 Replies
View Related