Re: [android-developers] Re: LoaderCallbacks.onLoadFinished unnecessarily called twice when rotating

2014-03-04 Thread Matty
There's a fair discussion on StackOverflow here: http://stackoverflow.com/questions/11293441/android-loadercallbacks-onloadfinished-called-twice/22183247 I saw the behavior when re-loading a Fragment in a ViewPager, which may be very similar to rotation... Basically, I solved the problem by

[android-developers] Re: Problem with adjustPan andadjustResize

2011-01-21 Thread Matty
If you're currently supporting API 3, I'd try to bump it to API 4, and see if that helps. I had some similar issues, and while I lost a small percentage of device support, it was worth it for the simplicity of the fix. On Jan 21, 9:09 am, Alok Kulkarni kulsu...@gmail.com wrote: Hi.  i am

[android-developers] Re: change color of Button

2011-01-19 Thread Matty
I would recommend you specify shape drawables in xml for the background, using gradient to achieve your gradient. See some details here: http://developer.android.com/guide/topics/resources/drawable-resource.html#Shape Also, you can specify different states, see:

[android-developers] Re: Beginning?????

2011-01-18 Thread Matty
I believe this will be useful: http://insanitydesign.com/wp/projects/nehe-android-ports/ On Jan 14, 5:33 am, Vishal vb.41...@gmail.com wrote: hii developers... I am new to this journey and i want to make a 3d game using SDK 1.6 version...i have installed eclipse and has added android plugin

[android-developers] Re: Leave crashed app

2011-01-14 Thread Matty
I agree with TreKing. If you're still very early in the development process, you should be able to locate the null object and do some if(obj==null) { } handling to prevent repetitive errors while debugging/coding. On Jan 14, 1:06 pm, TreKing treking...@gmail.com wrote: On Fri, Jan 14, 2011 at

[android-developers] Re: How to extend intent

2010-10-06 Thread Matty
I believe the best way to do what you've described is create your own Video Player Activity, which can contain a VideoView, and you can add listeners for most events (like video stopped or ended). On Oct 6, 5:51 am, zohar lerman lirazo...@gmail.com wrote: Hi, I am using the following code to

[android-developers] Re: bitmap magnification

2010-10-04 Thread Matty
I would advise calculating the scale of original image to screen height/width, and adjusting your inSampleSize accordingly. When it's 2, you're always loading half of the source bitmap, so if it's huge, you're still loading half of huge. You'll want to do something like options.inSampleSize =

[android-developers] Re: Need help getting app to play sounds

2010-08-26 Thread Matty
It depends on what type of audio you want to play... If you're playing short WAV files, maybe you should look at AudioTrack instead of MediaPlayer? MediaPlayer has worked perfectly well for me with MP3s though. Maybe review the MediaPlayer State Diagram if you're having trouble... On Aug 26,

[android-developers] Re: android manifest file from an unzipped apk cannot be read

2010-08-26 Thread Matty
Activites that are re-usable should have some published way of invoking them... Otherwise, perhaps they do something by file type, like if you start an activity for an MP3, audio players should be able to launch. Why don't you just ask the developer how to invoke an activity, instead of trying

[android-developers] Re: Can we install Android SDK on windows 7 if yes then how ?

2010-08-26 Thread Matty
I followed the standard instructions on Windows 7, and everything works great. On Aug 25, 6:07 pm, Mark Murphy mmur...@commonsware.com wrote: On Wed, Aug 25, 2010 at 4:09 AM, Abbas stahaab...@gmail.com wrote: Can we install Android SDK on windows 7 Yes. if yes then how ? By following

[android-developers] Re: Using reflection to overide 2.0 method

2010-08-05 Thread Matty
I agree with TreKing, but I believe you might have to omit the '@Override' annotation. On Aug 5, 11:07 am, TreKing treking...@gmail.com wrote: On Thu, Aug 5, 2010 at 6:01 AM, Neilz neilhorn...@gmail.com wrote: Any ideas please on how I can achieve this? I don't think you have to do anything.

[android-developers] Re: Thread

2010-08-04 Thread Matty
You should be able to read up on threads here: http://download-llnw.oracle.com/javase/tutorial/essential/concurrency/index.html On Aug 4, 4:43 am, perumal316 perumal...@gmail.com wrote: Hi All, I want to write a separate Thread within my application(to do Bluetooth connection). Any idea

