Android :: Add Integer To Screen And Print Answer Loop Wise

Aug 31, 2010

Rather than do this by just creating a lot of strings (which I've already managed), I want to add an integer and then print those list to the screen. At the moment, I'm just trying to get one integer on the screen without even adding it, but the app is "force closed" in the emulator. Why doesn't this work? Add one to it and then print the answer to this for a given loop (say up until 10).

Code:
package com.monkeez.count;
import android.app.Activity;
import android.os.Bundle;
import android.app.Activity;
import android.view.View;
import android.widget.TextView;
public class Count extends Activity {
/** Called when the activity is first created. */
TextView countDisplay;
@Override public void onCreate (Bundle savedInstanceState) { int counter = 1;
countDisplay = new TextView(this);
this.setContentView(countDisplay);
countDisplay.setText("counter here");
} }

The log cat is thus:
09-01 09:54:07.051: DEBUG/AndroidRuntime(279): AndroidRuntime START
09-01 09:54:07.051: DEBUG/AndroidRuntime(279): CheckJNI is ON
09-01 09:54:07.401: DEBUG/AndroidRuntime(279): --- registering native functions ---
09-01 09:54:08.891: DEBUG/dalvikvm(193): GC_EXPLICIT freed 320 objects / 19376 bytes in 109ms
09-01 09:54:09.041: DEBUG/PackageParser(65): Scanning package: /data/app/vmdl48927.tmp
09-01 09:54:09.251: INFO/PackageManager(65): Removing non-system package:com.monkeez.count
09-01 09:54:09.251: INFO/ActivityManager(65): Force stopping package com.monkeez.count uid=10037
09-01 09:54:09.991: DEBUG/PackageManager(65): Scanning package com.monkeez.count
09-01 09:54:09.991: INFO/PackageManager(65): Package com.monkeez.count codePath changed from /data/app/com.monkeez.count-2.apk to /data/app/com.monkeez.count-1.apk; Retaining data and using new
09-01 09:54:10.011: INFO/PackageManager(65): /data/app/com.monkeez.count-1.apk changed; unpacking
09-01 09:54:10.054: DEBUG/installd(34): DexInv: --- BEGIN '/data/app/com.monkeez.count-1.apk' ---
09-01 09:54:10.511: DEBUG/dalvikvm(286): DexOpt: load 169ms, verify 64ms, opt 4ms
09-01 09:54:10.591: DEBUG/installd(34): DexInv: --- END '/data/app/com.monkeez.count-1.apk' (success) ---
09-01 09:54:10.602: WARN/PackageManager(65): Code path for pkg : com.monkeez.count changing from /data/app/com.monkeez.count-2.apk to /data/app/com.monkeez.count-1.apk
09-01 09:54:10.602: WARN/PackageManager(65): Resource path for pkg : com.monkeez.count changing from /data/app/com.monkeez.count-2.apk to /data/app/com.monkeez.count-1.apk
09-01 09:54:10.611: DEBUG/PackageManager(65): Activities: com.monkeez.count.Count
09-01 09:54:10.650: INFO/ActivityManager(65): Force stopping package com.monkeez.count uid=10037
09-01 09:54:11.631: INFO/installd(34): move /data/dalvik-cache/data@app@com.monkeez.count-1.apk@classes.dex -> /data/dalvik-cache/data@app@com.monkeez.count-1.apk@classes.dex
09-01 09:54:11.641: DEBUG/PackageManager(65): New package installed in /data/app/com.monkeez.count-1.apk
09-01 09:54:11.821: DEBUG/dalvikvm(65): GC_FOR_MALLOC freed 6733 objects / 446400 bytes in 140ms
09-01 09:54:12.561: INFO/ActivityManager(65): Force stopping package com.monkeez.count uid=10037
09-01 09:54:12.711: DEBUG/dalvikvm(126): GC_EXPLICIT freed 1940 objects / 106408 bytes in 121ms
09-01 09:54:13.351: WARN/RecognitionManagerService(65): no available voice recognition services found
09-01 09:54:13.831: DEBUG/dalvikvm(65): GC_EXPLICIT freed 4667 objects / 280056 bytes in 173ms
09-01 09:54:13.901: DEBUG/dalvikvm(165): GC_EXPLICIT freed 2326 objects / 125088 bytes in 1059ms
09-01 09:54:14.180: INFO/installd(34): unlink /data/dalvik-cache/data@app@com.monkeez.count-2.apk@classes.dex
09-01 09:54:14.271: DEBUG/AndroidRuntime(279): Shutting down VM
09-01 09:54:14.290: DEBUG/dalvikvm(279): Debugger has detached; object registry had 1 entries
09-01 09:54:14.340: INFO/AndroidRuntime(279): NOTE: attach of thread 'Binder Thread #3' failed
09-01 09:54:15.350: DEBUG/AndroidRuntime(291): AndroidRuntime START
09-01 09:54:15.350: DEBUG/AndroidRuntime(291): CheckJNI is ON
09-01 09:54:15.740: DEBUG/AndroidRuntime(291): --- registering native functions ---
09-01 09:54:16.960: INFO/ActivityManager(65): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.monkeez.count/.Count }
09-01 09:54:17.120: DEBUG/AndroidRuntime(291): Shutting down VM
09-01 09:54:17.170: DEBUG/dalvikvm(291): Debugger has detached; object registry had 1 entries
09-01 09:54:17.250: INFO/AndroidRuntime(291): NOTE: attach of thread 'Binder Thread #3' failed
09-01 09:54:17.301: INFO/ActivityManager(65): Start proc com.monkeez.count for activity com.monkeez.count/.Count: pid=298 uid=10037 gids={}
09-01 09:54:18.611: WARN/ResourceType(298): No package identifier when getting value for resource number 0x00000001
09-01 09:54:18.620: DEBUG/AndroidRuntime(298): Shutting down VM
09-01 09:54:18.620: WARN/dalvikvm(298): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
09-01 09:54:18.680: ERROR/AndroidRuntime(298): FATAL EXCEPTION: main
09-01 09:54:18.680: ERROR/AndroidRuntime(298): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.monkeez.count/com.monkeez.count.Count}: android.content.res.Resources$NotFoundException: String resource ID #0x1
09-01 09:54:18.680: ERROR/AndroidRuntime(298): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
09-01 09:54:18.680: ERROR/AndroidRuntime(298): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
09-01 09:54:18.680: ERROR/AndroidRuntime(298): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
09-01 09:54:18.680: ERROR/AndroidRuntime(298): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
09-01 09:54:18.680: ERROR/AndroidRuntime(298): at android.os.Handler.dispatchMessage(Handler.java:99)
09-01 09:54:18.680: ERROR/AndroidRuntime(298): at android.os.Looper.loop(Looper.java:123)
09-01 09:54:18.680: ERROR/AndroidRuntime(298): at android.app.ActivityThread.main(ActivityThread.java:4627)
09-01 09:54:18.680: ERROR/AndroidRuntime(298): at java.lang.reflect.Method.invokeNative(Native Method)
09-01 09:54:18.680: ERROR/AndroidRuntime(298): at java.lang.reflect.Method.invoke(Method.java:521)
09-01 09:54:18.680: ERROR/AndroidRuntime(298): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
09-01 09:54:18.680: ERROR/AndroidRuntime(298): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
09-01 09:54:18.680: ERROR/AndroidRuntime(298): at dalvik.system.NativeStart.main(Native Method)
09-01 09:54:18.680: ERROR/AndroidRuntime(298): Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x1
09-01 09:54:18.680: ERROR/AndroidRuntime(298): at android.content.res.Resources.getText(Resources.java:201)
09-01 09:54:18.680: ERROR/AndroidRuntime(298): at android.widget.TextView.setText(TextView.java:2817)
09-01 09:54:18.680: ERROR/AndroidRuntime(298): at com.monkeez.count.Count.onCreate(Count.java:19)
09-01 09:54:18.680: ERROR/AndroidRuntime(298): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
09-01 09:54:18.680: ERROR/AndroidRuntime(298): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
09-01 09:54:18.680: ERROR/AndroidRuntime(298): ... 11 more
09-01 09:54:18.940: WARN/ActivityManager(65): Force finishing activity com.monkeez.count/.Count
09-01 09:54:19.470: WARN/ActivityManager(65): Activity pause timeout for HistoryRecord{43fb6718 com.monkeez.count/.Count}
09-01 09:54:19.550: INFO/ARMAssembler(65): generated scanline__00000077:03515104_00000000_00000000 [ 33 ipp] (47 ins) at [0x2de138:0x2de1f4] in 602730 ns
09-01 09:54:22.523: WARN/InputManagerService(65): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@43f92978
09-01 09:54:22.681: INFO/Process(298): Sending signal. PID: 298 SIG: 9
09-01 09:54:22.826: INFO/ActivityManager(65): Process com.monkeez.count (pid 298) has died.

