[android-developers] Accessing Common methods among activities

2010-06-20 Thread mike
hi guys, i have Activity A and Activity B i want to access a method in Activity A from Activity B this is my method Activity A extends activity{ public void save(){ } } this is what i have done from activity B Activity B extends activity{ public void access{

Re: [android-developers] Accessing Common methods among activities

2010-06-20 Thread Gaurav Vaish
Application Context is not an activity but just Context (It's actually, Application) -Gaurav On Sun, Jun 20, 2010 at 12:01 PM, mike hasitharand...@gmail.com wrote: hi guys, i have Activity A and Activity B i want to access a method in Activity A from Activity B this is my method

[android-developers] onKeyDown not being called in TabActivity

2010-06-20 Thread schwiz
Hello all I am trying to override the behavior of a TabActivity that has other Activities as children. I have made all of the children activities return false in onKeyDown so that the key will propagate through to the parent. However, this is not the case. The only key that is being recognized

RE: [android-developers] Android Corba

2010-06-20 Thread Ted Neward
An ORB ships with Java--has since 1.2. Find a Java ORB tutorial, give that a shot. My guess is it'll work as long as you're asking it to be a client--asking the Android device to be a server will probably fail for all the reasons Mark lists below. Java RMI/IIOP should also work, as would

Re: [android-developers] Accessing Common methods among activities

2010-06-20 Thread zx su
you should read develop document more. the application is composed by activities. some activities can form a stack. Only one activity can active. It does not Like you access a method of another class in java. So why refactoring this method into another class? 2010/6/20 Gaurav Vaish

Re: [android-developers] Re: Using barcode scanner as input method?

2010-06-20 Thread zx su
My Barcoder scanner doesn't work. How long did it scanning the 2D barcoder? 2010/6/19 brucko geoff.bruck...@gmail.com Do not tell me I have to develop an application from scratch to get this... OK. I wont :) ... and you don't. You can launch the barcode app with an Intent using

[android-developers] Re: Area map / Area plan

2010-06-20 Thread Simon Ringeisen
my problem is, that the app has to be offline but thx for the idea! On 20 Jun., 05:37, Maps.Huge.Info (Maps API Guru) cor...@gmail.com wrote: You might do it as a web page using the Google Maps API version 3, it works quite well on Android as well as iPhone. The learning curve is easier to

Re: [android-developers] Re: Help required for android SDK : newbie

2010-06-20 Thread zx su
why not read more develop document? 2010/6/19 Salil sali...@gmail.com I did some (re)search and could resolve the issue myself !!! .. thanks On Jun 18, 6:34 am, Salil sali...@gmail.com wrote: Hello I just started my experiments in android. I am using Ubuntu 9.10. I installed Java

[android-developers] Re: Do VBOs really improve performance? Really?

2010-06-20 Thread Navigateur
No I'm not even using draw_texture. I'm comparing using VBOs to just ordinary Buffers for the vertices (and no draw_texture). My test is not near the max frame rate for my device. On Jun 20, 12:21 am, Miguel Morales therevolti...@gmail.com wrote: Well, if you look at the talk google gave the

[android-developers] TextView/Spannable - Applying Alignment to portion of the text

2010-06-20 Thread Markus
Dear Community I've been struggling with a problem concerning Spannables. What I'm trying to do is apply a AlignmentSpan.Standard(Alignment.ALIGN_NORMAL) to the left portion of the text, and AlignmentSpan.Standard(Alignment.ALIGN_OPPOSITE) to the right portion of the text. However, this does not

[android-developers] Re: Do VBOs really improve performance? Really?

2010-06-20 Thread Robert Green
The question are VBOs faster is a very subjective one. I can answer the question are VBOs faster for large amounts of static geometry and the answer in my experience has been yes, very much so, especially on first-gen devices. For quads and such? No. In fact, it could actually be slower

Re: [android-developers] Android Corba

2010-06-20 Thread Mark Murphy
On Sun, Jun 20, 2010 at 3:31 AM, Ted Neward ted.new...@gmail.com wrote: An ORB ships with Java--has since 1.2. But not with Android, AFAIK. RMI, for example, is not available. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog |

Re: [android-developers] onKeyDown not being called in TabActivity

2010-06-20 Thread Mark Murphy
On Sun, Jun 20, 2010 at 3:02 AM, schwiz sch...@gmail.com wrote: Hello all I am trying to override the behavior of a TabActivity that has other Activities as children.  I have made all of the children activities return false in onKeyDown so that the key will propagate through to the parent.  

[android-developers] Re: Layout margin left/right issue in 2.2?

2010-06-20 Thread goosedroid
I noticed that many Google apps use negative margins, just running the grep $ grep -R 'margin[^ ]*=-' * on various git repositories reveals Music, Contacts, Settings ... even stuff in base/core/res uses them. I'm confused. Are there certain places where it is acceptable, and others where it is

[android-developers] Java Midlet

2010-06-20 Thread perumal316
Hi, I have my own java midlets which I want to try to run in Android phone itself. I have tried using Midlet runner available in Market (by netmite) but it only allows me to browse through available java midlets and install from a website. I want a runner which i want to use to test my own

[android-developers] Re: Java Midlet

2010-06-20 Thread Robert Kochem
perumal316 schrieb: I have my own java midlets which I want to try to run in Android phone itself. I have tried using Midlet runner available in Market (by netmite) but it only allows me to browse through available java midlets and install from a website. I want a runner which i want to use

[android-developers] Re: Example gallery style view with fling, bounce, animation, etc

2010-06-20 Thread droidful
Hi, my apologies, but there is a serious bug in the FlingGallery code which results in views not being recycled. The offending function is shown below. As can be seen the line mExternalView = mInvalidLayout occurs before the call to adapter.getView, which means that in adapter.getView the value of

[android-developers] Re: Example gallery style view with fling, bounce, animation, etc

2010-06-20 Thread droidful
package com.droidful.flinggallery; import android.content.Context; import android.view.GestureDetector; import android.view.KeyEvent; import android.view.MotionEvent; import android.view.View; import android.view.animation.Animation; import android.view.animation.AnimationUtils; import

[android-developers] creating and opening sqlitedb on sdcard for api7

2010-06-20 Thread kamiseq
hi all, I have a small problem with my code, I am trying to create (if that does not exist) and open connection to sqlite but it fails to open. Im doing that cos I know that my db can be big and may not fit into mobile local storage. 1. I get path to external storage and get the full path to

Re: [android-developers] creating and opening sqlitedb on sdcard for api7

2010-06-20 Thread Mark Murphy
Make sure you have the WRITE_EXTERNAL_STORAGE permission. Also, in the stack trace you listed, there is probably a Caused by: section after what you had in your original email -- that may give you additional clues. On Sun, Jun 20, 2010 at 10:45 AM, kamiseq kami...@gmail.com wrote: hi all, I

[android-developers] Re: onKeyDown not being called in TabActivity

2010-06-20 Thread schwiz
thanks for the suggestions mark but my app is way to complicated to keep all of my logic in one activity which is why I have it separated into separate activities with the tabs. It was also an additional requirement of my client to have some of the activities I made separate like that so they can

[android-developers] Auto-completion/correction hints

2010-06-20 Thread Raymond Rodgers
I have an AutoCompleteTextView working with a ContentProvider that correctly pulls known information from a database when the user is typing and presents it. However, I would also like to support the automatic hints/word choice list you get when using apps like the Messaging app. I haven't

Re: [android-developers] How to track URL in each landing page in Webview

2010-06-20 Thread paulb
Hello Shiva, Maybe you want to implement the method shouldOverrideUrlLoading as per: http://developer.android.com/guide/tutorials/views/hello-webview.html On Fri, Jun 18, 2010 at 9:05 PM, Shiva prasad shivu.shiv...@gmail.com wrote: Hi, I am working on webview android application and I am

[android-developers] can't anymore show light notification

2010-06-20 Thread reda
Hi, When I was using android api 5 (sdk 2.0) I was able to show light notification in the trackball of my nexus one : mNotificationManager.notify(my tag,0, notif); Now, I'm developping on android api 3 (sdk1.5) and this method is no more available so I use : mNotificationManager.notify(0,

[android-developers] Re: creating and opening sqlitedb on sdcard for api7

2010-06-20 Thread kamiseq
im running this app on emulator, I added permission with no success. I dont have any caused by this is all I have from my logcat (with no filters) D/SqliteExternalHelper( 434): getting readwrite database D/SqliteExternalHelper( 434): opening writable database at / sdcard:my_external_db.db

[android-developers] Re: Is it possible to wake the device with : PowerManager.WakeLock.acquire()

2010-06-20 Thread reda
Thanks Mark. My application works nice since I used the alarmManager. Best ragards. Reda ABDI On 18 juin, 22:31, Mark Murphy mmur...@commonsware.com wrote: On Wed, Jun 16, 2010 at 2:54 AM, reda reda.a...@gmail.com wrote: I have a timer that schedule a task to run every 5 minutes. That is a

Re: [android-developers] Re: onKeyDown not being called in TabActivity

2010-06-20 Thread Mark Murphy
On Sun, Jun 20, 2010 at 11:08 AM, schwiz sch...@gmail.com wrote: thanks for the suggestions mark but my app is way to complicated to keep all of my logic in one activity which is why I have it separated into separate activities with the tabs. Do not use Activity as simply a means of code

Re: [android-developers] Re: creating and opening sqlitedb on sdcard for api7

2010-06-20 Thread Mark Murphy
On Sun, Jun 20, 2010 at 11:20 AM, kamiseq kami...@gmail.com wrote: E/Database(  434): sqlite3_open_v2(/sdcard:my_external_db.db, handle, 2, NULL) failed This looks like you are trying to open /sdcard:my_external_db.db instead of /sdcard/my_external_db.db. -- Mark Murphy (a Commons Guy)

[android-developers] Re: Mimic Home button in software

2010-06-20 Thread GodsMoon
Oh. That is important information! My app, Smart Lock, manipulates the Keyguard a lot. That's the main feature actually. To clarify, who is a device admin? On Jun 20, 12:22 am, Dianne Hackborn hack...@android.com wrote: Ah.  Replacing the lock screen and such is not at this point supported.  You

Re: [android-developers] Re: Mimic Home button in software

2010-06-20 Thread Mark Murphy
On Sun, Jun 20, 2010 at 11:57 AM, GodsMoon godsm...@gmail.com wrote: Oh. That is important information! My app, Smart Lock, manipulates the Keyguard a lot. That's the main feature actually. To clarify, who is a device admin? New device policy management APIs allow developers to write 'device

[android-developers] Re: creating and opening sqlitedb on sdcard for api7

2010-06-20 Thread kamiseq
I tried manually replacing File.pathSeparator with / but the result was the same, i will try that again .. so you say that the code is ok? On 20 Cze, 17:27, Mark Murphy mmur...@commonsware.com wrote: On Sun, Jun 20, 2010 at 11:20 AM, kamiseq kami...@gmail.com wrote: E/Database(  434):

Re: [android-developers] Re: Mimic Home button in software

2010-06-20 Thread Dianne Hackborn
There should be a blog post at some point; this is used to implement the new corp exchange support for example. So if you are using an exchange server that requires a lock pattern, the old API to hide the lock screen will not work. On Sun, Jun 20, 2010 at 9:04 AM, Mark Murphy

Re: [android-developers] Re: creating and opening sqlitedb on sdcard for api7

2010-06-20 Thread Mark Murphy
On Sun, Jun 20, 2010 at 12:11 PM, kamiseq kami...@gmail.com wrote: I tried manually replacing File.pathSeparator with / but the result was the same, i will try that again .. so you say that the code is ok? I have not tried creating a database on an SD card. I am simply trying to provide you

[android-developers] Animation behavior

2010-06-20 Thread gymshoe
I want to perform animations within a view. However, the behavior of the animations does not seem consistent depending on the sequence, and I don't understand why. This example performs a simple fade out of the image: XML: set xmlns:android=http://schemas.android.com/apk/res/android;

[android-developers] Re: Do VBOs really improve performance? Really?

2010-06-20 Thread Navigateur
What is your approximate experimental fps improvement using exactly the same content with and without VBOs? I'm testing with 3000 static verts (GL_STATIC_DRAW) and I'm getting exactly the same frame rate with and without VBOs, only the set-up time is longer with VBOs. What are your results with

[android-developers] Scaling Animations: What does Android consider a scale of 1.0?

2010-06-20 Thread gymshoe
I want to perform a tween animation within a view. I receive unexpected results, if I do a simple scaling animation on an ImageView (containing a simple picture, and part of a RelativeLayout) which I want to shrink from full-size to half-size: XML set

[android-developers] Pick a telephone number

2010-06-20 Thread Jaap
Hi, In my app I want to have the user selecting a telephone number from the contacts list. How do I do that. Selecting a contact is easy: Intent intent = new Intent(Intent.ACTION_PICK); intent.setType(ContactsContract.Contacts.CONTENT_TYPE); startActivityForResult(intent, PICK_CONTACT); Is

[android-developers] Re: Control any led of the device, does the sdk allow?

2010-06-20 Thread Gabriel Simões
Thanks Dianne Based on that, I will wait for future SDKs´s features 2010/6/19 Gabriel Simões gsim...@gmail.com Thanks for your reply... I should have mentioned that I knew about using the notificationManager to flash leds but unfortunately it doesn´t work for me mainly because

[android-developers] The No.1 Magic Community Talk - Share and Learn Magic Tricks.

2010-06-20 Thread Rebeca
# The No.1 Magic Community Talk - Share and Learn Magic Tricks.Click here and See the Proof -- 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

[android-developers] Re: creating and opening sqlitedb on sdcard for api7

2010-06-20 Thread kamiseq
:-) heh ok, I appreciate that :) On 20 Cze, 18:30, Mark Murphy mmur...@commonsware.com wrote: On Sun, Jun 20, 2010 at 12:11 PM, kamiseq kami...@gmail.com wrote: I tried manually replacing File.pathSeparator with / but the result was the same, i will try that again .. so you say that the

[android-developers] Re: How to set Connection mode?

2010-06-20 Thread reda
Hi, Can anybody please tell us if it is possible to change network connection programmatically ? How can we do a fail over ? If no, when it will be available ? Thanks On 29 avr, 15:45, vikky vikash19852...@gmail.com wrote: Hi.. thnx for the reply.. I have tried so many things...but not

Re: [android-developers] Re: How to set Connection mode?

2010-06-20 Thread Mark Murphy
On Sun, Jun 20, 2010 at 2:25 PM, reda reda.a...@gmail.com wrote: Can anybody please tell us if it is possible to change network connection programmatically ? That is handled via the OS, not programmatically, AFAIK. -- Mark Murphy (a Commons Guy) http://commonsware.com |

[android-developers] Dubious extra call to OnCreate on orientation change

2010-06-20 Thread Ali Chousein
Hi, I've been experimenting with orientation change and have seen a strange behavior (at least to my opinion) when I change the orientation from landscape to portrait. To make the explanation more concrete let's consider the following super-simple code: 1. import android.app.Activity; 2.

Re: [android-developers] Accessing Common methods among activities

2010-06-20 Thread Frank Weiss
You need to explain what the save() method really does. In the simplest case, it could be a static method of ActivityA or a method in the common base class of ActivityA and ActivityB. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post

[android-developers] [OpenGL ES] 2D controls over 3D world

2010-06-20 Thread Simone
Hi, I created a 3D world, and I managed to draw 2D overlay controls (as in a game) over it. I did it with this: public void onDrawFrame(GL10 gl) { //some 3d draws and transformations here gl.glMatrixMode(GL10.GL_PROJECTION); gl.glPushMatrix();

[android-developers] Re: Dubious extra call to OnCreate on orientation change

2010-06-20 Thread Streets Of Boston
Hi Ali, This is perfectly normal. All is explained in the DevGuide on developer.android.com: http://developer.android.com/guide/topics/resources/runtime-changes.html On Jun 20, 4:07 pm, Ali Chousein ali.chous...@gmail.com wrote: Hi, I've been experimenting with orientation change and have

[android-developers] Re: Dubious extra call to OnCreate on orientation change

2010-06-20 Thread Ali Chousein
Hi, Thank you for the reply. The page gives useful information. However, it does not explain why the extra call to onCreate and onDestroy takes place when the orientation is changed from landscape to portrait. When the orientation is changed from portrait to landscape there is no extra call to

[android-developers] Loading random image when activity is brought up...Not working any ideas?

2010-06-20 Thread BryBam
I've been staring at this for hours. It compiles fine with no errors and loads the activity on my nexus. The button and the menu items load fine with no issues at all. It's simply not loading any of the drawables i'm specifying :/ any ideas what I did wrong? All I want is whenever this activity

[android-developers] Re: Loading random image when activity is brought up...Not working any ideas?

2010-06-20 Thread BryBam
I would also like to point out that I've tried all three of these private Integer [] mImageIds = { R.drawable.icon, R.drawable.shoticon, R.drawable.mixicon, }; private static final Integer [] mImageIds = { R.drawable.icon,

[android-developers] Re: Spinners showing text in white with white background!

2010-06-20 Thread Gabriel Simões
Still thinking about how I will solve this problem. I would like to keep using spinners ... and I can´t find a tutorial on how to create a custom layout for the spinner´s options list. The usage of textviews + listviews is not as intuitive as a spinner Is there a way to use

[android-developers] Re: Android Corba

2010-06-20 Thread Indicator Veritatis
The best use for CORBA in the Android context is this: use your familiarity with CORBA as an example of what an SOA architecture is, then use your understanding of SOA to understand Android Intents, which have often been compared with SOA. Manning Press's Unlocking Android, for example, says, In

[android-developers] setSelection doesn't work when list is updated by a thread

2010-06-20 Thread Lakshmie
I am trying to scroll a list (ListView) to the top using setSelection(0), but it doesn't happen if the adapter is updated by a different thread. I essentially start the update thread and do setSelection at any point after that statement, but it doesn't seem to work. I also tried View.post() method

[android-developers] Re: Can't sign my apk after updating sdk 2.2 (and the adt plugin)

2010-06-20 Thread Rob Franz
Thanks for this, I have a broken project and closed it - works fine. However, this has always been broken, but I've been able to export signed applications before, so maybe this is a new bug? Thanks, Rob On Jun 2, 10:16 am, Xavier Ducrohet x...@android.com wrote: This is a bug that happens when

Re: [android-developers] Re: Control any led of the device, does the sdk allow?

2010-06-20 Thread Dianne Hackborn
Sorry, there are no plans in the foreseeable future for more APIs to control the LEDs; I didn't mean to imply there would be. 2010/6/20 Gabriel Simões gsim...@gmail.com Thanks Dianne Based on that, I will wait for future SDKs´s features 2010/6/19 Gabriel Simões gsim...@gmail.com

[android-developers] Re: Avoid non-static inner classes in an activity?

2010-06-20 Thread Bob Kerns
You should read the documentation for getApplicationContext(), and not simply believe what the name says. It does NOT, repeat, NOT, return your application. Well, it might, but it might not. Return the context of the single, global Application object of the current process. This generally should

[android-developers] Re: onKeyDown not being called in TabActivity

2010-06-20 Thread schwiz
Thanks for the advice on the activities Mark I will definitely keep that in mine unfortunately all of the activities need access to a service and need to stand alone but you have given me some things to think about maybe its time to start refactoring. The getParent thing worked I actually thought

[android-developers] Re: Do VBOs really improve performance? Really?

2010-06-20 Thread Robert Green
Navigateur, Performance is highly device-dependent. If you're not seeing any performance differences, it would be helpful if you listed on which device, what your FPS is with/without VBOs, etc.. It sounds like you're doing it right. I doubt it matters how you partition the vertex attributes.

[android-developers] Re: Avoid non-static inner classes in an activity?

2010-06-20 Thread Streets Of Boston
I hope some Google engineers can way in when and when not to use getApplicationContext(). I use it all the time for getting a context that isn't tied to an activity life-cycle, which - as i am now learning - may be incorrect. On Jun 20, 9:06 pm, Bob Kerns r...@acm.org wrote: You should read the

[android-developers] Re: Dubious extra call to OnCreate on orientation change

2010-06-20 Thread Streets Of Boston
Ah, sorry, i didn't read your question well enough. You're wondering about the extra onCreate-onDestroy (number 2. and 3.), and not about the expected calls 1. and 4. This should happen (and that's what i see in my activities): Start activity: onCreate. Hit Ctrl-F11: onDestroy (current

Re: [android-developers] Re: Control any led of the device, does the sdk allow?

2010-06-20 Thread sachin ravi
Hi.. If you full android source code which u can compile, then you can modify the led-class.c file and give full permission to brightness file (say 777 instead of 644 currently). then LED will work via notification manager. On Mon, Jun 21, 2010 at 6:21 AM, Dianne Hackborn

Re: [android-developers] can't anymore show light notification

2010-06-20 Thread sachin ravi
This code is fine, But only issue is.. they have blocked the permission to change the LED. if you have source code which can be compiled then you can modify that and it will work.. On Sun, Jun 20, 2010 at 8:47 PM, reda reda.a...@gmail.com wrote: Hi, When I was using android api 5 (sdk

[android-developers] Fwd: OnSharedPreferenceChangeListener never receives callback

2010-06-20 Thread Connick
Hi, I'm not sure I understand what you are trying to do ...but if it helps any, I ended up using a broadcast/receiver to relay the preference change. While I could have just re-read from preferences onResume on the second activity, I didn't want the user to see data shifting around in the list as

[android-developers] Re: parse local media file to get Mime type

2010-06-20 Thread allstars
thanks to both but it seems not exactly what i want at first before i used opencore to do this because that function *really* parse my media file to see its mime-type but MediaFile.java MediaScanner.java use the 'file extension' to detect the mimetype thanks On Jun 17, 3:11 am, Kumar Bibek

Re: [android-developers] How to track URL in each landing page in Webview

2010-06-20 Thread Shiva prasad
Thanks Paulb, Thank you very much for your help but, I am getting this output. and my request is after getting the web page if i click on any link in the web, the URL will get change. I want to catch that URL. Could you help me to solve this Thanks and Regards, Shivaprasad. -- You

[android-developers] Froyo FRF72 vs. FRF50

2010-06-20 Thread Zsolt Vasvari
I installed Froyo build FRF72 on my Nexus One yesterday. Couple of observations: - SQLite write performance seemed to have increased significantly wrt FRF50. It's also possible that the performance of the garbage collector has increased. In either case, my app, which is a heavy database user,

[android-developers] Re: Set result of svnversion to tag android:versionName

2010-06-20 Thread joebowbeer
In an Ant build, you can use replaceregexp to modify the manifest: replaceregexp file=${build.manifest.file} match=android:versionName=\quot;[^\quot;]*\quot; replace=android:versionName=\quot;${svn.revision.max}\quot; / You can pass the svnversion in the Ant command line, or use