[android-developers] Re: getAlpha for ImageView

2010-08-04 Thread Matty
If you're calling setAlpha, you should remember what you set the ImageView to. Maybe extend ImageView and add a rememberedAlpha field, that gets it's value on setAlpha() but before a call to super.setAlpha()? It doesn't look like there's a straight forward way to get the alpha... On Aug 3,

[android-developers] Re: Launch application or service from html link?

2010-08-03 Thread Matty
I would make up a scheme... and you can use an Intent-Filter to grab any request to that scheme. use an url like shrenikvikam://some.data.for.your.activity Then if your Activity listens for that scheme, a web link should start your activity. see

[android-developers] Re: intent to play mp4 problems

2010-08-03 Thread Matty
));                     view.getContext().startActivity(intent);                     return true;                 } else {                     return super.shouldOverrideUrlLoading(view, url);                 }             }         } On Aug 2, 3:00 pm, Matty busbus...@gmail.com wrote

[android-developers] Re: Deploying Custom Configuration with My Android App

2010-08-03 Thread Matty
If you have web services already, won't it be easy to add one that allows clients to say where should I look for content? They could send version numbers, their own phone number, or other information so you can decide where to point them. Then the client could store that information in a DB, or

[android-developers] Re: Specs for graphics

2010-08-03 Thread Matty
You can find UI Guidelines for icons here: http://developer.android.com/guide/practices/ui_guidelines/icon_design.html If you click around, you can find other info there too... As for the market submission, here's what the form says (and validates for) Screenshots 0 or 2 320w x 480h or 480w x

[android-developers] Re: How to store a drawable in database?

2010-08-02 Thread Matty
I can't help but wonder why you would want to do this? On Aug 1, 9:12 am, Jerry Fan jerryfan1...@gmail.com wrote: Hi folks, is there anyway that I can store drawables into database? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post

[android-developers] Re: how to get which listitem is focused

2010-08-02 Thread Matty
You should be able to create an AdapterView.OnItemSelectedListener, add it to your ListView using setOnItemSelectedListener and keep a pointer to the currently selected item. On Jul 31, 9:17 am, cindy ypu01...@yahoo.com wrote: I have a listActivity which I use ArrayAdapter insider it. When

[android-developers] Re: new scene ?

2010-08-02 Thread Matty
1) Create a new activity for your second scene... 2) Add an OnClickListener to your button 3) When button is clicked, call startActivity() with an intent for your second activity. Hope that's what you were asking On Aug 2, 2:05 pm, coy cawe...@gmail.com wrote: hi. I'm beginning to study

[android-developers] Re: either im only registering textview and webview clicks or im not getting my listitemclick

2010-08-02 Thread Matty
Are you perhaps listening to a ListView that doesn't exist any more??? Also, I don't know why you would use a WebView for this... It makes much more sense to download the image into memory and display it as an ImageView. It sounds like you're reloading it every time now anyway. If you don't want

[android-developers] Re: Create Quick Launch of WAP site

2010-08-02 Thread Matty
I'm not positive what all the options are... You could certainly just wrap your website in a WebView and offer it for free on the market... If users visit your site, you can send them to the market with a market:// link, and you'll get visitors who found your app on the market without even

[android-developers] Re: intent to play mp4 problems

2010-08-02 Thread Matty
Are you calling intent.setDataAndType(Uri Data, String Type) ? Sometimes specifying the right mime type makes a big difference. On Aug 2, 1:26 am, Kyle kyle4...@gmail.com wrote: Hey, I've created a WebView which loads a webpage and will play any file that ends in mp4 on click. The problem

[android-developers] Re: Detecting lock_layer timed out

2010-07-22 Thread Matty
against?  It could just be a bug in the platform. On Wed, Jul 21, 2010 at 11:17 AM, Matty busbus...@gmail.com wrote: My OpenGL stuff seems to draw just fine until some rotate (this is most reproducible if you rotate back and forth with about a second between). Note that Activity B

[android-developers] Re: video playback problem

2010-07-22 Thread Matty
My guess is the video isn't the right size, so the device is struggling to scale the video and/or the bitrate is just too high... Try a lower bitrate, and check the dimensions of your video. On Jul 22, 7:49 am, berliner myberli...@gmail.com wrote: Hi, what could be the reason that a mp4