And the Count Manifest.xml is thus:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.monkeez.count"
android:versionCode="1" android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".Count" android:label="@string/app_name">
<intent-filter> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </activity> </application>
<uses-sdk android:minSdkVersion="8" /> </manifest>

It seems that the parser on this site doesn't like to render my xml file - you can see it at
http://pastebin.com/raw.php?i=W75ak3E9

Android :: Add Integer to Screen and Print Answer Loop Wise


Android :: Print Integer To Canvas Fast And Without Garbage Collects?

Nov 24, 2010

I have a tight game loop in a separate thread where I paint a lot of things on the canvas.

When I paint the score to the canvas I use the following function code...

When I check allocations in ddms I see that .toString not totally unsurprising allocates a char array on each conversion from an Integer to a String. This array will eventually be claimed by the garbage collect and cause uneven rendering of frames on slow android devices.

Is there a better way of painting integers on a canvas that won't cause new allocations and garbage collects?

View 1 Replies View Related

Android :: Get Screen Resolution / Pixels As Integer Values

May 25, 2010

How can I quickly access the screen resolution (width, height) as integer values? I've tried this one, but it always shows zero on my emulator:

DisplayMetrics dm = new DisplayMetrics();
int width = dm.widthPixels / 2;

In my case I want to dynamically create a table with tableRows, each containing two cols. This cols all shall fill half of the screen in width.

