[android-developers] Re: Android Studio: MotionEvent - touch tracking
Looks like this user group is all about Employers looking for employess. I got fooled by the description so Moderator go ahead and delete this post. I have moved my question to Stack Overflow. On Thursday, May 13, 2021 at 4:57:34 AM UTC-4 Horace Johnson wrote: > Hi, > > I'm new to Java and Android Studio but handling it quite well because of > my years of programming with python (basic concepts carry from language to > language). > > I have a practice project set up and the only propose of this project is > for me to learn how to do things the java/android studio way, logic wise. > > So logically, the last python based api I used, there was a way to issue > your own ID to touches and keep track of those touches; therefore you knew > if a touch still existed or not. > > That's where I am right now. I know how to get the touch ID and then get > the Index that holds the touch data. Basically I'm using a For Loop on the > motion event to process all touches to the screen. > > Here's the thing > > Lets say I have 10 touches to process and what I do in a loop is basically > collect the info of the touches and store them in a hashtable, so I can > then later process all the touches in the hashtable. > > So as I pull a touch data from the hashtable to process, I want to first > check to see if the touch still exits. I'm guessing once a touch enters > the "UP" state, it goes out of scope after that because a touch is over > after release. > > Sure I can just check the "Action" to see if it's equal to "UP" but if the > touch doesn't exits anymore, that would raise and exception...right? > > What I thought about doing was, calling "getPointerCount" again, looping > through and getting the IDs again and see if the ID of a touch in my > hashtable still exits in the MotionEvent and if the ID exists and the > "Action" is still equal to "DOWN", then process the touch. Otherwise, if > the ID does not exists or the "ACTION" is equal to "UP", do a release > button event if needed or just delete the touch from my hashtable because > it doesn't exits anymore. > > I can't help but get the feeling of redundancy though when considering > that approach. > > Is there a way or method I don't know about that allows you to check if a > touch still exits before you process actions relating to it? > > I was thinking just now Well, kind of guessing that, if you have five > touches that hit the screen and one of the touches triggers the opening of > a menu and that button had higher priority over the other four touches, you > could simply ignore the other for touches for that frame and open the menu > and in the next frame of the app, if the other four touches are still down, > you can deal with them then accoring to their priority. But then > again, the touch could still exists in the next frame but the "Action" may > be "UP" or "MOVE" instead of down, thus allowing one to write code for a > release or move event. With this thought, storing touch data in a > hashtable is really not needed then, granted a touch this is on action "UP" > will go out of scope in the very next frame (I'm guessing). > > ..hum.. > > Maybe I'm just over thinking it. > > > Forgive any "typos", eyes are that super any more. > > > > > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/0b895dfc-207d-45d1-8283-ca42efcee9e8n%40googlegroups.com.
[android-developers] Android Studio: MotionEvent - touch tracking
Hi, I'm new to Java and Android Studio but handling it quite well because of my years of programming with python (basic concepts carry from language to language). I have a practice project set up and the only propose of this project is for me to learn how to do things the java/android studio way, logic wise. So logically, the last python based api I used, there was a way to issue your own ID to touches and keep track of those touches; therefore you knew if a touch still existed or not. That's where I am right now. I know how to get the touch ID and then get the Index that holds the touch data. Basically I'm using a For Loop on the motion event to process all touches to the screen. Here's the thing Lets say I have 10 touches to process and what I do in a loop is basically collect the info of the touches and store them in a hashtable, so I can then later process all the touches in the hashtable. So as I pull a touch data from the hashtable to process, I want to first check to see if the touch still exits. I'm guessing once a touch enters the "UP" state, it goes out of scope after that because a touch is over after release. Sure I can just check the "Action" to see if it's equal to "UP" but if the touch doesn't exits anymore, that would raise and exception...right? What I thought about doing was, calling "getPointerCount" again, looping through and getting the IDs again and see if the ID of a touch in my hashtable still exits in the MotionEvent and if the ID exists and the "Action" is still equal to "DOWN", then process the touch. Otherwise, if the ID does not exists or the "ACTION" is equal to "UP", do a release button event if needed or just delete the touch from my hashtable because it doesn't exits anymore. I can't help but get the feeling of redundancy though when considering that approach. Is there a way or method I don't know about that allows you to check if a touch still exits before you process actions relating to it? I was thinking just now Well, kind of guessing that, if you have five touches that hit the screen and one of the touches triggers the opening of a menu and that button had higher priority over the other four touches, you could simply ignore the other for touches for that frame and open the menu and in the next frame of the app, if the other four touches are still down, you can deal with them then accoring to their priority. But then again, the touch could still exists in the next frame but the "Action" may be "UP" or "MOVE" instead of down, thus allowing one to write code for a release or move event. With this thought, storing touch data in a hashtable is really not needed then, granted a touch this is on action "UP" will go out of scope in the very next frame (I'm guessing). ..hum.. Maybe I'm just over thinking it. Forgive any "typos", eyes are that super any more. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/489dcbd9-3087-410d-90e8-c82a8d43546en%40googlegroups.com.
[android-developers] Why is Android so laggy using volume control
I notice that on my phone and Android TV, if I use the volume, everything gets very laggy. Sometimes the volume control doesn't even work right away depending on the app I'm using. It actually seemed to have worsened when I upgraded to Nougat. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. To post to this group, send email to android-developers@googlegroups.com. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/49f3b5ff-ce51-4f99-8571-abb95a6764f6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Any recommendations on how to get transaction-like functionality from in-memory objects?
Hello all, My first post here, so I hope this is not off-topic. I am developing an app in which I am discovering that I need to get the equivalent functionality of database transactions out of in-memory objects. Now some of those objects are backed by a database, but some are non-persistent data that still need to be incorporated into the transactions. An example would be a transaction in which a series of database-backed objects have values change based on the UI state, and the UI state has to then change to reflect those changes - but at any point along the way, the changes being performed can be "denied" and force a rollback of the entire transaction. This is .. not quite easy, but at least easy to understand if everything were backed by the database. But does Android provide any way to get similar transactional functionality out of non-database objects? For example, does Android include the Java Transaction API and an implementation of a Transaction Manager for that API? Thanks in advance for any pointers, - Johnson -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. To post to this group, send email to android-developers@googlegroups.com. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/cdc2e2f3-962b-463f-8e53-f3ea5841e73f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [android-developers] Re: Windows 10 Android Studio 2.1.3 Error:Buildtools 24.0.1 requires Java 1.8 or above. Current JDK version is 1.7.
This means you don't have JDK 1.8 installed. In Control Panel -> Programs and Features, you must have "Java SE Development Kit 8" installed, not just "Java 8" (which is the Java runtime, but not the JDK). Terrance Law wrote: I was having the same issue. But my JDK Location field can choose 1.6 or 1.7.How? On Sunday, August 21, 2016 at 3:52:08 AM UTC+8, johnso...@gmail.com wrote: I was having the same issue. Try going to File → Project Structure and make sure the *JDK Location* field is set to a JDK that is 1.8. If not, click the … next to that field to select the proper JDK. - Johnson On Saturday, August 20, 2016 at 11:38:49 AM UTC-7, Brad Hill wrote: Hi all, This is my first post. I installed Android Studio 2.1.3. I've also install Java 1.8. Studio however is still giving me this error: Windows 10 Android Studio 2.1.3 Error:Buildtools 24.0.1 requires Java 1.8 or above. Current JDK version is 1.7. It's probably a "rookie" mistake. I appreciate any help! Thanks! -- You received this message because you are subscribed to a topic in the Google Groups "Android Developers" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-developers/LulaMxrJOFM/unsubscribe. To unsubscribe from this group and all its topics, send an email to android-developers+unsubscr...@googlegroups.com <mailto:android-developers+unsubscr...@googlegroups.com>. To post to this group, send email to android-developers@googlegroups.com <mailto:android-developers@googlegroups.com>. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/77854a00-9bdf-4f1e-9124-c1c13136a592%40googlegroups.com <https://groups.google.com/d/msgid/android-developers/77854a00-9bdf-4f1e-9124-c1c13136a592%40googlegroups.com?utm_medium=email_source=footer>. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. To post to this group, send email to android-developers@googlegroups.com. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/57BB23E2.6070803%40gmail.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Re: Windows 10 Android Studio 2.1.3 Error:Buildtools 24.0.1 requires Java 1.8 or above. Current JDK version is 1.7.
I was having the same issue. Try going to File → Project Structure and make sure the *JDK Location* field is set to a JDK that is 1.8. If not, click the … next to that field to select the proper JDK. - Johnson On Saturday, August 20, 2016 at 11:38:49 AM UTC-7, Brad Hill wrote: > > Hi all, > This is my first post. I installed Android Studio 2.1.3. I've also > install Java 1.8. Studio however is still giving me this error: > Windows 10 Android Studio 2.1.3 Error:Buildtools 24.0.1 requires Java 1.8 > or above. Current JDK version is 1.7. > > It's probably a "rookie" mistake. I appreciate any help! Thanks! > > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. To post to this group, send email to android-developers@googlegroups.com. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/0384b80b-5eec-4e39-b37c-243eec5c22f7%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Error:C:\Users\punchersjhb.HARAMBEE\.gradle\caches\2.8\scripts\asLocalRepo48_a0ri05ly0zpqlwrlngtyp5cy9\cp_init\cache.properties (The system cannot find the file specified)
my android studio is giving me problems it is desplaying the massege bellow Error:C:\Users\punchersjhb.HARAMBEE\.gradle\caches\2.8\scripts\asLocalRepo48_a0ri05ly0zpqlwrlngtyp5cy9\cp_init\cache.properties (The system cannot find the file specified) i have tried updating it, and it says its updated, i have installed the SDK and NDK but its still gives me the above error, how do i solve this? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. To post to this group, send email to android-developers@googlegroups.com. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/76ba2289-b75d-4456-9b63-41692c6b8dba%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Using Camera and compass
Hello! I have a task what i'm need to do. The App should make a photo and then share it on facebook or twitter, application must have ruler compass with degrees...like in this app: https://play.google.com/store/apps/details?id=com.sourcebt.android.cameracompassfeature=search_result#?t=W251bGwsMSwyLDEsImNvbS5zb3VyY2VidC5hbmRyb2lkLmNhbWVyYWNvbXBhc3MiXQ.. ...Also the application should view all maked photos on a google map. I have a problem with compass ruler like in app in gogle play. How can i do the same?? I have no idea how this can be implemented...If anyone have the same problem or If anyone has any ideas how to do it please help me. Thanks, Charlie. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Adding virtual device on Emulator.
By virtual device do you mean an extra virtual network device? Assuming you're using the ARM emulator, this can be done by passing extra options to qemu. I'm going to also assume (1) you are running Linux (Mac I believe is okay, too) as I do not know how to do this on Windows; and (2) you have tunctl (on Ubuntu, this can be installed with sudo apt-get install uml-utilities). You can create a TUN/TAP device with: sudo tunctl -u username -t tap0 You can install the TUN/TAP device on the emulator with: emulator -qemu -net nic -net user -net nic -net tap,ifname=tap0,script=no,downscript=no I have found the script=no and downscript=no options to be useful for avoiding errors when the emulator shuts down. You can confirm the TUN/TAP device is running with: adb shell netcfg You should see something like this: lo UP 127.0.0.1/8 0x0049 00:00:00:00:00:00 eth0 UP 10.0.2.15/24 0x1043 52:54:00:12:34:56 eth1 DOWN 0.0.0.0/0 0x1002 52:54:00:12:34:57 tunl0DOWN 0.0.0.0/0 0x0080 00:00:00:00:00:00 gre0 DOWN 0.0.0.0/0 0x0080 00:00:00:00:00:00 Notice the eth1 device; this corresponds to tap0 that you just created. To confirm, on the emulator run: ifconfig eth1 up 10.11.12.2 netmask 255.255.255.0 On the host, open up a new terminal window and run: sudo ifconfig tap0 up 10.11.12.1 netmask 255.255.255.0 sudo tcpdump -n icmp -v -i tap0 Finally, on the emulator run: route add default gw 10.11.12.1 dev eth1 ping -c 5 10.11.12.1 You should get output similar to: 09:58:13.187475 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto ICMP (1), length 84) 10.11.12.2 10.11.12.1: ICMP echo request, id 26881, seq 1, length 64 09:58:13.187489 IP (tos 0x0, ttl 64, id 35773, offset 0, flags [none], proto ICMP (1), length 84) 10.11.12.1 10.11.12.2: ICMP echo reply, id 26881, seq 1, length 64 09:58:14.190013 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto ICMP (1), length 84) 10.11.12.2 10.11.12.1: ICMP echo request, id 26881, seq 2, length 64 09:58:14.190028 IP (tos 0x0, ttl 64, id 35774, offset 0, flags [none], proto ICMP (1), length 84) 10.11.12.1 10.11.12.2: ICMP echo reply, id 26881, seq 2, length 64 09:58:15.192087 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto ICMP (1), length 84) 10.11.12.2 10.11.12.1: ICMP echo request, id 26881, seq 3, length 64 09:58:15.192103 IP (tos 0x0, ttl 64, id 35775, offset 0, flags [none], proto ICMP (1), length 84) 10.11.12.1 10.11.12.2: ICMP echo reply, id 26881, seq 3, length 64 09:58:16.194919 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto ICMP (1), length 84) 10.11.12.2 10.11.12.1: ICMP echo request, id 26881, seq 4, length 64 09:58:16.194935 IP (tos 0x0, ttl 64, id 35776, offset 0, flags [none], proto ICMP (1), length 84) 10.11.12.1 10.11.12.2: ICMP echo reply, id 26881, seq 4, length 64 09:58:17.196961 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto ICMP (1), length 84) 10.11.12.2 10.11.12.1: ICMP echo request, id 26881, seq 5, length 64 09:58:17.196977 IP (tos 0x0, ttl 64, id 35777, offset 0, flags [none], proto ICMP (1), length 84) 10.11.12.1 10.11.12.2: ICMP echo reply, id 26881, seq 5, length 64 HTH, Eric On Wednesday, 29 August 2012 20:12:48 UTC-4, MW choi wrote: Hi All. I want to add virtual device on emulator. so I have built SDK on platform source. And I am searching about goldfish in googling But I don't know how to approach it. Please help me anyone, anything. Thanks, MW -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Getting Listed in Google Play
Hey, I've had my app up on Google Play for over a month now, still not a single download on it :/ I've tried searching the word Toddler (the apps called Toddler Time) into Google Play and still, after searching through the whole list as far as it extends it wont show up. Can anyone tell me how to get higher up in the manual search listings? There is irrelevant stuff coming up when I search Toddler, and even though that's in my app name, mines still not there. Thanks in advance! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android Spinner not working
I haven't done any java on it as yet because the xml spinner not working so didn't make sense do the java until i got that down On Thursday, June 28, 2012 9:10:25 PM UTC-7, Nevin Johnson wrote: *Hey guys can anyone tell me why my spinner is not showing working(not display properly) check the attached image* -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] layouts!!!
*what android layout can i use that will that allow me to manipulate widgets like the absolute layout?* -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] spinner wige
Hey guys im developing an android app using android sdk and i need to apply a spinner widget but its not working that is that spinner is not displaying through my emulator the code solid even tried using sample spinner codes and its the same not displaying help!!! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Fwd: [android-developers] extending view class not working but not throwing errors or force close
TreKing I should clarify, I have a button in XML, however java setContentView points to another created java class. It is this class that is meant to be able to create a canvas colored blue with an image of a cloud 'floating' across it, (if understand the tutorial). This is the first time I have tried to create using this type of setContentView set up, and am obviously missing something. -- Forwarded message -- From: Chris Cullington-Johnson chriscj...@gmail.com Date: Wed, Oct 26, 2011 at 1:50 PM Subject: Re: [android-developers] extending view class not working but not throwing errors or force close To: android-developers@googlegroups.com There lies the problem, I am lost. I followed tutorial however no other mention of adding button to Java via view class. however does mention adding intent to manifest. Do you need more code to check? What else can I try. On Oct 26, 2011 1:02 PM, TreKing treking...@gmail.com wrote: On Tue, Oct 25, 2011 at 7:18 AM, Chris Cullington-Johnson chriscj...@gmail.com wrote: I am doing a tutorial through you tube I have my java correct but still my button wont enable the view class, it's like button is not linked. There is no Button in the code you posted. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] extending view class not working but not throwing errors or force close
Thanks TreKing the tutorial is cornboyz I believe it is fairly recent . But no worries I have some books but was getting very confused. Thanks mate. On Oct 27, 2011 1:34 PM, TreKing treking...@gmail.com wrote: On Wed, Oct 26, 2011 at 3:40 AM, Chris Cullington-Johnson chriscj...@gmail.com wrote: I should clarify, I have a button in XML, however java setContentView points to another created java class. It is this class that is meant to be able to create a canvas colored blue with an image of a cloud 'floating' across it, (if understand the tutorial). This is the first time I have tried to create using this type of setContentView set up, and am obviously missing something. Well, I don't know what to tell you. What tutorial is this and how old is it? A big problem with most tutorials you find online is that they become dated, are missing information, or simply don't work as advertised. I'd suggest you try the documentation tutorials or get a good book. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] extending view class not working but not throwing errors or force close
Hello all I am doing a tutorial through you tube I have my java correct but still my button wont enable the view class, it's like button is not linked. I think my manifest might be lacking something, I have listed that below java stuff. My code is This is the first java class that references java view class package com.cornboyz.thebasics; import android.app.Activity; import android.os.Bundle; public class tutorialFive extends Activity { Cornboyz sweetBK; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); sweetBK = new Cornboyz(tutorialFive.this); setContentView(sweetBK); } } This is the java meant to create rectangle (without using XML if I understand this all correctly) package com.cornboyz.thebasics; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Rect; import android.view.View; public class Cornboyz extends View{ Bitmap cloud; int x = 0; int y = 0; Paint paint = new Paint(); public Cornboyz(Context context) { super(context); // TODO Auto-generated constructor stub cloud = BitmapFactory.decodeResource(getResources(), R.drawable.cloud1); } @Override protected void onDraw(Canvas canvas) { // TODO Auto-generated method stub super.onDraw(canvas); //set background Rect cBK = new Rect(); cBK.set(0, 0, canvas.getWidth(), canvas.getHeight()); Paint pBlue = new Paint(); pBlue.setColor(Color.BLUE); pBlue.setStyle(Paint.Style.FILL); canvas.drawRect(cBK, pBlue); drawCloud(x, y, canvas); if(x canvas.getWidth()){ x = x+10; }else{ y = y+10; x = 0; } invalidate(); } private void drawCloud(int x2, int y2, Canvas canvas) { // TODO Auto-generated method stub canvas.drawBitmap(cloud, x2, y2, paint); } } This is the Manifest ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=com.cornboyz.thebasics android:versionCode=1 android:versionName=1.0 uses-sdk android:minSdkVersion=8 / application android:icon=@drawable/icon android:label=@string/app_name activity android:name=.myMain 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=.myMenu android:label=@string/app_name intent-filter action android:name=com.cornboyz.thebasics.CLEARSCREEN / category android:name=android.intent.category.DEFAULT / /intent-filter /activity activity android:name=.sweet android:label=@string/app_name android:theme=@android:style/Theme.Dialog intent-filter action android:name=com.cornboyz.thebasics.SWEET / category android:name=android.intent.category.DEFAULT / /intent-filter /activity activity android:name=.tutorialOne android:label=@string/app_name intent-filter action android:name=com.cornboyz.thebasics.TUTORIALONE / category android:name=android.intent.category.DEFAULT / /intent-filter /activity activity android:name=.listV android:label=@string/app_name intent-filter action android:name=com.cornboyz.thebasics.TUTORIALTWO / category android:name=android.intent.category.DEFAULT / /intent-filter /activity activity android:name=.tutorialThree android:label=@string/app_name android:screenOrientation=portrait intent-filter action android:name=com.cornboyz.thebasics.TUTORIALTHREE / category android:name=android.intent.category.DEFAULT / /intent-filter /activity activity android:name=.tutorialFour android:label=@string/app_name android:screenOrientation=portrait intent-filter action android:name=com.cornboyz.thebasics.TUTORIALFOUR / category android:name=android.intent.category.DEFAULT / /intent-filter /activity activity android:name=.tutorialFive android:label=@string/app_name android:screenOrientation=portrait intent-filter action android:name=com.cornboyz.thebasics.TUTORIALFIVE / category android:name=android.intent.category.DEFAULT / /intent-filter /activity
Re: [android-developers] extending view class not working but not throwing errors or force close
There lies the problem, I am lost. I followed tutorial however no other mention of adding button to Java via view class. however does mention adding intent to manifest. Do you need more code to check? What else can I try. On Oct 26, 2011 1:02 PM, TreKing treking...@gmail.com wrote: On Tue, Oct 25, 2011 at 7:18 AM, Chris Cullington-Johnson chriscj...@gmail.com wrote: I am doing a tutorial through you tube I have my java correct but still my button wont enable the view class, it's like button is not linked. There is no Button in the code you posted. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] NEWBIE needs help with Android Tab Widget tutorial
thanks TreKing I ended up figuring this one out, finally. Now stuck on HelloGoogleMapView tutorial. I am refusing to give in this time and am doing a lot of reading about how to put the code together cause I am obviously missing something. On Sat, Oct 1, 2011 at 10:05 AM, TreKing treking...@gmail.com wrote: On Wed, Sep 28, 2011 at 11:30 PM, Chris Cullington-Johnson chriscj...@gmail.com wrote: My app now doen't display errors but will not run it shows the following error The appication HelloTabWidget (process Tab.Widget) has stopped unexpectedly.. You need to use the debugger and LogCat to determine what is throwing the exception causing the app to crash. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] NEWBIE needs help with Android Tab Widget tutorial
I have just joined the Android World and am lovn it, however having a bit of trouble with some of the tutorials, in particular the Hello Tab Widget one. Particular part states Notice that this doesn't use a layout file. Just create a TextView, give it some text and set that as the content. Duplicate this for each of the three activities, and add the corresponding activity/ tags to the Android Manifest file. I think this is where I am going wrong, I don't fully understand how to add the corresponding activity/ tags in manifest file. see below for my code what have I done (or not done). My app now doen't display errors but will not run it shows the following error The appication HelloTabWidget (process Tab.Widget) has stopped unexpectedly.. ?xml version=*1.0* encoding=*utf-8*? manifest xmlns:android=*http://schemas.android.com/apk/res/android; * package=*Tab.Widget * android:versionCode=*1 * android:versionName=*1.0* uses-sdk android:minSdkVersion=*3* / application android:icon=*@drawable/icon* android:label=* @string/app_name* activity android:name=*.HelloTabWidget* android:label=*@string/app_name * android:theme=*@android:style/Theme.NoTitleBar* intent-filter action android:name=*android.intent.action.MAIN* / category android:name=*android.intent.category.LAUNCHER* / /intent-filter /activity activity android:name=*.AlbumsActivity* 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=*.ArtistsActivity* 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=*.SongsActivity* 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 /manifest -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] setting a textView in a ListView from a DialogBox. Frustrating....
I don't know if anyone knows how to do this... but if so, please help. I'm trying to set a TextView I have in an xml. to a certain text with an editText in a dialogBox. Currently my code will save the text and put it in a random View in the ListView. I do NOT want that... I want the text I save to go to a specific view and stay there.. anyone have any suggestions? here is my Code: (The xml is below the code, and all I need is for it to save text in alarm_name_text and in ONE listView.. PLEASE HELP!) package com.MTSUAndroid; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import android.app.Activity; import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.Context; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; import android.os.Bundle; import android.os.Handler; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.CheckBox; import android.widget.EditText; import android.widget.ListView; import android.widget.TextView; import android.widget.Button; import android.widget.Toast; import android.app.*; public class AlarmList extends Activity { private static final int DIALOG_YES_NO_MESSAGE = 1; private static final int DIALOG_YES_NO_LONG_MESSAGE = 2; private static final int DIALOG_LIST = 3; private static final int DIALOG_PROGRESS = 4; private static final int DIALOG_SINGLE_CHOICE = 5; private static final int DIALOG_MULTIPLE_CHOICE = 6; private static final int DIALOG_TEXT_ENTRY = 7; private static final int MAX_PROGRESS = 100; private ProgressDialog mProgressDialog; private int mProgress; private Handler mProgressHandler; private ListView mainListView; private Planet[] planets; private static ArrayAdapterPlanet listAdapter; private Button Save; private Button Default; private TextView text; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main3); AlertDialog.Builder alertBox = new AlertDialog.Builder(this); final TextView rowSavedText = ((TextView)findViewById(R.id.alarm_name_text)); // Find the ListView resource. mainListView = (ListView) findViewById(R.id.mainListView); Save = (Button) findViewById(R.id.alarm_button); Default = (Button) findViewById(R.id.alarm_button1); text = (TextView)findViewById(R.id.alarm_name_text); Save.setOnClickListener(new Button.OnClickListener() { @Override public void onClick(View v) { } }); Default.setOnClickListener(new Button.OnClickListener() { @Override public void onClick(View v) { } }); // When item is tapped, toggle checked properties of CheckBox and // Planet. // Create and populate planets. planets = (Planet[]) getLastNonConfigurationInstance(); if (planets == null) { planets = new Planet[] { new Planet(Turn On Alarm), new Planet(Alarm Name), new Planet(Time), new Planet(Sound), new Planet(Vibrate), new Planet(Repeat), new Planet(Volume Control), new Planet(Second Alarm) }; } ArrayListPlanet planetList = new ArrayListPlanet(); planetList.addAll(Arrays.asList(planets)); // Set our custom array adapter as the ListView's adapter. listAdapter = new PlanetArrayAdapter(this, planetList); //int i = mainListView.getFirstVisiblePosition() + 1; mainListView.setAdapter(listAdapter); listAdapter.notifyDataSetChanged(); listAdapter.notifyDataSetInvalidated(); mainListView .setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView? parent, View item, int position, long id) { Planet planet = listAdapter.getItem(position); planet.toggleChecked(); if (position == 1) { /*AlertDialog.Builder builder;
[android-developers] Re: How to simulate 3D-rotation of irregular object using OpenGL in android?
This would not be relevant to Android, unless you're talking about how to import the object into memory. For 3D object creation there are a variety of tools to use. Check out some of the free ones, such as Blender http://www.blender.org/. Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: What did you use to create your launcher icon for your app?
The GIMP http://www.gimp.org/. It's free and fairly full featured. Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Soft keyboard 'Done' button
Are you having problems with the implementation? Make sure to put an OnEditorActionListener in your EditText and screen for the IME_ACTION_GO action ID. Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Connecting to https server from java
Contact a server with a valid certificate? So far, it's not sounding like a problem with your client (Android) app. Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: startActivityForResult
startActivityForResult has been in the API since level 1. 1.6 has it. Here's a link to the documentationhttp://developer.android.com/reference/android/app/Activity.html#startActivityForResult(android.content.Intent, int). -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How can I draw/move a point on screen ?!
Look at all the documentation on developer.android.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: htc inspire
Totally possible. Of course, if you travel in a spaceship with either phones approaching the speed of light, then the speed of the computations becomes all relative. So, in the time it takes to multiply two floating point numbers on the Android phone, the iPhone will have aged 50 years -- wait, I mean, you'll come back older than your father's brother, or something like that. It's a Stephen Hawking or Einstein thing, and I won't claim to know all the nuances. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: possible use for Bluetooth
Yes, I think it is. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Connection between Android phone and python server suggestion
Yes, it can be done. You can exchange data between a server and an Android app in any way that you want. I prefer encoding the communication/data in a JSON object. Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Samsung Galaxy S
On Tuesday, May 17, 2011 1:48:41 PM UTC-4, bob wrote: I was just wondering if anyone has gotten a 60 frames per second frame rate on a Samsung Galaxy S from ATT. Yes Also, is there any way to measure the frame rate of games you didn't make? For instance, if I wanted to download Doodle Jump and see what frame rate it's getting, could I do it? Mmm... not sure -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Connection between Android phone and python server suggestion
Put the IP address of the server you're trying to connect to. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Market app name case sensitive?
AFAIK, it's not case sensitive. Searching for my apps with all sorts of funky capitalization works just fine (e.g. eXaMpLeName) Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: frame rate
Yes, Every time you draw a frame increase via an onDraw increase a counter, then divide it by the time you've been drawing. Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Licensing on Formerly Paid Apps
I can't say for 100%, but my initial thought is: No. AFAIK, when you convert your paid app to a free app and a user then downloads it, the licensing service responds in the exact same way as if the user bought it (i.e. bought it for $0.00). So, I think the only way around your problem is implementing something on a backend server or within your app to keep track of users that paid for the app. That is, release an update a couple weeks prior to making your app free which stores the information you need to remember that it was paid for, then bring the price down to free. Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android Test Market
Not that I'm aware of. However, you could include location based discrimination in your app if you wanted to, which would start only if a user is within a certain area or zip code. Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Looking for documentation on showing a value from a string-array in a TextView
Something like this should work: String[] textValues = getResources().getStringArray(R.array.your_string_array); for (int i = 0; i textValues.length; ++i) { mTextView.setText(textValues[i]); } ^obviously this code isn't very useful, but you get the idea. Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to add Unicode font on Android
Android fonts *are* Unicode to the best of my knowledge. However, they don't have *every* character supported. Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: EditTextPreference question
I'm not a 100% on this, but I would try and extend the EditTextPreference and add the encryption code there. You would have to override the Preference methods such as onSetInitialValue, onBindView, persistString, etc. I've never done this, but that'd be my best guess. Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Logcat empty
Are you seeing any logs in your Logcat? You should see lots of stuff which Android pumps out into a log, even if you don't have any Log's in your code... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Surveys using Google Docs
I'm not sure if the pretty please is going to do it... maybe with a cherry on top though... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Need help understanding crash report.
It sounds like you are trying to update an UI element from a non-UI thread. Are you using an AsyncTask, thread, IntentService, etc. and trying to update a UI element from it? Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Payout problem on the Android Market?
Nope, no payout problems here. In fact, I've been recently surprised by the Android Market since Google IO 2011. The market seems to be refreshing multiple times daily, etc. Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Image Picker and Cropper
is this a programming question? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: starting Activity with result calls onActivityResult from calling Activty
Are your activities run in singleTask launch mode? Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: starting Activity with result calls onActivityResult from calling Activty
Also, what type of activities are you launching? That is, are you opening a web browser, or are these activities that you implemented? And, what result code is returned in onActivityResult? Is it RESULT_CANCELED? Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: starting Activity with result calls onActivityResult from calling Activty
startActivityForResult(intent); Stupid question here, but you're calling startActivityForResult(Intent, int), correct? What values are you using for your requestCodes? Are they = 0? Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Progress circle (NOT indeterminate!)
Use a determinate progress bar as documented herehttp://developer.android.com/reference/android/widget/ProgressBar.html . Or, if you're looking for a progress dialog (which has a progress bar in it), then use a progress dialog, as documented herehttp://developer.android.com/reference/android/app/ProgressDialog.html . In fact, there's even an API demo of the progress bars located herehttp://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/ProgressBar1.html, herehttp://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/ProgressBar3.html, and herehttp://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/ProgressBar4.html. The documentation on developer.android.com is actually very good. You should check it out. Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Progress circle (NOT indeterminate!)
But, if you're looking to make a wheel progress bar instead of a horizontal progress bar, then you'll have to make a custom view. It's actually not too hard, and can be easily done by extending the progress bar class, and handling the onDraw methods. My suggestion would be to first draw a circle with your desired empty progress bar color, then draw an arc over top of the same circle in your desired completed color. I'm not aware of any open source projects which give you a progress bar in wheel form. Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Progress circle (NOT indeterminate!)
Are you set on a progress circle. If not, you should really consider using a ProgressBar. It not only does everything you're wanting to do, but it gives users a consistent experience from your app to every other app out there. Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to use Notification service from Broadcast receiver
What kind of notification service are you talking about? Status bar notification? Text only (i.e. Toast) notification? Here's some code for a status bar notificationhttp://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/app/StatusBarNotifications.html. I won't claim to have written it myself, because it's clearly on the android documentation pages. And, it shouldn't really matter that you're trying to do it from within a Broadcast Receiver -- I don't think. Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Progress circle (NOT indeterminate!)
Here's what you can do: Extend the AbsSeekBar classhttp://developer.android.com/reference/android/widget/AbsSeekBar.html, and implement the onDraw method to your liking. You can capture the height and width of your custom view by capturing those values in the onSizeChanged method. By drawing your circle programatically you can easily make a progress circle that looks good at all resolutions. Also, you don't have to worry about different device resolutions, since you just need to control the size of the view in the layout. Or, you could extend the ProgressBar class and do the same thing. Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Twitter support
yes you should probably look at the dev.twitter.com website. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Does App description matter in Android Market search listing
My question is : does google do anything about it? Or their algorithm just boost the app across all categories - which in my opinion is happening Yes, it is happening. Does google plan to address these kind of spam apps? I don't know. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Screen refreshing
If fact, I do want the UI to be locked while the proccess is working Are you sure you want the main thread blocked? This could cause the Application Not Responding error to pop up during your lengthy process. And users tend to get very confused when their phones become unresponsive. On other platforms, there is some kind of DoEvents() or DoPendingEvents() functions which allow UI threads to proccess pending messages before continuing with the execution. There is some way of doing this in Android? Not that I'm aware of. But you should really consider putting your lengthy process in its own thread. An AsyncTask seems like it'd work well for you here. You can even update your text view in the onPreExecute method, and then notify the user of completion in the onPostExecute method. Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Documentation for older Android SDK versions?
AFAIK, you can't, unless you saved the Android 2.2 SDK when you downloaded it (you might also find someone on the net who has it). However, of all my apps that I have, 3 are developed for Android 1.6 and one is developed for Android 1.5. I don't have too much of a problem reading the SDK. I wouldn't let the deprecated get you down too much. Because, in fact, the method is deprecated but is still good and works fine. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: problem with asyntask
I'm having trouble understanding your problem. From your post, you have 2 AsyncTasks. Launching task B depends upon the result of task A. So, the tasks will run sequentially by design. Is there a specific error that this scenario is generating an error for you? That is, are you having a problem launching task B? Or, is it that you want to launch task B *after* task A finally completes? Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: how to access desktop files from android app remotely?
I provided the reference links above. RFC 959 describes the protocol required to interface between an FTP server/client. Here is another link that I think you might find useful: http://developer.android.com/guide/basics/what-is-android.html It deals with how to implement apps in Android using Java. Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: ANDROID GAME
The Android team has put together many helpful tutorials with all the code required to build a game. Check out the code for Lunar Landerhttp://developer.android.com/resources/samples/LunarLander/index.html. It sounds like you're only trying to build a very simple game, so this should help you out. Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: how to access desktop files from android app remotely?
so what is the basic need to do it. like i have to make a ftp server at desktop side? Yes, an FTP server on your desktop would do the job. is there any library that support ftp through android? Do a google search on java ftp clienthttp://www.google.com/search?sourceid=chromeie=UTF-8q=java+ftp+clientand you should find libraries that will work for you. I believe Apache has one you might be able to use. Or, of course, you could develop your own. Here's RFC 959 which describes the protocolhttp://www.ietf.org/rfc/rfc959.txt. It's actually not that hard, I built one from the ground up in less than a week. if i want to authenticate it by username/password what should i need to do? Yes, you can authenticate with username/password or do without. Either way. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: File transfer application
Create and use a FTP client on your phone, and run a FTP server on your computer. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android Apps, move apps into phone's memory, or switch them into external memory.
For heaven's sake: the functionality has to be implemented by the app programmer. Thread over. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to change Application theme
Set your theme at run time in the onCreate() method using setTheme(int). Check it out herehttp://developer.android.com/reference/android/view/ContextThemeWrapper.html#setTheme(int) . I do this with my app, and it works very well. My onCreate() method looks something like this: public onCreate(Bundle b) { /* Get your preference here */ /* Set the theme before calling setContentView() */ switch (theme) { case X: setTheme(R.style.theme1); break; case Y: setTheme(R.style.theme2); break; } super.onCreate(); setContentView(R.layout.layout_name); } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: how to prevent the app be killed by “unmount media”(change to usb storage mode)
No, the app is immediately killed. AFAIK, the only way to prevent this is to store the app on internal memory instead of the SD card. Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How do i upload the file from android mobile to public server
I don't think that the FTP ports are inherently disabled, so there's no need to try and enable it. I built a quick FTP client server for my phone and it works fine. Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: LVL Retry Count
I use the default implementation of the Server Managed Policy (read about it herehttp://developer.android.com/guide/publishing/licensing.html#ServerManagedPolicy) for a paid version of my app, and haven't had any problems of note. I haven't had any complaints about false-negatives, or the like -- however, this *doesn't* mean that it doesn't happen, it just means that if it does, then nobody has complained about it to me. As for you concerns: What problems with the grace period are you referring to? The grace period will actually help you out if the case of Retry responses from the server. As for the licensing implementation with no network access, you shouldn't worry too much about that either. Normally, you get about 10 retries before the 503 error occurs. However, if the user has already checked the license with a Server Managed Policy, then the license is cached on the phone for a period of time. So, if the user starts the app up while their device is in Airplane mode (let's say 10 hours into a 12 hour cross-oceanic flight), then the cached license could still give the user a valid response -- even with no network access. This all depends on the VT extra from the initial license response. I'm not sure what a typical value is, but I know it last at least several hours, if not a day or more (if you wanted you could check out the value yourself by setting a breakpoint in the default implementation). Now, if the user *hasn't ever* received a valid license check, then it will fail without network connection. At which point, in my app, I ask the user to check for network connectivity and retry. Something to note: I haven't verified this with anyone on the Android dev team, but I'm pretty sure that once you release your application with LVL enabled on your phone *and* you don't buy your own app (i.e. you have the release version installed on your device, but haven't actually bought it through the market), then the VT extra in the licensing response is not a date that a typical user will receive. That is, I've found that without actually purchasing the app, the licensing server gives me a validity time which basically disables any valid cached response. Again, I've only seen this once I actually release the app, and *have NOT *bought it myself. Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: LVL does not work while testing
Ted, Besides doing what jtoolsdev already said, make sure that you're associating your Google account with your phone (Settings-Account-Add Account). If you're using your own phone to test it out, then I assume that you're Gmail account is already associated with your phone. Also, the LVL implementation does have some default logging (which don't appear as errors... I don't think); so, make sure that you're looking through *all* the logs, because that might give you another hint. Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Connecting Andrid Application to Sql Server Database
The best way I've found to connect your local (app) database to your server database is to exchange information through JSON strings. Post a query through an HTTP POST method to your website, decode the information, process the SQL query on the server (I use PHP), then build and send a JSON response to your app. Once back in your app, decode the JSON response and handle the data. It works for me in several of my apps (Pop Quiz Prism). Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: 3d engine advices
Are you trying to port a 3D desktop game to Android, or just create something new? If you're already familiar with using OpenGL on the desktop, it's actually not that big of a transition to OpenGL ES 1.x or 2.0. The API is reduced to its basics, but still offers almost everything you need. Now, here's a big caveat: I have *not* released any games onto the market using OpenGL (only 2D games which use the canvas directly from a customized View). However, I'm currently experimenting with OpenGL ES 2.0 and I'm very pleased with my initial results. As to the 2nd part of your question, no, I have no experience with any 3D engines you've listed. But, I'm sure somebody on this forum does. Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How do i upload the file from android mobile to public server
It seems like your error is occurring at line 203 in the FtpURLConnection class. Find out what's at the line, and you'll be closer to solving your problem. W/System.err( 1281): at org.apache.harmony.luni.internal.net.www.protocol.ftp.FtpURLConnection.connect(FtpURLConnection.java:203) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to retrieve a JSON object from a php url to my android
Hi, I am having this code HttpClient client = new DefaultHttpClient(); HttpGet request = new HttpGet(); request.setURI(new URI(uri)); HttpResponse response=client.execute(new HttpGet(uri)); InputStream ips = response.getEntity().getContent(); //String a = String(ips); BufferedReader buf = new BufferedReader(new InputStreamReader(ips,UTF-8)); But am not getting the result.Somebody please help. I want to get the JSON object in my android class. I have went through almost all questionnaires in this site. Thanks in advance. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Creating 9-patch Images on Device
It shouldn't be too difficult. If you have a byte stream of the bitmap, then just set the pixels on the first/last row/col to black where you want to stretch the image and set the other pixels to zero. Then you could remain the image *.9.png and then load it as a normal 9 patch drawable resource. There's more info on the 9-patch at this linkhttp://developer.android.com/guide/topics/graphics/2d-graphics.html#nine-patch, so you can know which pixels you want to set as black and which to keep clear. Here's the big caveat: I've never done this programmatically, but I have drawn all my 9-patch images by hand in the GIMP setting the 9 patch pixels myself, so I don't think it'd be too hard to do in code. Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Creating 9-patch Images on Device
Ah, ok, I hadn't read that at all. By the way, what are you doing with the image that you need to make it a 9 patch? Perhaps you can use a matrix to scale it however you need before displaying it? Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android sqlite and multithreading
If you plan on using threads to access a database, then I believe there is no other way to alleviate the exceptions being thrown *except* with some sort of synchronization like you have. I do the same sort of things with my databases and use semaphores to ensure exclusivity of my database. As to your question: How do you use sqlite in Android? -- I would say that if you're already accessing your database from different threads with no exceptions being raised, then you already know more than the average bear. Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: totally 2d
Bob, I recently released a game (actually just this week, called Prism or Prism Light by Shadowpuppets), which doesn't use OpenGL at all. I just draw onto the canvas from my overrided onDraw method, and then invalidate only the part of the view which contains animation. I have determined that the drawing portion is the bottleneck for me (i.e. all the physics calculations and the rest of the game engine have no effect on the framerate). For your reference, I have an original Motorola Droid and I generally get around 60 frames per second of animation. During beta testing, other users with more advanced phones got upwards of 100 frames per second (I actually had to put a frame rate limiter in my game to keep it at 60 fps max). *However!* This is my experience only and is unique to my game. If you download and play the free version, then you'll notice that my game board only takes up about 2/3 of the screen (and that is the *only* part of the screen which can be animated in my game). Furthermore, the performance increased drastically when I clipped the regions of the screen which didn't contain any animation. For example, my worst possible case scenario was needing to animation something in the top left corner and the bottom right corner at the same time. This causes the entire view to be redrawn and results in my worst frame rate scenario. In this case, the frame rate dropped to around 40 or 45 fps. At any other time, when the clipped region didn't take up the entire game board the frame rate increased upwards and past 60 fps (of note: even though the region was clipped, I still drew all the animations to the canvas, even if they were totally outside the clipped region. This didn't seem to affect the increased frame rate -- that is, it mostly depended on what actually gets pushed out to the screen buffers). So, it varies, but overall I got acceptable performance. Also, depending on what devices you target, there are other options. For instance, if you're just targeting Honeycomb then you can enable hardware acceleration for your view with only the addition of 1 line of Java code (see the Developer's Guide recent Blog on the subject). I haven't tried using OpenGL for my game, because overall I didn't need it. I was prepared to try, but I found that drawing my 2D animated game onto a view's canvas was sufficient for my purposes. I hope that this gives you the perspective you were looking for. Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Regarding screen resolution
Different screen resolutions started to get support in API Level 4 (1.6). So, I recommend using API Level 4 and then reading the documention on the Android Dev sitehttp://developer.android.com/guide/practices/screens_support.html. It's really good. Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: Fwd: [android-developers] Re: Regarding screen resolution
Please read the link I posted in my original comment. It'll tell you where to go from there. Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How do i upload the file from android mobile to public server
I believe the first error that is causing your program to crash is located here: 03-25 10:33:36.980: ERROR/AndroidRuntime(301): java.lang.NullPointerException 03-25 10:33:36.980: ERROR/AndroidRuntime(301): at com.example.uplaod.MyUpload$1.upload(MyUpload.java:146) Check out line 146 in MyUpload. Set a breakpoint just before it, run your program in Debug mode, and figure out why you're trying to access a Null pointer. --Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How do i upload the file from android mobile to public server
There are several FTP apps that can do just that. Astro file manager can create SFTP connections to upload files, or AndFTP... (there's a whole bunch if you search for FTP on the Android Market). If you're talking about uploading a file to a public server from an app you're developing, then you can use HTTP POST methods or a custom built FTP uploader. --Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Why can't draw a picture on canvas
It appears, by your code, that you *are* drawing on the bitmap through the canvas. However, I'm guessing your *real* question is: why is my bitmap not being displayed on the screen? Well, that's because your bitmap or canvas is not associated at all with any buffers which finally get displayed on your device. Here are 2 options for you: 1) If you're just trying to display a picture to the screen that doesn't change, then just put an ImageView in your view hierarchy and define the android:src=R.drawable.bg. 2) If you're end goal is to do custom drawing onto the screen, then you're going to have to create a custom view and override the onDraw method, which *gives* you the Canvas object which is linked to the display. Remember, a Canvas is just a tool for drawing onto a bitmap. It has, inherently, nothing to do with drawing something to the screen. Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: android licensing: when do we need generate new key pair
You old key expires? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Any Android Test Prep application open source
This is not open source, but it's free: Pop Quizhttp://androidshadowpuppets.com/PopQuiz Unlike other apps that only allow you to make flash cards, Pop Quiz allows you to make multiple choice questions *and* flash cards. You can upload, download, and share the question banks from its website. It also allows free access to popular flash card websites like Quizlet and StudyStack that have millions of publicly available flash cards as well. Hope this is what you're looking for. Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Prism - Please help test my puzzle game! (Release Candidate)
Thanks to all those who have tested my puzzle game! I've heard about no errors so far and so far a smooth 60fps for everybody, so I assume that this release candidate is just about ready for launch. I'll keep my app in beta for another couple days (please feel free to test it out!), but sometime next week I'm going to flip the switch and publish it. And, since it's a paid app, the beta app (which is the full video game) will stop functioning -- so get it while you can! I'm still looking for testers, and hopefully *somebody with a tablet* or *somebody with Android 1.6 *running on their system. *Get the APK here on my websitehttp://androidshadowpuppets.com/Prism *, and thanks again to all those who helped out! Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to create a view?
Just extend the RadioButton class. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] mySQL android php
I have several apps which talk to mysql databases that I have on my websites. For me, I use a http post and json to talk between the two. For example, say I want a user to be able to insert some arbitrary data into a database (assuming he's already set up a username and password on my website). Here's the logical steps I take: (Android app): Collect data, get saved login information (Android app): Post data to my server (Webserver): Gather the data (in $_POST['username'], $_POST['password'], and $_POST['data']) and insert it however you need to. (Webserver): Return success or failure through a JSON object (e.g. echo(json_encode(array('status'='ok', 'error_message' = '' (Android app): Parse the JSON object, and look for either an ok status or and error status. Anyway, I've been successful using that method, and I have two apps which currently use it. Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to install market app in emulator?
As far as I know, I don't think it's possible. However, Google APIs 8 and above include some Market functionality for using License Verification, etc. Why do u you the market app in the emulator? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: rotating a bitmap
Marcin, I don't think that will work for him, since he's trying to keep the precision of the number (i.e. he needs whatever fractional part of the division). Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Walking Sprite....
You're asking quite a lot in one question (kind of like asking, How do I create a first person shooter)... My advice to you would be to read the sample code provided by Google. Once you're comfortable with that program, then you can probably ask more specific questions here that we might help you with. Try looking at this sampe: Lunar Landerhttp://developer.android.com/resources/samples/LunarLander/index.html . Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: rotating a bitmap
A couple things: This might help your pivot point that you have: instead of converting to float after the division, try doing it before the division. Like this: ((float)mBitmap.getHeight())/2f -- I believe you are losing some accuracy by doing it the other way around. As in (float)(7/2) would equal 3, not 3.5. Secondly, if you're end goal is to just draw a rotated image to the canvas during the onDraw call (which I suspect that it is), then there's no reason to create a second bitmap. Something like this should work: float px = ((float)mBitmap.getHeight())/2f; float py = ((float)mBitmap.getWidth())/2f; m.setRotate(mRotation, px, py); canvas.drawBitmap(mBitmap, m, null); Also, if you're not doing anything funky with your paint (like ColorFilters, etc.), then just leave it null. --Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Prism - Please help test my puzzle game! (Release Candidate)
Hello all, I'm about a week or so away from releasing my first video game on the Android Market. It's a puzzle game with 100 levels of brain busting goodness, and I'm very excited about it. However, I only have my original Moto Droid to test the app -- and I don't really trust the emulators to give me an accurate frame rate prediction. I was hoping to solicit your help in making sure everything's up to par. All the bugs have been worked out (that I know of), so it's by and large a fully complete game. However, I suspect that some configurations might get a force close here and there, and that's what I'm worried about. Also, I'd like to know what frame rate you are getting and on what device. I've included a permanent fps indicator in my pre-release beta build, and it's capped at 60fps. As a reference, my original Moto Droid gets 60 fps about 95% of the time. All you need is Android 1.6 or higher. You can *download the APK herehttp://androidshadowpuppets.com/Prism *. I'm looking for testers with any Android device, even a tablet, if somebody has one who is willing to give it a shot. Please let me know what you think, and if you find any bugs. Thanks! Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: SQLite Transactions
As far as I know execution is blocked on SQLite calls in Android (i.e. they are not done asynchronously). Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Emulator snapshots in API 9 work with older API levels
My Eclipse plugin for Android Development is updated to 9.0.0 but still I am not able to see any Save to Snapshot option in the launch window. Please tell me what wrong could I be doing On Tue, Feb 1, 2011 at 4:45 PM, Johno Scott johnosc...@gmail.com wrote: I am loving the emulator snapshot feature that is at Early look stage in SDK Tools Revision 9 http://developer.android.com/sdk/tools-notes.html# This capability is speeding up my development using the emulator significantly. It took me a while to figure out how to use it so wanted to share it here : CREATE AN AVM SNAPSHOT * Set the Snapshot Enabled checkbox in the SDK Manager Virtual Devices New... NOTE : Make sure you upgrade your Eclipse plugin for Android Development to 9.0.0 or the Snapshot Enabled feature wont show. * Start your AVM and enable the `Save to Snapshot` checkbox, then click Launch button * Once the AVM is running. Set it up how you want it to resume later. E.g. change settings, screen rotation and run the app you want. * Close the emulator window (click the close box). The AVM state will be saved and the window will close. RESUME the AVM * From the SDK Manager Virtual Devices select your device and click Start... * This time turn `Launch from Snapshot` ON and `Save to Snapshot` checkbox OFF then click Launch button. * Your AVM should launch in a few seconds and resume to its saved state like magic. * Close the emulator window and the present state will be lost (because we turned `Save to Snapshot` checkbox OFF). Resume again to the originally saved snapshot at any time. SUMMARY Emulator Snapshots - New in API Level 9 Good - Instant-On Emulator at a state you decide. - Saves time (several minutes) - Configure your AVM settings Once - Works with older API versions (e.g. Froyo 2.2) Bad - Only one snapshot per AVM - Defaults to standard screen orientation -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Regards, Mike Johnson, Associate Software Engineer, Astegic. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Problems storing images with Base64 encode into a row of a SQL DB
you can use BLOB On Mon, Jan 31, 2011 at 11:32 PM, saex elpablos...@gmail.com wrote: 0 down vote favorite Hi i'm encodding images with Base64 into Strings, and i am uploading these images into a remote database, in a row of the table USER. That row is TEXT, because i dont know if there is anothr String type with more space than TEXT. When i store very small images, with 5 or 10 KB of space, they store OK, and when i get these images back from the sql DB into my app, i can decode them into BitMap and show them into a ImageView. THE PROBLEM: When i store images with for example 110 KB of space, i think they doesn't store OK in the TEXT row of my table USER in the SQL DB, because when i try to decode them, i got an error, they can't be decoded, but i dont know why, because the decode function of Base64 simply returns null when he can't decode. There is a way to solve it? How munch KB can have a image to be stored into the row of a databse? The better option for the row is to be TEXT ? or there is another Type that can store more higher Strings? thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Regards, Mike Johnson, Associate Software Engineer, Astegic. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Market not updating?
My Total Downloads dropped too. And my active installs dropped a lot faster today than other days. On Dec 9, 7:48 am, David Erosa García soul...@gmail.com wrote: On Wed, Dec 8, 2010 at 10:28 PM, WhitneyApps whitneya...@gmail.com wrote: There is something weird going on in the market. Both of my apps' total counts went down today. Active installs can drop but total count shouldn't! Now my total downloads active installs counts are also dropping! I'll file a report about this... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Best Android Game Engine?
I have been using rokon for a few months since before version 2. My first game I released using it is called Android Recon. You can check it out on the android market if you want. I have been looking at AndEngine as too. From browsing there website it looks like it has some stuff that rokon does not yet have. Like the ability to load Tiled Maps. That will be very useful for many types of games. Also jMonkeyEngine 3 should be coming to android soon if you are thinking about a 3d game. And there are a few paid engines like ShiVa 3D, and Unity 3d will be coming to android. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Managing a suite of applications
I asked this on Stackoverflow, and got my first tumbleweed, so I thought I would give it a chance here. :) I'm building a suite of applications, meaning that I have a single set of code that gets customized via a single change of an API key. This means that all of the applications have the same activities, same behaviors, but different icons, package names, and application names depending on the client I am building for. Unfortunately, I haven't figured out a clean way to do this. Because the package name is what the Android Marketplace uses, I've been changing it to com.nilobject.productname.clientname. However, this changes the package for all of the activities to no longer be in the package of the application, since they live in com.nilobject.productname. Additionally, the autogenerated R moves, so all of the references to R in com.nilobject.productname break. Has anyone else dealt with this problem? I'm using Eclipse for development. Should I just refactor the activities with each build to be in the same package? Is there a system for this that I don't know about? Thanks for any ideas and help! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] UI Testing in Android Frameworks
Now, we want to develop a tool to test the software under Android frameworks, mainly UI testing without software source, so we can't get the UI object. is there a method to get the handler of the UI object? thanks! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How the WiFi connection is supported in Android??
yeah, I read the Android Anatomy and Physiology shortly after I issued this thread. Thanks anyway! Another question, if a new hardware is going to be supported, e.g. Zigbee module, what should I do normally?? johnson On 11 Nov, 14:31, Bytes toyvenu.t...@gmail.com wrote: From Android Anatomy show, WiFi Driver is in Linux KERNEL. On Nov 9, 2:22 pm, johnson yn.johnson...@gmail.com wrote: Whenever you say connect to aWiFihotspot, the Android device starts searching WLAN network and lists all the available spots, and then you can choose one to surf internet afterwards. My question is : at what level theWiFiissupported? Kernel level (which means Linux??)? or Android level (framework) ?? I assumed that Android provides theWiFimanagement things, like making sure you do have an Android-supportedWiFidevice to connect wireless web; and theWiFidevice manufacturer does the DRIVER thing to expose the interfaces that do the realWiFiconnectionthings. Am I correct?? Johnson. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How the WiFi connection is supported in Android??
Whenever you say connect to a WiFi hotspot, the Android device starts searching WLAN network and lists all the available spots, and then you can choose one to surf internet afterwards. My question is : at what level the WiFi is supported? Kernel level (which means Linux??)? or Android level (framework) ?? I assumed that Android provides the WiFi management things, like making sure you do have an Android-supported WiFi device to connect wireless web; and the WiFi device manufacturer does the DRIVER thing to expose the interfaces that do the real WiFi connection things. Am I correct?? Johnson. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Building your own UI library like the embeddable Google Maps library
I was just wondering where there is any information on creating custom user interface libraries for Android. I would like to create a library and include it in an application by specifying something like uses- library android:name=com.foo.bar / in the manifest (just like maps) and have an Activity that can be inherited from like the MapActivity. How can one create and build a library like this? Thanks! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Cannot sync Calendar with Google Calendar service on emulator
Hi, I run the 1.0r1 emulator and install Calendar.apk and CalendarProvider.apk on the emulator. And I configure the username and pwd from DevTools-Google Service Login successfully. Now I can start the Calendar app successfully, with the month view/week view/etc. But I don't know how to sync the calendars or events with Google Calendar service. From the source code, I assume there should happen sync operation. But it didn't happened. And I know another trigger to sync is Menu-More-My Calendars, but after selected, the activity will crash. The below is from DDMS logcat: 02-21 00:59:44.260: INFO/ActivityManager(56): Starting activity: Intent { action=android.intent.action.VIEW comp={com.android.calendar/com.android.calendar.SelectCalendarsActivity} } 02-21 00:59:44.681: WARN/dalvikvm(376): VFY: unable to resolve virtual method 428: Lcom/google/android/googleapps/GoogleLoginCredentialsResult;.getStatus ()Lcom/google/android/googleapps/LoginData$Status; 02-21 00:59:44.681: WARN/dalvikvm(376): VFY: rejecting opcode 0x6e at 0x0012 02-21 00:59:44.681: WARN/dalvikvm(376): VFY: rejected Lcom/google/android/googlelogin/GoogleLoginServiceBlockingHelper;.getAuthToken (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; 02-21 00:59:44.681: WARN/dalvikvm(376): Verifier rejected class Lcom/google/android/googlelogin/GoogleLoginServiceBlockingHelper; 02-21 00:59:44.681: WARN/dalvikvm(376): threadid=17: thread exiting with uncaught exception (group=0x40010e28) 02-21 00:59:44.681: ERROR/AndroidRuntime(376): Uncaught handler: thread AsyncQueryWorker exiting due to uncaught exception 02-21 00:59:44.711: ERROR/AndroidRuntime(376): java.lang.VerifyError: com.google.android.googlelogin.GoogleLoginServiceBlockingHelper 02-21 00:59:44.711: ERROR/AndroidRuntime(376): at com.android.providers.calendar.CalendarProvider.fetchCalendarsFromServer(CalendarProvider.java:965) 02-21 00:59:44.711: ERROR/AndroidRuntime(376): at com.android.providers.calendar.CalendarProvider.queryInternal(CalendarProvider.java:841) 02-21 00:59:44.711: ERROR/AndroidRuntime(376): at android.content.SyncableContentProvider.query(SyncableContentProvider.java:373) 02-21 00:59:44.711: ERROR/AndroidRuntime(376): at android.content.ContentProvider$Transport.query(ContentProvider.java:128) 02-21 00:59:44.711: ERROR/AndroidRuntime(376): at android.content.ContentResolver.query(ContentResolver.java:147) 02-21 00:59:44.711: ERROR/AndroidRuntime(376): at android.content.AsyncQueryHandler$WorkerHandler.handleMessage(AsyncQueryHandler.java:74) 02-21 00:59:44.711: ERROR/AndroidRuntime(376): at android.os.Handler.dispatchMessage(Handler.java:88) 02-21 00:59:44.711: ERROR/AndroidRuntime(376): at android.os.Looper.loop(Looper.java:123) 02-21 00:59:44.711: ERROR/AndroidRuntime(376): at android.os.HandlerThread.run(HandlerThread.java:60) -- Best and Regards Johnson --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---