[android-developers] Re: how to upgrade the os of g1 mobile

2010-07-22 Thread Matty
What carrier are you on? I believe T-Mobile allowed me to use the update setting... Otherwise I think you'll have to find instructions online. See an example I found with a simple google search: http://www.denraf.be/content/howto-android-21-g1adp1dream On Jul 22, 4:54 am, Narendra Bagade

[android-developers] Re: How to convert a xml page to speech???

2010-07-22 Thread Matty
I think you will want to write your own xml parser/handler so that you can decide what gets read to the user. Maybe use SAX? On Jul 22, 6:03 am, prachi prachi.tya...@wipro.com wrote: Hi all I have an xml page which im able to display on webview and also able to convert it to sppech by using

[android-developers] Detecting lock_layer timed out

2010-07-21 Thread Matty
I have looked through many posts on this issue, and I've concluded that there's not much I can do to prevent it... I am able to reproduce this error when repeatedly rotating an Activity that uses OpenGL. W/SurfaceComposerClient( 749): lock_layer timed out (is the CPU pegged?) layer=2,

[android-developers] Re: Touch event noisy

2010-07-21 Thread Matty
I'm not positive, but maybe the issue is that you're getting touch events for each time you draw your scene? Try to skip drawing, and just print debug about when your finger is down... I think that will shed some light on the issue. You could also just capture the touchdown, record it's

[android-developers] Re: Widget update problem

2010-07-21 Thread Matty
How are you delaying 5 seconds, and what operation are you doing once that 5 seconds is complete? Could it be taking more than 5 seconds, thus slowly building up the number of processes that are running? On Jul 21, 5:32 am, NightGospel wutie...@gmail.com wrote: Hi all, I wrote one widget that

[android-developers] Re: how to get function call trace on android phones?

2010-07-21 Thread Matty
Can't you put a breakpoint (in eclipse) at the function you want information about, then just run the code? When you hit a breakpoint, eclipse should show you a call stack. On Jul 14, 2:44 am, Shuo Deng dengshuoama...@gmail.com wrote: Does anybody know how can I get the build-in function call

[android-developers] Re: Detecting lock_layer timed out

2010-07-21 Thread Matty
appreciated. On Jul 21, 9:22 am, Dianne Hackborn hack...@android.com wrote: What problem is this causing you that you are trying to fix? On Wed, Jul 21, 2010 at 5:47 AM, Matty busbus...@gmail.com wrote: I have looked through many posts on this issue, and I've concluded that there's

[android-developers] Re: Detecting lock_layer timed out

2010-07-21 Thread Matty
: Have you made sure your SurfaceView UI is actually drawing regularly, and especially redrawing itself as soon as possible with the new size? On Wed, Jul 21, 2010 at 8:02 AM, Matty busbus...@gmail.com wrote: Thanks for the quick response Dianne. I have an activity that uses OpenGL

[android-developers] Re: Using a Handler in this code?