View 1 Replies View Related

Android :: Print Screen App / Function?

Jan 17, 2009

Do you guys know of an application/function that will allow you to take a screenshot of your G1 screen?

View 2 Replies View Related

Android :: Passing Integer From Android Home Screen Widget To An Activity Opened By The Android Home Screen

Jun 12, 2010

How can we pass Android Home Screen Widget info ( putExtra maybe ) to an Activity.. What particular method callback will handle this one?

View 1 Replies View Related

HTC Incredible :: Use An App For Print Screen

May 4, 2010

Anyone use an app for print screen on the Incredible?

View 3 Replies View Related

Samsung Captivate :: Screen Print Of 229 Price

Jul 19, 2010

Does anyone have a screen print of the $229 price they can post?

View 4 Replies View Related

HTC EVO 4G :: Screen Capture / Print Screen App For EVO 2.2

Aug 11, 2010

I've read several post on screen capture, most of which seem to be for advanced users and also risk bricking your phone.Is there a screen capture app available or one on the way that does not require rooting phone or installing the SDK?I need to be able to do the screen capture without a PC handy and save the capture as an image to download for later or email it to myself.

View 2 Replies View Related

Motorola CLIQ :: Any Application For Print Screen On Phone?

Jan 9, 2010

Anyone know if we can print screen (take a screen shot)? Any apps that would allow it?

View 2 Replies View Related

Android :: Android Opengl Game - How To Print Images On Screen?

Feb 4, 2010

I'm trying to develop a 2D game to android using opengl. I know how to print images on the screen and animate them. But in my game I have a map and a want to zoom in and out and scroll the map. But I can't figure out the best way of doing it.

View 2 Replies View Related

HTC EVO 4G :: Change Answer Call Lock Screen

Sep 14, 2010

Is it possible to change the answer call lockscreen from the original slide down bar? I am using the vanilla lockscreen but I still get the HTC lockscreen when answering calls and this causes these calls to be answered/rejected when I take my phone out of my pocket.

View 9 Replies View Related

Android :: Capture And Loop Video To Screen?

Aug 9, 2010