2010-07-20 Thread Matty
I'm not sure why you can't just use a thread (no handler)? If you do need a handler, you can just create a new runnable, and post it to the handler with something like: new Handler().post(new Runnable(){ public void run(){ image = new GLCamTest().extractimage(q); } }); (Obviously, the code

[android-developers] Re: Where is source code (or git file) for ContactsContract.QuickContact

2010-07-16 Thread Matty
I see ContactsContract here: http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/provider/ContactsContract.java But I don't see a QuickContact... On Jul 15, 5:33 pm, Agus agus.sant...@gmail.com wrote: Hi all, What is the .git file corresponding to

[android-developers] Re: debugging just the apk file

2010-07-15 Thread Matty
As a developer, I often find it useful enough if I get a logcat dump with a crash or bug. More information can be found about 'adb logcat' here: http://developer.android.com/guide/developing/tools/adb.html On Jul 14, 8:59 pm, rahul jain jainwolver...@gmail.com wrote: Hi there ! I am not

[android-developers] Re: Button pressed color

2010-07-14 Thread Matty
What are your custom buttons? Why not make them extend the Button class so you inherit the default behavior? I have created some default buttons, but I only did so to selectively override default behavior. Try inspecting (new Button(this)).getBackground(); and see if that helps you. On

[android-developers] Re: Force an Application to be alive

2010-07-13 Thread Matty
I believe you might want to use a service. http://developer.android.com/reference/android/app/Service.html On Jul 13, 3:49 am, perumal316 perumal...@gmail.com wrote: Hi All, I am writing an application to do fileobservation which can be done. Is there any way I can make the application to

[android-developers] Re: Button Long Click to increase Numeric Text View

2010-07-13 Thread Matty
I do something similar... onLongClick - Start a thread/timer in Timer/Thread - increment value, reschedule timer onTouchListener.OnTouch() - detect MotionEvent.ACTION_UP and stop the timer Hope that helps, sounds like you're on the right track. On Jul 13, 5:48 am, Kris Skarbø

[android-developers] Re: Support ECIES encryption?

2010-07-13 Thread Matty
I don't think it's natively supported... But there's some sample java code here: http://www.flexiprovider.de/examples/ExampleECIES.html Might not help, I think they use 3rd party libraries, but perhaps it's a good place to get started. On Jul 13, 5:58 am, ricos rigc8...@gmail.com wrote:

[android-developers] Re: Block Text

2010-07-13 Thread Matty
I'm not exactly sure why you would want to do this... What are you doing with calls? Maybe you can get away with turning off/disabling all radios? (I don't know how feasible this is). Maybe you just want to block the notifications, and not the actual messages? On Jul 12, 4:54 pm, ranjan ar

[android-developers] Re: drawing lines on top of a image view

2010-07-13 Thread Matty
If you want to draw on top of an ImageView, I would extend it and override it's onDraw method. This provides you a [relative] canvas to draw on. Just be sure to call super.onDraw() if you want the image to show up also. On Jul 13, 11:23 am, Jags jag...@gmail.com wrote: I am trying to put a

[android-developers] Re: OpenGL texture wrapping flickers. Why?

2010-07-09 Thread Matty
I was able to solve this... I was calling the texture wrapping code on every draw, right before I bound the texture. Now, I set the texture parameters when the textures are generated, and I don't need to specify wrapping every time I draw a shape... No more flicker, and the code is probably more

[android-developers] Re: Theme.NoTitleBar.Fullscreen not working when other activities use a custom title?

2010-07-09 Thread Matty
I found the solution here: http://groups.google.com/group/android-developers/browse_thread/thread/2de77043f32835aa/f2a1357bf1335461 It's basically: Add the following to your activity: getWindow().setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS,

[android-developers] Re: How to define some smart layout?

2010-07-09 Thread Matty
This simple layout seems to work for me: ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=fill_parent android:orientation=vertical

[android-developers] OpenGL texture wrapping flickers. Why?

2010-07-07 Thread Matty
I'm drawing 5 rectangles with OpenGL. They are texture mapped, and use the following parameters/binding: ... gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S, GL10.GL_CLAMP_TO_EDGE);

[android-developers] Theme.NoTitleBar.Fullscreen not working when other activities use a custom title?

2010-07-07 Thread Matty
My test involves 2 Activities, one with a GridView, and one with a ListView. The GridView is defined as Theme.NoTitleBar.Fullscreen and works great on first launch. The ListView defines a custom title bar using: getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE,

[android-developers] Re: Smooth Image Rotation with Gesture Control?

2010-07-07 Thread Matty
You should be able to override onDraw, and draw the bitmap using something like: canvas.drawBitmap(bitmap, matrix, paint) I haven't used drawBitmap with a matrix before, but you can check out some more info here: http://www.anddev.org/resize_and_rotate_image_-_example-t621.html You should be

[android-developers] Re: organizing the code

2010-07-07 Thread Matty
Well, as far as I can tell, the only error-handling you're doing in that whole block is to set picvalues to an empty object if you get a JSONException... If all you're going to do on Exception is log a message, there's probably no reason to call out each Exception seperately. You can Log each

[android-developers] Complete Newbie - Looking for some help :)

2010-05-12 Thread Matty Kyle
Hi there. Well i decided today that I want to create a very simple app to compliment my website at http://www.gameworldplus.com. I basically want to make a simple app with nice looking buttons, leading to the different areas of help/tutorial, then work from there. I have installed everything