I was wondering if anyone knows of a tutorial explaining how to capture the video from the camera on an Android device and then display the video in real time on the screen? I have looked up MediaRecorder, MediaPlayer, Videoview but they all seem concerned with recording audio/video to a file or playing audio/video from a file or a URL. I simply want to be able to take the data from what the camera is seeing and display it on the screen.

View 1 Replies View Related

Sprint HTC Hero :: I Can't Slide Screen To Answer Calls

Jan 14, 2010

I got my phone back late oct, and i use it unrooted, all the time, I can make calls very simply. with minor lag here and there. But anytime my phone is asleep, and i try to answer any incoming call, either Google voice or direct, I can't slide the screen to answer. and none of the buttons do anything and the call goes missed.
it's really annoying. my wife has the same phone and hers eloquently answers calls. after a few moments, the display changes to show the call is missed. and i can operate the phone again - usually with the dismay of having to call the person back, at the same time while they are leaving voicemail - NOT being able to answer the phone when it rings is really kinda a critical problem for me. Anyone familiar with this issue, and would like to take a stab at helping me fix it. I'm willing to wipe and restore to defaults just to make it work right.

View 8 Replies View Related

Samsung Galaxy S :: Swipe Screen To Answer Calls

Aug 17, 2010

Swiping the screen to unlock and to answer calls makes this phone a two hander- which is annoying. Sure in the car with handsfree no problem but even walking having to use both hands is irritating. Is there an alternative?

View 16 Replies View Related

General :: Can't Answer Phone If Slide Screen Disappears

Sep 4, 2012

I have to call back about one out of 3 callers because when I try to slide the answer button, something goes wrong and the screen to answer disappears without answering the phone. the phone continues to ring, but I can't answer it.

1) Is there an app to change the answering options?

2) is there a way to get the slide screen back so I can answer?

View 3 Replies View Related

Sony Ericsson Xperia X10 :: Answer Call / Screen Lock

Jul 31, 2010

I'm using X10, when I'm answering the phone, i found that it seem does not screen lock properly...when the screen contact to my face, it will touch the end call...how to fix this problem?

View 2 Replies View Related

Motorola Droid :: Application To Change Slide To Answer Screen?

Mar 29, 2010

Is there an application to change the ability to slide to answer? For some reason a lot of times ill go to answer a call and have to end up sliding multiple times for it to answer. If there were an app to change this screen somehow, I'd be all over it.

View 3 Replies View Related

HTC EVO 4G :: Screen Not Accept Slide Down To Answer Calls When Phone Unlocked

Sep 16, 2010

Another Evo issue: at times, when the phone is locked, screen won't accept the slide down (to answer) or up (to decline) ringing phone.

View 7 Replies View Related

General :: Sony Xperia Neo L / Paranoid CM9 - No Screen To Answer The Call

Jan 12, 2013

I am using Sony Xperia Neo L with ported Paranoid CM9 rom with CM9 OC Gov Net kernel. I have used it for a few months until today, I can't receive phone calls but can still make phone calls. When somebody calls me, the phone will just vibrate for less than a second. I can see who is calling me in the call logs. There isn't a screen for me to answer the call: with a call icon which can be pulled left or right. The caller would just hear my neo L's voicemail greeting or like forwarding to another phone ( i know that because the beeping sound is different.) I have checked the forwarding setting already.

View 1 Replies View Related

Android :: ROM Installed But Phone Gets Stuck In Loop After Boot Up Screen

Aug 22, 2010

I'm kind of new to Rooting and ROMs but I keep getting the same problem while installing ROMs using ROM Manager. I flash and then I install the ROM and everything goes well until the boot up screen. It gets stuck in a loop of the Droid and Droid Eye animation (For over 10 minutes) and I have to restore it. Can anyone help me figure out what's wrong? I am using the Droid with Froyo, rooted using Easy Root.

View 2 Replies View Related

LG Ally :: Raptor Will No Longer Boot - Stuck In Loop On Android Screen

Oct 28, 2010

Had been running great for me and now im stuck in a boot loop at the android screen after leaving on barnacle wifi tether until the batt died. (running Raptor) It boots fine with Velocity

View 13 Replies View Related

General :: Incredible 2 ROM Loop Screen?

Aug 9, 2013

Today I tried downloading multiple roms onto my HTC incredible 2. But each Rom I installed either looped on the HTC screen or wouldn't install. I tried Cm 10.0 , 10.1 and 7.2. Also I tried paranoid Rom and that also looped. Only roms that worked were the stock roms I downloaded. But only the stripped version of one stock Rom. When I tried the unstripped version which included rooted apps and tweaks the Rom worked fine with one exeption; the WiFi bugged out, constantly turns itself on and off and didn't recognize my WiFi. I rooted my incredible 2 through a website that had a full tutorial that made me unlock my phone through a key and using the command propmt to flash my phone. I'm not sure what I'm doing wrong. I clear everything including cache and davsik or whatever its called before I install the roms. I use the clockworkmod booter thing (holding power and volume down button). I clear everything then install from SD card. I just want jellybean 4.2.3 or anything above 2.3.4.

View 1 Replies View Related

Android :: How To Sort Listview Category Wise?

Sep 24, 2010

I am building an app that will be an Android listview. Each listview object will be a title and a few sub-categories and ratings. I would like the user to be able to sort the listview by these ratings or sub-categories.

View 1 Replies View Related

Android :: Possible To Hook Up To Tv Or Computer Video Wise?

Aug 6, 2010

I'm not sure if it possible but I was curious if any one found a way to hook up the AnDroid threw a USB connect or video out into my TV. I think it would be a great way to watch NFL network and other videos if there was a possible way if not thanks for looking.

View 9 Replies View Related

Android :: Wise Or Not Obfuscating Parts Of Application?

Oct 5, 2010

I'm a bit scared about obfuscating my application completely. I'm afraid to run into issues where I can't figure out a bug because lines and function names wont match. Please correct me if I'm wrong... I thought maybe the simplest way to protect important parts of my code is to create a jar of the important files. I know and understand that jars are good only for classes and no xmls or other Android dependent parts. I believe it would be simple this way since I would not have to worry about obfuscating too much and breaking my project. Also, could be helpful for distributing to clients a library which they can't decompile.

In terms of obfuscating jars maybe I could do the same to the Market Licensing code to protect my paid application from pirating? What are your thoughts on my approach? Maybe bad idea? What experiences have you had with obfuscating your application? Is it not as bad as I think?

View 8 Replies View Related

Android :: Component Wise Program On Market?

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

HTC Incredible :: HBOOT Loop - Just Goes Black And Comes Back To This Screen

Sep 23, 2010

So, I flashed .92 hboot from adrynalynes website and it is stuck in some kind of weird hboot boot loop. When I try to reboot it just goes black and comes back to this screen. I can get to clockwork and do and nandroid backup, but I just wanted to know what potentially caused this so I can avoid this in the future.

View 5 Replies View Related

General :: Phone Boots In Loop And Won't Go To Lock Screen

Mar 28, 2014

I've had a Samsung Galaxy Ace for a year and a half and have never had any problems with it. It gets dropped once or twice a week, but besides that it stays pretty safe. Last night I went to restart my phone and when I turned it back on it showed its logos like it always does before bringing me to my lock screen but this time it got stuck at the Samsung logo. It pulsed white and blue for around 30 seconds, then goes through all the logos again and it does this on loop. I've tried removing the battery and trying it, removing the SD and SIM cards and trying it, and no luck.

View 9 Replies View Related

General :: Goclever R75 RK29 Tab Stuck In Loop First Screen

May 5, 2013

I have a goclever R75 RK29 tablet which i have flashed a few times with custom roms and had no problem until now

i flashed this rom
RK2918 Tab Odys-Loox rocks with Jelly Bean !
Oma JB v1.2.2 for evaluation

but the first boot got stuck and i could install fix from sd-card and am stuck my pc see the tab as a universal serial bus only if i keep the rest button in or it doesnt see it at all and it wont take the rockchip drivers or adb driver

i cant get into recovery and tablet wont switch off with usb plugged in

View 1 Replies View Related

Android :: Static Methods Or Singletons Performance Wise?

Feb 27, 2009

In an app with a small number of POJOs and lots of helper methods that operate on them, what's better performance-wise: to make the helper classes singletons or to make the methods static?

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved