[android-developers] gallery problem
hi all, I used the gallery widget for photo shows, when I put the photos in the photo directory, there will be some black photos on the gallery when gallery shows, so, did somebody have the same experience? 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] SGX driver impact Android phone
hi In latest Android phone, SGX driver has replaced framebuffer. However I find frameworks/base/opengl/tests/swapinterval/swapinterval.cpp don't work well, the error output is as blow: == C:\adb shell test-opengl-swapinterval # configs = 27 couldn't find an EGLConfig matching the screen format == And then I try two solutions: 1. If I delete THREE so libs: /system/lib/hw/gralloc.omap3.so, /system/lib/egl/libGLESv1_CM_POWERVR_SGX530_121.so, /system/lib/egl/libEGL_POWERVR_SGX530_121.so, test-opengl-swapinterval will work well. However, it will cause the phone screen can't show normally. 2. run adb shell stop, and then run test-opengl-swapinterval, it work well. however, it will cause the phone screen can't show normally. So, Could you tell me how to build and run it without delete these THREE so libs, and without run adb shell stop? 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] Broadcast between desktop and simulator application in WIFI
Hello everyone, I have two peer-to-peer apps, one runs in the desktop and one runs in the Android Simulator (1.6 version). Each program broadcast the message (by UDP with port 6) to its network to discovery the remote service of the other. In desktop: application has IP 192.168.1.13, broadcast, and received broadcast message in port A In simulator: however, the application has IP: 10.0.2.15, broadcast, and received the broadcast message in port B I have applied redir port forwarding: redir add udp:4446:[port-B-in- simulator]. But it doesn't show any result. p/s: I have tested two apps in in different consoles in desktop and it works to discover each other. Thanks a lot for your help Anh -- 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: Encrypting in PHP and Decrypting in Android
What about SSL/TLS ? On Nov 22, 2:47 pm, jax jackma...@gmail.com wrote: What would I use to: Encrypt a string in PHP and Decrypt that string from Android? What methods are supported by both and which is the most secure? -- 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: default screenwidth of android
I read the document and opened my image in draw9path tool I could not understand what to do with it, when i tried filling the pixels in left, the texts in picture started disappearing. so i did a save as .9 patch. the image was saved as imagename.9.png tried to use that by copying to drawable in eclipse, eclipse refused to reconginise that file, as it contained . i renamed it to imagename.png it restored to previous image is not there any automated way of doing this ? regards Jagat On Nov 20, 7:25 pm, Vishwanath Kamath Pethri vishwanathkam...@gmail.com wrote: use 9 patch images. This would solve your issues - Vishwa Jags wrote: whats the default screen width of android devices ? I took a 320 x 460 image for my splash screen, it did not cover the entire screen ! regards Jagat -- 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: default screenwidth of android
i am using this xml in my main.xml ImageView android:id=@+id/splashscreen android:layout_width=fill_parent android:layout_height=fill_parent android:src=@drawable/imagename android:layout_gravity=center / On Nov 23, 4:59 pm, Jags jag...@gmail.com wrote: I read the document and opened my image in draw9path tool I could not understand what to do with it, when i tried filling the pixels in left, the texts in picture started disappearing. so i did a save as .9 patch. the image was saved as imagename.9.png tried to use that by copying to drawable in eclipse, eclipse refused to reconginise that file, as it contained . i renamed it to imagename.png it restored to previous image is not there any automated way of doing this ? regardsJagat On Nov 20, 7:25 pm, Vishwanath Kamath Pethri vishwanathkam...@gmail.com wrote: use 9 patch images. This would solve your issues - Vishwa Jags wrote: whats the default screen width of android devices ? I took a 320 x 460 image for my splash screen, it did not cover the entire screen ! regards Jagat -- 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] MapView Directions
Loki117 wrote: I understand that the driving directions class has been taken out of the Google maps API. Is there any other way to get directions on your MapView that I am missing? Not at this time, AFAICT. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- 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 set list item selected???
Hi, Can any one tell me how can I display a list in which 1 list item always selected (highlights by any color or transparent strip ) by default ie, the initial item of the list is always highlighted. Eg. In mobiles and TV Thank you -- 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 to change between full screen and with status bar?
This works for me: // go full screen WindowManager.LayoutParams attrs = mActivity.getWindow().getAttributes (); attrs.flags |= WindowManager.LayoutParams.FLAG_FULLSCREEN; mActivity.getWindow().setAttributes(attrs); // go non-full screen WindowManager.LayoutParams attrs = mActivity.getWindow().getAttributes (); attrs.flags = (~WindowManager.LayoutParams.FLAG_FULLSCREEN); mActivity.getWindow().setAttributes(attrs); On Nov 19, 7:25 pm, freeman freeman.y...@gmail.com wrote: Can you toggle between the full screen mode and normal mode? I got an exception when I call WindowManager.addFlags/setFlags affter the activity has been created. The exception told me something like You cannot modify the flags once the activity is created. On Nov 12, 5:01 pm, tomei.ninge...@gmail.com tomei.ninge...@gmail.com wrote: Thanks Dianne. This works like a charm. The title bar even animates the hide/show action! On Nov 10, 11:32 pm, Dianne Hackborn hack...@android.com wrote: Change the window flag -- getWindow() to get the window, and change the fullscreen flag defined in WindowManager.LayoutParams. On Tue, Nov 10, 2009 at 9:48 PM, tomei.ninge...@gmail.com tomei.ninge...@gmail.com wrote: Hi, Is it possible to show/hide the status bar without creating a new full screen activity? I want to creating something like Firefox browser, where user can toggle the full screen mode. 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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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] Nesting a relative layout and linear layout
hi, Can any one plz tel me how i can nest a relative layout and linear layout that contains only one text view(used by array adapter to generate the list). -- 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: default screenwidth of android
Jags you need to mark the areas that draw9path stretches to get a validated dfraw9path image with the tool.. directions are here: http://developer.android.com/guide/developing/tools/draw9patch.html Fred Grott Android Developer | http://mobilebytes.wordpess.com | http://twitter.com/sharemefg | http://www.linkedin.com/in/shareme | gtalk: fred.grott | skype: fred.grott | googlewave: fred.gr...@googlewave.com | gmail:fred.gr...@gmail.com On Nov 23, 4:59 am, Jags jag...@gmail.com wrote: I read the document and opened my image in draw9path tool I could not understand what to do with it, when i tried filling the pixels in left, the texts in picture started disappearing. so i did a save as .9 patch. the image was saved as imagename.9.png tried to use that by copying to drawable in eclipse, eclipse refused to reconginise that file, as it contained . i renamed it to imagename.png it restored to previous image is not there any automated way of doing this ? regards Jagat On Nov 20, 7:25 pm, Vishwanath Kamath Pethri vishwanathkam...@gmail.com wrote: use 9 patch images. This would solve your issues - Vishwa Jags wrote: whats the default screen width of android devices ? I took a 320 x 460 image for my splash screen, it did not cover the entire screen ! regards Jagat -- 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] EGL and surface destruction
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 David Given wrote: [...] I have an application that uses EGL. It creates an EGLSurface in the normal manner, draws on it, etc. Then the user presses the HOME button. The EGL spec says this: Following a power management event, calls to eglSwapBuffers, eglCopy- Buffers, or eglMakeCurrent will indicate failure by returning EGL FALSE. The error EGL CONTEXT LOST will be returned if a power management event has oc- curred. On detection of this error, the application must destroy all contexts (by calling eglDestroyContext for each context). To continue rendering the application must recreate any contexts it requires, and subsequently restore any client API state and objects it wishes to use. Any EGLSurfaces that the application has created need not be destroyed following a power management event, but their contents will be invalid. I would expect that my app detaching from the screen to be considered this sort of power management event. However, Android doesn't do this. Instead what happens is that it calls my SurfaceHolder.Callback.surfaceDestroyed() method and then nukes the surface without telling me. The Android docs say this: Does anyone know anything about this? This is becoming a very serious issue for us --- Android's support for EGL_CONTEXT_LOST appears to be just plain broken in a lot of places. Specifically, once it's in a dead context state, all operations fail --- including calls to eglCreateContext(), which we need to call to get it working again! Not to mention that eglGetError() always returns EGL_CONTEXT_LOST and never resets to EGL_SUCCESS, which violates the spec. One we get a dead context, how can we get EGL back up and running again? - -- ┌─── dg@cowlark.com ─ http://www.cowlark.com ─ │ │ Sufficiently advanced incompetence is indistinguishable from │ malice. -- Vernon Schryver -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAksKgggACgkQf9E0noFvlzh4owCffic+r4RZUGwWo/2wjh3Tn6JR bVwAoMSdQkx7fuBm5aEqTElp+FkP26vX =0ZgR -END PGP SIGNATURE- -- 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 read resource based on the current theme
Yes... I was not feeling very comfortable with having to index the items in the array either. For some reason I did not make the connection that R.styleable actually is the array of integers I need. Just to make sure I did it correct this time: In attrs.xml I have: declare-styleable name=PrimaryItemColors attr name=PrimaryColor format=color / attr name=PrimaryReadColor format=color / /declare-styleable The code to read them is: TypedArray atts = context.obtainStyledAttributes (R.styleable.PrimaryItemColors); _PrimaryColor = atts.getColorStateList (R.styleable.PrimaryItemColors_PrimaryColor); _PrimaryReadColor = atts.getColorStateList (R.styleable.PrimaryItemColors_PrimaryReadColor); atts.recycle(); Thank you again for your help. Stefan On Nov 22, 8:39 pm, Dianne Hackborn hack...@android.com wrote: Note: you really really should not be creating these arrays yourself, because the attributes need to be in a specific order for them to work. Use declare-styleable in one of your resource files (usually in attrs.xml where you declare your attributes) to define the sets of resources you want to retrieve. On Sun, Nov 22, 2009 at 1:19 PM, Stefan skyntc...@gmail.com wrote: That was exactly what I needed. Thank you very much for your help. In case somebody has a similar need this is the code that worked for me: R.attr.PrimaryColor, R.attr.PrimaryReadColor are the styled attributes (of type Color State List in my case) that have a specific value in each theme TypedArray atts = context.obtainStyledAttributes(new int[] { R.attr.PrimaryColor, R.attr.PrimaryReadColor}); _primaryColor = atts.getColorStateList(0); _primaryReadColor = atts.getColorStateList(1); Stefan On Nov 22, 2:48 pm, Dianne Hackborn hack...@android.com wrote: Resources does not let you access themes -- it doesn't know about a Theme, since there is one Resources object for you application, but an arbitrary number of themes. Typically to load themed resources, you would do what standard views and widgets do -- declare a styleable array of all of the attributes you want to retrieve, and use Context.obtainStyledAttributes or related to retrieve theme. The LabelView API demo shows an example of this: http://developer.android.com/guide/samples/ApiDemos/src/com/example/a... On Sun, Nov 22, 2009 at 4:22 AM, Stefan skyntc...@gmail.com wrote: In my case I need to be able apply a color conditionally (for example based if an item is read or unread) so I need to be able to read the read and unread colors from the current theme and apply them appropriately. I gave the color special attribute name in my \attr xml file and assigned it different values in 2 different themes. if I do getResources().getColorStateList( my attribute resource ID) it fails because it can't find the resource. It seems like something needs to first resolve the attribute Id to the Id of the resource in the current theme, but I am not sure what does that. Stefan -- 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 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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
[android-developers] Re: MediaStore returning loop of images and not entire directory
Hi Jason, Have you tried the updated version of my code (http:// mihaifonoage.blogspot.com/2009/11/displaying-images-from-sd-card- in.html) ? I am curious if you'll encounter the same problem with it. I am still using MediaStore, so you might. It would also be interesting to know what is wrong with the above code. I remember getting the same behavior on the emulator once, but I deleted the AVD, created a new one, and could not reproduce it afterwards. By the way, what phone are you using, and what version of the SDK do you have on it? Mihai Fonoage On Nov 22, 1:38 pm, JasonMP hyperje...@gmail.com wrote: Hello, I'm testing some code from a demo found in a forum and I'm getting some strange results. My goal is to be able to allow users to access the pictures on their device to choose an avatar/logo. This code run flawlessly except that I only get a handful of images on the phone. And its not even always the same images. Whats more is that it loads those images into a gridview and repeats them for what looks like a number of times equal to the actual number of images that are on the device. And on top of that if I scroll down the through the pictures, and scroll back up, it reorders the pictures from what they were previously. Each time I load the app the pictures seem to be different as well. I have around 400 pictures stored on my phone, and thats what I'm using to test. If someone could shed some light on this for me that would be great. This is my first time using a URI to access content to I'm not sure where to start troubleshooting this one. public class gallery extends Activity { /** * Cursor used to access the results from querying for images on the SD card. */ private Cursor cursor; /* * Column index for the Thumbnails Image IDs. */ private int columnIndex; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.gallery); // Set up an array of the Thumbnail Image ID column we want String[] projection = {MediaStore.Images.Thumbnails._ID}; // Create the cursor pointing to the SDCard cursor = managedQuery ( MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI, projection, // Which columns to return null, // Return all rows null, MediaStore.Images.Thumbnails.IMAGE_ID); // Get the column index of the Thumbnails Image ID columnIndex = cursor.getColumnIndexOrThrow (MediaStore.Images.Thumbnails._ID); GridView sdcardImages = (GridView) findViewById(R.id.sdcard); sdcardImages.setAdapter(new ImageAdapter(this)); // Set up a click listener sdcardImages.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView parent, View v, int position, long id) { // Get the data location of the image String[] projection = {MediaStore.Images.Media.DATA}; cursor = managedQuery ( MediaStore.Images.Media.EXTERNAL_CONTENT_URI, projection, // Which columns to return null, // Return all rows null, null); columnIndex = cursor.getColumnIndexOrThrow (MediaStore.Images.Media.DATA); cursor.moveToPosition(position); // Get image filename String imagePath = cursor.getString(columnIndex); // Use this path to do further processing, i.e. full screen display } }); } /** * Adapter for our image files. */ private class ImageAdapter extends BaseAdapter { private Context context; public ImageAdapter(Context localContext) { context = localContext; } public int getCount() { return cursor.getCount(); } public Object getItem(int position) { return position; } public long getItemId(int position) { return position; } public View getView(int position, View convertView, ViewGroup parent) { ImageView picturesView; if (convertView == null) { picturesView = new ImageView(context); // Move cursor to current position cursor.moveToPosition(position); // Get the current value for the requested column int imageID = cursor.getInt(columnIndex); // Set the content of the image based on the provided URI picturesView.setImageURI(Uri.withAppendedPath( MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI, + imageID)); picturesView.setScaleType (ImageView.ScaleType.FIT_CENTER);
[android-developers] Debug config not stopping at break points
All hi, Breakpoints in code arent efficient, debugger doesnt stop at it. __ Eclipse 3.5.2, Android sdk 2.0 Windows XP __ Is this a know problem ? -- 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: 2.0 AccountManager - Implementing a new account type with Google, Facebook and Exchange
I'm going to be trying it on a Droid this morning. On Nov 21, 10:07 pm, Dan Dumont ddum...@gmail.com wrote: I get that exception in the emulator ( doesn't reboot though ) I thought it was due to missing pieces of the emulator... does logcat output anything? On Sat, Nov 21, 2009 at 7:07 PM, NitroDesk gsuku...@gmail.com wrote: Any of you folks tried this on a Droid? Simply installing the project that contains an Authenticator in the manfest and the other related items seems to cause the Add Account option in the account list on te droid to simply reoot the phone with an exception. Anyone else seen this or find a way to avoid this ? -g On Nov 21, 9:04 am, Jerry Brady jerry.br...@gmail.com wrote: Dan, Now I see what you are doing in your code and found the reference to AddAccountExplicitly(). I want to skip returning an intent to fire the an AccountAuthenticatorActivity and instead to return KEY_ACCOUNT_NAME and KEY_ACCOUNT_TYPE directly from my AbstractAccountAuthenticator's addAccount method whereas your code returns an intent that fires your authentication activity. The main issue for me so far is that I don't see that my AbstractAccountAuthenticator is ever being instantiated. Cheers, Jerry On Nov 20, 7:53 am, Dan Dumont ddum...@gmail.com wrote: Yes. But I make the AddAccountExplicitly call in my Authenticator. You use the AccountManager to create accounts. If you call AddAccountExplicitly from a non-authenticator class, I guess it will work... But I think the security behind it will mean that only the class that created the account will be able to ever modify it or extract the password. This is why they have a framework for you to get an authtoken returned via the authenticator... the logic for authenticating should be buried within there, because it will be the only class allowed to peak at the password and send it wherever you are authenticating. On Fri, Nov 20, 2009 at 2:16 AM, sukumar bhashyam bhashyam.suku...@gmail.com wrote: AddAccountExplicitly() would need Authenticator of same type. I created an Authenticator and called AddAccountExplicitly() for the same type which created an account ( Could verify it from AccountManager.getAccounts()) One strange thing I observer is none of the implementation class functions of AbstractAccountAuthenticator is being called. I followed the exact steps in documentation. Not even onCreate or onBind function is called. Anyone seen this problem?. Is your AbstractAccountAuthenticator implemetation class being invoked?. Thanks. On Thu, Nov 19, 2009 at 8:26 PM, Jerry Brady jerry.br...@gmail.com wrote: Dan, Thanks for all of this. I just returned to the office and will be taking a look to see how much further I can get and I will certainly be interested in helping with your accounts project. I got as far as getting my account to show up in the list of accounts along with Google, Facebook and Exchange, but my service never gets called. My addAccount() method doesn't return an intent, but rather KEY_ACCOUNT_NAME and KEY_ACCOUNT_TYPE in it's bundle to let the account request succeed. My goal is to create an account that will only be used by my application and does not need to have any features to enable external authentication or account configuration. I've also tried AddAccountExplicitly() but I can't seem to get around its UID restrictions. The calling activity and the authenticator service all belong to the same application so I'm not sure why the system still throws an error about the UID not being correct. Cheers, Jerry On Nov 13, 11:54 pm, Dan Dumont ddum...@gmail.com wrote: For anyone still interested. I've made a bit of progress. The google project below now creates and lists accounts of the type for the project! On Fri, Nov 13, 2009 at 9:39 PM, Dan Dumont ddum...@gmail.com wrote: To facilitate the discussion around this topic, I've started up a project over here: http://code.google.com/p/androidaccounts/ http://code.google.com/p/androidaccounts/If anyone is interested in pitching in and writing some examples, let me know so I can add you. The current state of the project is as far as I've gotten to understanding what is available so far... and I'm stumped as to why new accounts don't seem to persist after their creation ( as far as the AccountsTester app is concerned ). On Fri, Nov 13, 2009 at 7:40 PM, Dan Dumont ddum...@gmail.com wrote: I've gotten a bit further than you. The account manager seems to want to store AccountName+Type pairs, and have anAccountAuthenticatorhandle the
[android-developers] Share XMPPConnection
I need to be able to post XMPP messages in my main activity AND a service that I am running in the background. My question is this: How can I pass all the XMPP information (including XMPPConnection) to the service so it can use it without twice logging in? Currently I have it setup so I am making 2 XMPP connections. This works, my service continues to send XMPP messages UNTIL I try to send a message in my main activity, then the app force closes. Im assuming because I have tried to login to the service twice. -- 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: Securing a paid app
I am still trying to get my head around this. How would I go about generating the hash code? I am intending on using the ime. Do I need public private keys? confused... On Nov 15, 3:39 am, Pooper code...@gmail.com wrote: What you can do is make your user enter serial #, the serial number could be a hashing function that you come up with that takes the device id (could be the imei number) the application could then check if the serial/hash code matches for that device. This would require your customer to send you his/her imei # or another unique # associated with the device so that you can generate the serial code for that device. You can also implement a two step method so that the customer can't accidently enter in their imei incorrectly by misstake. To do it this way you would generate a Request For Serial Number Code store this code in your database. The costomer enters this code in their phone, your phone connects to your web server sends the Request for Serial number code and the IMEI number of the phone with it. Your server generates the hash/ serial and sends it back to the phone. You can then mark the Request for serial number code as used so that they can not use it for another device. This is the method I use for my applications. On Nov 14, 8:39 am,jaxjackma...@gmail.com wrote: Yes, that is why I have posted the question because I don't know how to do it. Has anyone done this before or know of a method for achieving this? On Nov 14, 10:23 pm, Andrei gml...@gmail.com wrote: What u want to do is to tie your app to one device How u do it up to u On Nov 14, 7:12 am,jaxjackma...@gmail.com wrote: I am wondering how I might go aboutsecuringa paid app on Android. I am thinking of selling the application from my own website via PayPal, however, how will I stop people from sharing it with their friends etc. Does Android have any type of native support for this?- Hide quoted text - - Show quoted text - -- 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] SDK 2.0 Auto Dim Control?
Has a way been added to the Android 2.0 SDK to disable auto dimming on the Motorola Droid? Brenton -- 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: Securing a paid app
How do you get hold of the users google account from your app? On Nov 17, 10:03 pm, Streets Of Boston flyingdutc...@gmail.com wrote: What would happen if someone gets a new android phone? The app's authentication will fail. You should hash/key on the user's google-account, the same key that is used by Android Market (you can download paid apps as often as you want - once you paid for them - based on your google-account) On Nov 15, 2:32 am, android kracker markamorris2...@gmail.com wrote: Using the unique ID (hash) of the phone, register it with your web service on install. Then employ PKI to authenticate your app on each launch. On your web service sign a string containing the hash, timestamp, and a short expiration timestamp. Then have your app use your public key (in the app) to authenticate the string, verify the timestamps, and complete the launch if valid, otherwise abort the launch or offer the user to come clean and install. To prevent code modification--bypassing the check--don't include all of the code in the app. Keep some of it on the server and only send it to the app if the check takes place and passes the check. This way the app will not function correctly unless the check is performed and passes. Create a set of one-off methods (dummys that just pass through) that you can dynamically use with each app instance; since you are in control of the download (unlike Market publishers), you can dynamically build and package a unique app for each instance downloaded. This way no two apps use the same method and a hacker is up a creek as far a patching the code and replicating it to the community. When one instance is cracked, and it will be, then your server can cancel that hacked instance without effecting all of the other valid users. This will create a string disincentive, because no two app are the same, codewise ;-) Maybe we should start a service and offer Android publishers a secure distribution service, unlike the Market. There is no way to register (stamp an app with a phone id) downloads from the Market prior to installation. As it stands now publishers have no way to verify if their app was downloaded from the Market or copied and installed by other means. If there is I would like to know. I've asked but I never get replies regarding this advanced topic. Most publishers are still learning to just create apps, let alone seek out secure distribution and customer behavior--only Google enjoys this privilege, currently. Here's a method snippet for getting the unique ID and hashing it: String getPhoneID(){ MessageDigest digest; try { digest = MessageDigest.getInstance(SHA-1); } catch (NoSuchAlgorithmException e) { throw new RuntimeException(this should never happen); } String srvcName = Context.TELEPHONY_SERVICE; TelephonyManager telephonyManager = (TelephonyManager)getSystemService(srvcName); /* requires READ_PHONE_STATE permission */ String deviceId = telephonyManager.getDeviceId(); if (TextUtils.isEmpty(deviceId)) { return ; } byte[] hashedDeviceId = digest.digest(deviceId.getBytes()); String id = new String(Base64.encodeBase64(hashedDeviceId), 0, 12); id = id.replaceAll(/, _); return id; } On Nov 14, 7:12 am,jaxjackma...@gmail.com wrote: I am wondering how I might go aboutsecuringa paid app on Android. I am thinking of selling the application from my own website via PayPal, however, how will I stop people from sharing it with their friends etc. Does Android have any type of native support for this?- Hide quoted text - - Show quoted text - -- 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] Share XMPPConnection
Bobbie wrote: I need to be able to post XMPP messages in my main activity AND a service that I am running in the background. My question is this: How can I pass all the XMPP information (including XMPPConnection) to the service so it can use it without twice logging in? Have the service own the XMPP connection, with the activity obtaining the connection when needed by calling a method on the service object. The activity can get at the service object via the local binding pattern or by making the service instance a singleton. The local binding pattern is cleaner. You can see an example of that here: http://github.com/commonsguy/cw-android/tree/master/Service/WeatherPlus/ Currently I have it setup so I am making 2 XMPP connections. This works, my service continues to send XMPP messages UNTIL I try to send a message in my main activity, then the app force closes. Im assuming because I have tried to login to the service twice. You may wish to use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine the Java stack trace, to validate your assumption. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Training in Germany, 18-22 January 2010: http://bignerdranch.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
Re: [android-developers] Share XMPPConnection
Also, I should note that wherever XMPPConnection comes from, it might not be thread-safe. Read the documentation for that class to see if it is; if it is not, be sure to take steps to synchronize access to the connection. Mark Murphy wrote: Bobbie wrote: I need to be able to post XMPP messages in my main activity AND a service that I am running in the background. My question is this: How can I pass all the XMPP information (including XMPPConnection) to the service so it can use it without twice logging in? Have the service own the XMPP connection, with the activity obtaining the connection when needed by calling a method on the service object. The activity can get at the service object via the local binding pattern or by making the service instance a singleton. The local binding pattern is cleaner. You can see an example of that here: http://github.com/commonsguy/cw-android/tree/master/Service/WeatherPlus/ Currently I have it setup so I am making 2 XMPP connections. This works, my service continues to send XMPP messages UNTIL I try to send a message in my main activity, then the app force closes. Im assuming because I have tried to login to the service twice. You may wish to use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine the Java stack trace, to validate your assumption. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android 1.6 Programming Books: http://commonsware.com/books -- 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] custom dialog crashing
I have written below code for showing a custom dialog void CheckHighScore() { AlertDialog.Builder builder; AlertDialog alertDialog; Context mContext = getApplicationContext(); LayoutInflater inflater = (LayoutInflater) mContext.getSystemService (LAYOUT_INFLATER_SERVICE); ViewGroup vg = (ViewGroup) findViewById(R.id.layout_root); View layout = inflater.inflate(R.layout.mydialog, vg); builder = new AlertDialog.Builder(mContext); builder.setView(layout); alertDialog = builder.create(); alertDialog.show(); } __ xml file __ LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:id=@+id/layout_root android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent android:padding=10dp TextView android:id=@+id/desc android:text=@string/ask_info android:layout_width=wrap_content android:layout_height=wrap_content android:textColor=#FFF / EditText android:text=Enter your info here android:id=@+id/ yourinfo android:layout_width=wrap_content android:layout_height=wrap_content/EditText /LinearLayout it is unable to find ViewGroup in above code and is crashing. I have another main.xml file which is set to content layout in this activity. So how can I correct this thing ? Also I need to add some validation here to this dialog like info cannot be empty ! thanks in advance Jags -- 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: Saving service killing without startForeground
Hi!! First of all I am extremely sorry for not providing the logs. (Kindly the find the logs below) Let me provide some more information about the service. Initially my test environment was full build, when I could successfully test the functionality I switched to SDK. The same software without a single line change works successfully without process killing/service crashing etc. I tried starting the service in a new thread as suggested but that didn’t help. Also my service is not getting restarted. I could not observe/find any Low Memory, ANR or Service crashing traces, though one of the trace says “Scheduling restart of crashed service com.mycompany.voip/.service.VoIPManager in 5000ms” Surprisingly, my service did not get killed and was alive life-long after I removed one of the permission “ACCESS_CHECKIN_PROPERTIES” from AndroidManifest.xml but that is not the real fix because with this fix I could not run it successfully next time. I am now clueless about the crash. Kindly provide some directions. Thanks in advance Ash Package Name: com.mycompany.voip Logcat –b event: --- I/boot_progress_start( 553): 4455 I/boot_progress_preload_start( 553): 5701 I/dvm_gc_info( 553): [8825198673194435749,-9065622874527238670,-4134462757533256206,0] I/dvm_gc_info( 553): [8825198673194411075,-9144998817959537112,-4131929482742753752,0] I/dvm_gc_info( 553): [8825198673194419250,-9164702066329053645,-4128833257998707149,0] I/dvm_gc_info( 553): [8825198673194427506,-9093207422244374979,-4126018508231428547,0] I/dvm_gc_info( 553): [8825198673194489386,-9016083278087436653,-4101811659696093549,0] I/dvm_gc_info( 553): [8825198673194550882,-8922632417303152977,-4093929191831849297,0] I/dvm_gc_info( 553): [8825198673194567275,-8923474642673121594,-4087453067807340858,0] I/dvm_gc_info( 553): [8825198673194583664,-8922909493427964195,-4080976944051259683,0] I/dvm_gc_info( 553): [8825198673194612348,-8919249218950650139,-4078724044457498907,0] I/dvm_gc_info( 553): [8825198673194612342,-8922625818891073797,-4072530495189760261,0] I/dvm_gc_info( 553): [8825198673194575421,-8974698689314085113,-4069152795200772345,0] I/dvm_gc_info( 553): [8825198673194542225,-9125005227097495779,-4062959245933058275,0] I/dvm_gc_info( 553): [8825198673194583229,-9065332530692524189,-4043255996220999837,0] I/dvm_gc_info( 553): [8825198673194591378,-9132886525103077527,-4041567146360731799,0] I/dvm_gc_info( 553): [8825198673194583156,-9088976428736206993,-4039878296500459665,0] I/dvm_gc_info( 553): [8825198673194595430,-9099109527109257353,-4037626495898241161,0] I/dvm_gc_info( 553): [8825198673194587298,-9080812554111428739,-4035936546526341251,0] I/dvm_gc_info( 553): [8825198673194603672,-9069553555026221182,-4026084922324686974,0] I/dvm_gc_info( 553): [8825198673194595416,-9126973350763554931,-4025802347836336243,0] I/dvm_gc_info( 553): [8825198673194615881,-9128099250653595752,-4025802347819534440,0] I/dvm_gc_info( 553): [8825198673194611838,-9068143981102590050,-4025519773331187810,0] I/dvm_gc_info( 553): [8825198673194735225,-8919235953104992345,-4025512008013527129,0] I/dvm_gc_info( 553): [8825198673194976883,-8922613584089225282,-4024948989323810882,0] I/dvm_gc_info( 553): [8825198673194714700,-8953575762791110703,-4024667445610813487,0] I/dvm_gc_info( 553): [8825198673194648745,-9065884278481877031,-4024385970617317415,0] I/dvm_gc_info( 553): [8825198673194660987,-9068699028248975393,-4024385970617309217,0] I/dvm_gc_info( 553): [8825198673194652775,-9106979625064843289,-4024385970600527897,0] I/dvm_gc_info( 553): [8825198673194665038,-9135127122350028817,-4017630570773592081,0] I/dvm_gc_info( 553): [8825198673194652716,-9208029141318088724,-4017630570773592084,0] I/dvm_gc_info( 553): [8825198673194939451,-9128371722875402249,-4015660245903046665,6825561] I/dvm_gc_info( 553): [8825198673194660910,-9144415796547901442,-4014815820972906498,6825600] I/boot_progress_preload_end( 553): 17087 I/dvm_gc_info( 553): [8825198673194689569,-9190296217751738369,-4014534345996195841,7370389] I/dvm_gc_info( 553): [8825198673194660859,-9165526419801204739,-4014534345996199939,7370389] I/dvm_gc_info( 553): [8825198673194676824,-9213095690865305603,-4014534345996199939,7370389] I/boot_progress_system_run( 587): 17917 I/boot_progress_pms_start( 587): 18289 I/boot_progress_pms_system_scan_start( 587): 18784 I/dvm_gc_info( 587): [8320808730292176444,-8974404086165411804,-4017630296264763395,7370389] I/dvm_gc_info( 587): [8320808730292123191,-9014936139130365911,-4016222921381210117,7370389] I/boot_progress_pms_data_scan_start( 587): 20686 I/boot_progress_pms_scan_end( 587): 20731 I/boot_progress_pms_ready( 587): 20858 I/dvm_gc_info( 587): [8320808730292078120,-9028165394316310487,-4016222921381210117,7370389] I/battery_status( 587): [2,2,1,1,Li-ion] I/battery_level( 587): [50,0,0] I/power_screen_state( 587):
[android-developers] Re: Share XMPPConnection
XMPPConnection is from the Smack XMPP Library. Any chance you could provide me with a simple sample code of passing the XMPPConnection back to the Activity from the Service? The example you posted is different than mine, I'm using an Intent to run my service, my service is going to keep running in the background for a few minutes after the application is ended. Bobbie On Nov 23, 8:42 am, Mark Murphy mmur...@commonsware.com wrote: Bobbie wrote: I need to be able to post XMPP messages in my main activity AND a service that I am running in the background. My question is this: How can I pass all the XMPP information (including XMPPConnection) to the service so it can use it without twice logging in? Have the service own the XMPP connection, with the activity obtaining the connection when needed by calling a method on the service object. The activity can get at the service object via the local binding pattern or by making the service instance a singleton. The local binding pattern is cleaner. You can see an example of that here: http://github.com/commonsguy/cw-android/tree/master/Service/WeatherPlus/ Currently I have it setup so I am making 2 XMPP connections. This works, my service continues to send XMPP messages UNTIL I try to send a message in my main activity, then the app force closes. Im assuming because I have tried to login to the service twice. You may wish to use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine the Java stack trace, to validate your assumption. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android Training in Germany, 18-22 January 2010:http://bignerdranch.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: custom dialog crashing
yeah i referred this tutorial of oogle http://developer.android.com/guide/topics/ui/dialogs.html#ShowingADialog On Nov 23, 8:11 pm, Jags jag...@gmail.com wrote: I have written below code for showing a custom dialog void CheckHighScore() { AlertDialog.Builder builder; AlertDialog alertDialog; Context mContext = getApplicationContext(); LayoutInflater inflater = (LayoutInflater) mContext.getSystemService (LAYOUT_INFLATER_SERVICE); ViewGroup vg = (ViewGroup) findViewById(R.id.layout_root); View layout = inflater.inflate(R.layout.mydialog, vg); builder = new AlertDialog.Builder(mContext); builder.setView(layout); alertDialog = builder.create(); alertDialog.show(); } __ xml file __ LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:id=@+id/layout_root android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent android:padding=10dp TextView android:id=@+id/desc android:text=@string/ask_info android:layout_width=wrap_content android:layout_height=wrap_content android:textColor=#FFF / EditText android:text=Enter your info here android:id=@+id/ yourinfo android:layout_width=wrap_content android:layout_height=wrap_content/EditText /LinearLayout it is unable to find ViewGroup in above code and is crashing. I have another main.xml file which is set to content layout in this activity. So how can I correct this thing ? Also I need to add some validation here to this dialog like info cannot be empty ! thanks in advance Jags -- 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: custom dialog crashing
I understand that this is coming null because my current activity layout is main.xml. but is it that i need to do a setlayout to mydialog before starting any of my code ? On Nov 23, 8:11 pm, Jags jag...@gmail.com wrote: I have written below code for showing a custom dialog void CheckHighScore() { AlertDialog.Builder builder; AlertDialog alertDialog; Context mContext = getApplicationContext(); LayoutInflater inflater = (LayoutInflater) mContext.getSystemService (LAYOUT_INFLATER_SERVICE); ViewGroup vg = (ViewGroup) findViewById(R.id.layout_root); View layout = inflater.inflate(R.layout.mydialog, vg); builder = new AlertDialog.Builder(mContext); builder.setView(layout); alertDialog = builder.create(); alertDialog.show(); } __ xml file __ LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:id=@+id/layout_root android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent android:padding=10dp TextView android:id=@+id/desc android:text=@string/ask_info android:layout_width=wrap_content android:layout_height=wrap_content android:textColor=#FFF / EditText android:text=Enter your info here android:id=@+id/ yourinfo android:layout_width=wrap_content android:layout_height=wrap_content/EditText /LinearLayout it is unable to find ViewGroup in above code and is crashing. I have another main.xml file which is set to content layout in this activity. So how can I correct this thing ? Also I need to add some validation here to this dialog like info cannot be empty ! thanks in advance Jags -- 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: SDK 2.0 Traceview in The Droid.
Yes. You need to add a uses-permission to your AndroidManifest.xml file for android.permission.WRITE_EXTERNAL_STORAGE. - dave On Nov 20, 9:39 pm, JHandal jhand...@gmail.com wrote: HI I'm running the basic HelloActivity from the SDK 2. samples. When I try Trace view in the DDMS prespective its generate the trace file but can not opened. '/sdcard/com.google.android.apps.uploader.trace': Permission denied Do I need a permission to write in the SD card? 4:38.380: INFO/dalvikvm(10434): Debugger has detached; object registry had 1 entries 11-20 21:34:38.380: DEBUG/dalvikvm(10434): VM cleaning up 11-20 21:34:38.411: ERROR/AndroidRuntime(10434): ERROR: thread attach failed 11-20 21:34:38.466: DEBUG/VoiceDialerReceiver(1225): onReceive Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.example.android.helloactivity flg=0x2000 cmp=com.android.voicedialer/.VoiceDialerReceiver (has extras) } 11-20 21:34:38.466: DEBUG/dalvikvm(10434): LinearAlloc 0x0 used 636716 of 5242880 (12%) 11-20 21:34:38.490: WARN/ResourceType(1015): Resources don't contain package for resource number 0x7f08 11-20 21:34:38.490: WARN/ResourceType(1015): Resources don't contain package for resource number 0x7f020040 11-20 21:34:38.490: WARN/ResourceType(1015): Resources don't contain package for resource number 0x7f020041 11-20 21:34:38.497: WARN/ResourceType(1015): Resources don't contain package for resource number 0x7f05 11-20 21:34:38.521: WARN/ResourceType(1015): Resources don't contain package for resource number 0x7f020005 11-20 21:34:38.529: WARN/ResourceType(1015): Resources don't contain package for resource number 0x7f020004 11-20 21:34:38.529: WARN/ResourceType(1015): Resources don't contain package for resource number 0x7f0700e4 11-20 21:34:38.529: WARN/ResourceType(1015): Resources don't contain package for resource number 0x7f020031 11-20 21:34:38.529: WARN/ResourceType(1015): Resources don't contain package for resource number 0x7f020030 11-20 21:34:38.529: WARN/ResourceType(1015): Resources don't contain package for resource number 0x7f05 11-20 21:34:38.552: INFO/ActivityManager(1015): Start proc com.example.android.helloactivity for activity com.example.android.helloactivity/.HelloActivity: pid=10441 uid=10045 gids={1015} 11-20 21:34:38.599: INFO/dalvikvm(10441): Debugger thread not active, ignoring DDM send (t=0x41504e4d l=38) 11-20 21:34:38.622: INFO/dalvikvm(10441): Debugger thread not active, ignoring DDM send (t=0x41504e4d l=70) 11-20 21:34:38.708: WARN/ResourceType(1015): Resources don't contain package for resource number 0x7f060001 11-20 21:34:44.208: DEBUG/dalvikvm(2166): GC freed 1260 objects / 80072 bytes in 83ms 11-20 21:34:49.318: DEBUG/dalvikvm(1517): GC freed 256 objects / 14624 bytes in 75ms 11-20 21:34:50.986: DEBUG/dalvikvm(1181): +++ active profiler count now 1 11-20 21:34:50.990: INFO/dalvikvm(1181): TRACE STARTED: '/sdcard/ com.google.android.apps.uploader.trace' 8192KB 11-20 21:34:50.990: ERROR/dalvikvm(1181): Unable to open trace file '/ sdcard/com.google.android.apps.uploader.trace': Permission denied 11-20 21:34:50.990: DEBUG/dalvikvm(1181): +++ active profiler count now 0 11-20 21:34:54.435: DEBUG/dalvikvm(1225): GC freed 159 objects / 10488 bytes in 68ms 11-20 21:34:59.560: D -- 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] ActivityGroup and subactivities Lifetime.
Hi!, I'm extending ActivityGroup class and implemented a custom tabHost and widgets for my app. Can someone shed a light on how are the Activities fife-time inside an ActivityGroup?. Im getting a weird behavior when using the following code to send a new intent to the current sub-activity, then change tab, and getting back to original tab. (TAB1 - TAB2 - TAB1) LocalActivityManager lm = getLocalActivityManager(); Intent i = new Intent(this, lm.getCurrentActivity().getClass()); i.setAction(WeegohApp.INTENT_ACTION_FILTER_SHC); i.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP); lm.startActivity(tabHost.getCurrentTabTag(), i); What i see from debug.. onSaveInstanceState() is called on TAB1, then TAB2 is current subActivity, but when going back to TAB1 onCreate() is called. onCreate() is not called with the same test without using the onNewIntent() described above. Thanks in advance ! CH -- 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: MediaStore returning loop of images and not entire directory
Hi Mihai, I have an HTC G1 running Android 1.6. I'm working on getting your new code implemented this morning. I'll let you know how it goes. And thank you. On Mon, Nov 23, 2009 at 7:56 AM, Mihai Fonoage fonoag...@gmail.com wrote: Hi Jason, Have you tried the updated version of my code (http:// mihaifonoage.blogspot.com/2009/11/displaying-images-from-sd-card- in.html) ? I am curious if you'll encounter the same problem with it. I am still using MediaStore, so you might. It would also be interesting to know what is wrong with the above code. I remember getting the same behavior on the emulator once, but I deleted the AVD, created a new one, and could not reproduce it afterwards. By the way, what phone are you using, and what version of the SDK do you have on it? Mihai Fonoage On Nov 22, 1:38 pm, JasonMP hyperje...@gmail.com wrote: Hello, I'm testing some code from a demo found in a forum and I'm getting some strange results. My goal is to be able to allow users to access the pictures on their device to choose an avatar/logo. This code run flawlessly except that I only get a handful of images on the phone. And its not even always the same images. Whats more is that it loads those images into a gridview and repeats them for what looks like a number of times equal to the actual number of images that are on the device. And on top of that if I scroll down the through the pictures, and scroll back up, it reorders the pictures from what they were previously. Each time I load the app the pictures seem to be different as well. I have around 400 pictures stored on my phone, and thats what I'm using to test. If someone could shed some light on this for me that would be great. This is my first time using a URI to access content to I'm not sure where to start troubleshooting this one. public class gallery extends Activity { /** * Cursor used to access the results from querying for images on the SD card. */ private Cursor cursor; /* * Column index for the Thumbnails Image IDs. */ private int columnIndex; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.gallery); // Set up an array of the Thumbnail Image ID column we want String[] projection = {MediaStore.Images.Thumbnails._ID}; // Create the cursor pointing to the SDCard cursor = managedQuery ( MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI, projection, // Which columns to return null, // Return all rows null, MediaStore.Images.Thumbnails.IMAGE_ID); // Get the column index of the Thumbnails Image ID columnIndex = cursor.getColumnIndexOrThrow (MediaStore.Images.Thumbnails._ID); GridView sdcardImages = (GridView) findViewById(R.id.sdcard); sdcardImages.setAdapter(new ImageAdapter(this)); // Set up a click listener sdcardImages.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView parent, View v, int position, long id) { // Get the data location of the image String[] projection = {MediaStore.Images.Media.DATA}; cursor = managedQuery ( MediaStore.Images.Media.EXTERNAL_CONTENT_URI, projection, // Which columns to return null, // Return all rows null, null); columnIndex = cursor.getColumnIndexOrThrow (MediaStore.Images.Media.DATA); cursor.moveToPosition(position); // Get image filename String imagePath = cursor.getString(columnIndex); // Use this path to do further processing, i.e. full screen display } }); } /** * Adapter for our image files. */ private class ImageAdapter extends BaseAdapter { private Context context; public ImageAdapter(Context localContext) { context = localContext; } public int getCount() { return cursor.getCount(); } public Object getItem(int position) { return position; } public long getItemId(int position) { return position; } public View getView(int position, View convertView, ViewGroup parent) { ImageView picturesView; if (convertView == null) { picturesView = new ImageView(context); // Move cursor to current position cursor.moveToPosition(position); // Get the current value for the requested column int
[android-developers] contentView Required
Hello, regarding the trace dump following, what does mean 'contentView required' ? __ java.lang.RuntimeException: Unable to create service com.comp.app.MyService: java.lang.IllegalArgumentException: contentView required: pkg=com.comp.app id=1 notification=Notification (vibrate=null,sound=null,defaults=0x0) _ 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
Re: [android-developers] Re: MediaStore returning loop of images and not entire directory
Do I need to be including any other classes for this to run? What is a PuzzleView? Is that something in Android 2.0? On Mon, Nov 23, 2009 at 9:59 AM, Jason Mallet-Prevost hyperje...@gmail.comwrote: Hi Mihai, I have an HTC G1 running Android 1.6. I'm working on getting your new code implemented this morning. I'll let you know how it goes. And thank you. On Mon, Nov 23, 2009 at 7:56 AM, Mihai Fonoage fonoag...@gmail.comwrote: Hi Jason, Have you tried the updated version of my code (http:// mihaifonoage.blogspot.com/2009/11/displaying-images-from-sd-card- in.htmlhttp://mihaifonoage.blogspot.com/2009/11/displaying-images-from-sd-card-in.html) ? I am curious if you'll encounter the same problem with it. I am still using MediaStore, so you might. It would also be interesting to know what is wrong with the above code. I remember getting the same behavior on the emulator once, but I deleted the AVD, created a new one, and could not reproduce it afterwards. By the way, what phone are you using, and what version of the SDK do you have on it? Mihai Fonoage On Nov 22, 1:38 pm, JasonMP hyperje...@gmail.com wrote: Hello, I'm testing some code from a demo found in a forum and I'm getting some strange results. My goal is to be able to allow users to access the pictures on their device to choose an avatar/logo. This code run flawlessly except that I only get a handful of images on the phone. And its not even always the same images. Whats more is that it loads those images into a gridview and repeats them for what looks like a number of times equal to the actual number of images that are on the device. And on top of that if I scroll down the through the pictures, and scroll back up, it reorders the pictures from what they were previously. Each time I load the app the pictures seem to be different as well. I have around 400 pictures stored on my phone, and thats what I'm using to test. If someone could shed some light on this for me that would be great. This is my first time using a URI to access content to I'm not sure where to start troubleshooting this one. public class gallery extends Activity { /** * Cursor used to access the results from querying for images on the SD card. */ private Cursor cursor; /* * Column index for the Thumbnails Image IDs. */ private int columnIndex; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.gallery); // Set up an array of the Thumbnail Image ID column we want String[] projection = {MediaStore.Images.Thumbnails._ID}; // Create the cursor pointing to the SDCard cursor = managedQuery ( MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI, projection, // Which columns to return null, // Return all rows null, MediaStore.Images.Thumbnails.IMAGE_ID); // Get the column index of the Thumbnails Image ID columnIndex = cursor.getColumnIndexOrThrow (MediaStore.Images.Thumbnails._ID); GridView sdcardImages = (GridView) findViewById(R.id.sdcard); sdcardImages.setAdapter(new ImageAdapter(this)); // Set up a click listener sdcardImages.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView parent, View v, int position, long id) { // Get the data location of the image String[] projection = {MediaStore.Images.Media.DATA}; cursor = managedQuery ( MediaStore.Images.Media.EXTERNAL_CONTENT_URI, projection, // Which columns to return null, // Return all rows null, null); columnIndex = cursor.getColumnIndexOrThrow (MediaStore.Images.Media.DATA); cursor.moveToPosition(position); // Get image filename String imagePath = cursor.getString(columnIndex); // Use this path to do further processing, i.e. full screen display } }); } /** * Adapter for our image files. */ private class ImageAdapter extends BaseAdapter { private Context context; public ImageAdapter(Context localContext) { context = localContext; } public int getCount() { return cursor.getCount(); } public Object getItem(int position) { return position; } public long getItemId(int position) { return position; } public View getView(int position, View convertView, ViewGroup parent) { ImageView picturesView;
[android-developers] Re: custom dialog crashing
ok! i moved the code to onCreateDialog and even tough vg is null, it created the alert. but should vg be null ? but it crashed again ! here is code protected Dialog onCreateDialog(int id) { AlertDialog.Builder builder; AlertDialog alertDialog = null; Context mContext = getApplicationContext(); LayoutInflater inflater = (LayoutInflater) mContext.getSystemService (LAYOUT_INFLATER_SERVICE); switch(id) { case MY_DIALOG_ID: ViewGroup vg = (ViewGroup) findViewById(R.id.layout_root); View layout = inflater.inflate(R.layout.mydialog, vg); builder = new AlertDialog.Builder(mContext); builder.setView(layout); alertDialog = builder.create(); break; default: alertDialog = null; } return alertDialog; } void CheckHighScore() { showDialog(MY_DIALOG_ID); } On Nov 23, 8:26 pm, Jags jag...@gmail.com wrote: I understand that this is coming null because my current activity layout is main.xml. but is it that i need to do a setlayout to mydialog before starting any of my code ? On Nov 23, 8:11 pm, Jags jag...@gmail.com wrote: I have written below code for showing a custom dialog void CheckHighScore() { AlertDialog.Builder builder; AlertDialog alertDialog; Context mContext = getApplicationContext(); LayoutInflater inflater = (LayoutInflater) mContext.getSystemService (LAYOUT_INFLATER_SERVICE); ViewGroup vg = (ViewGroup) findViewById(R.id.layout_root); View layout = inflater.inflate(R.layout.mydialog, vg); builder = new AlertDialog.Builder(mContext); builder.setView(layout); alertDialog = builder.create(); alertDialog.show(); } __ xml file __ LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:id=@+id/layout_root android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent android:padding=10dp TextView android:id=@+id/desc android:text=@string/ask_info android:layout_width=wrap_content android:layout_height=wrap_content android:textColor=#FFF / EditText android:text=Enter your info here android:id=@+id/ yourinfo android:layout_width=wrap_content android:layout_height=wrap_content/EditText /LinearLayout it is unable to find ViewGroup in above code and is crashing. I have another main.xml file which is set to content layout in this activity. So how can I correct this thing ? Also I need to add some validation here to this dialog like info cannot be empty ! thanks in advance Jags -- 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 remove sms notifications in status bar
here you go http://stackoverflow.com/questions/419184/how-to-delete-sms-from-inbox-in-android-programmatically this link provide great detail how to retrieve messages form in box and delete them . regards MB On Nov 14, 8:33 am, Sean Liao wirelessw...@gmail.com wrote: You guys are ahead of me, I don't even know how to delete the sms message from inbox. Can you share some pointer? On Tue, Nov 10, 2009 at 2:17 PM, Muhammad Bilal se.bi...@gmail.com wrote: hi, its been a while since i am doing development on android sdk , one of the astonishing i come across that there is np support in the API to remove any notification in the status bar , i am working on an application which looks for every SMS coming and on some specific sms deletes them from the inbox till now its working fine , but the notification bar still showing that u got a new message despite the fact that u have deleted it form sms database , couls somebody suggest some solution how i can accomplish this , thanks regards MB -- 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 -- 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: Securing a paid app
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 jax wrote: [...] How would I go about generating the hash code? I am intending on using the ime. If you're in the UK and you want to keep track of customers' IMEIs, you may need to get legal advice --- there's a good chance you'll be liable under the Data Protection Act (as you're storing personally identifiable information). - -- ┌─── dg@cowlark.com ─ http://www.cowlark.com ─ │ │ Sufficiently advanced incompetence is indistinguishable from │ malice. -- Vernon Schryver -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAksKqO8ACgkQf9E0noFvlzjDQgCgrXFzamiu5EX6agg7NFI7OKiz BUEAn1CMcFfWIro+V8E7RtbDMF3rPqLa =KH5U -END PGP SIGNATURE- -- 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: MediaStore returning loop of images and not entire directory
No, you can take that line out (I updated the code with this change). Thanks for noticing that. Mihai Fonoage On Nov 23, 10:04 am, Jason Mallet-Prevost hyperje...@gmail.com wrote: Do I need to be including any other classes for this to run? What is a PuzzleView? Is that something in Android 2.0? On Mon, Nov 23, 2009 at 9:59 AM, Jason Mallet-Prevost hyperje...@gmail.comwrote: Hi Mihai, I have an HTC G1 running Android 1.6. I'm working on getting your new code implemented this morning. I'll let you know how it goes. And thank you. On Mon, Nov 23, 2009 at 7:56 AM, Mihai Fonoage fonoag...@gmail.comwrote: Hi Jason, Have you tried the updated version of my code (http:// mihaifonoage.blogspot.com/2009/11/displaying-images-from-sd-card- in.htmlhttp://mihaifonoage.blogspot.com/2009/11/displaying-images-from-sd-ca...) ? I am curious if you'll encounter the same problem with it. I am still using MediaStore, so you might. It would also be interesting to know what is wrong with the above code. I remember getting the same behavior on the emulator once, but I deleted the AVD, created a new one, and could not reproduce it afterwards. By the way, what phone are you using, and what version of the SDK do you have on it? Mihai Fonoage On Nov 22, 1:38 pm, JasonMP hyperje...@gmail.com wrote: Hello, I'm testing some code from a demo found in a forum and I'm getting some strange results. My goal is to be able to allow users to access the pictures on their device to choose an avatar/logo. This code run flawlessly except that I only get a handful of images on the phone. And its not even always the same images. Whats more is that it loads those images into a gridview and repeats them for what looks like a number of times equal to the actual number of images that are on the device. And on top of that if I scroll down the through the pictures, and scroll back up, it reorders the pictures from what they were previously. Each time I load the app the pictures seem to be different as well. I have around 400 pictures stored on my phone, and thats what I'm using to test. If someone could shed some light on this for me that would be great. This is my first time using a URI to access content to I'm not sure where to start troubleshooting this one. public class gallery extends Activity { /** * Cursor used to access the results from querying for images on the SD card. */ private Cursor cursor; /* * Column index for the Thumbnails Image IDs. */ private int columnIndex; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.gallery); // Set up an array of the Thumbnail Image ID column we want String[] projection = {MediaStore.Images.Thumbnails._ID}; // Create the cursor pointing to the SDCard cursor = managedQuery ( MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI, projection, // Which columns to return null, // Return all rows null, MediaStore.Images.Thumbnails.IMAGE_ID); // Get the column index of the Thumbnails Image ID columnIndex = cursor.getColumnIndexOrThrow (MediaStore.Images.Thumbnails._ID); GridView sdcardImages = (GridView) findViewById(R.id.sdcard); sdcardImages.setAdapter(new ImageAdapter(this)); // Set up a click listener sdcardImages.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView parent, View v, int position, long id) { // Get the data location of the image String[] projection = {MediaStore.Images.Media.DATA}; cursor = managedQuery ( MediaStore.Images.Media.EXTERNAL_CONTENT_URI, projection, // Which columns to return null, // Return all rows null, null); columnIndex = cursor.getColumnIndexOrThrow (MediaStore.Images.Media.DATA); cursor.moveToPosition(position); // Get image filename String imagePath = cursor.getString(columnIndex); // Use this path to do further processing, i.e. full screen display } }); } /** * Adapter for our image files. */ private class ImageAdapter extends BaseAdapter { private Context context; public ImageAdapter(Context localContext) { context = localContext; } public int getCount() { return cursor.getCount(); } public Object getItem(int
[android-developers] Re: ActivityGroup and subactivities Lifetime.
Update on this: Setting 'android:launchMode=singleTop' at the sub- activity definition on the manifest file. Solves my problem. Can someone shed a light on this?. Thanks. CH On Nov 23, 11:59 am, chentschel chentsc...@gmail.com wrote: Hi!, I'm extending ActivityGroup class and implemented a custom tabHost and widgets for my app. Can someone shed a light on how are the Activities fife-time inside an ActivityGroup?. Im getting a weird behavior when using the following code to send a new intent to the current sub-activity, then change tab, and getting back to original tab. (TAB1 - TAB2 - TAB1) LocalActivityManager lm = getLocalActivityManager(); Intent i = new Intent(this, lm.getCurrentActivity().getClass()); i.setAction(WeegohApp.INTENT_ACTION_FILTER_SHC); i.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP); lm.startActivity(tabHost.getCurrentTabTag(), i); What i see from debug.. onSaveInstanceState() is called on TAB1, then TAB2 is current subActivity, but when going back to TAB1 onCreate() is called. onCreate() is not called with the same test without using the onNewIntent() described above. Thanks in advance ! CH -- 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: MediaStore returning loop of images and not entire directory
Mihai, It works! Like a charm too. Thanks for your help on this. I'll have to tinker around with it and see how it works exactly. On Mon, Nov 23, 2009 at 10:27 AM, Mihai Fonoage fonoag...@gmail.com wrote: No, you can take that line out (I updated the code with this change). Thanks for noticing that. Mihai Fonoage On Nov 23, 10:04 am, Jason Mallet-Prevost hyperje...@gmail.com wrote: Do I need to be including any other classes for this to run? What is a PuzzleView? Is that something in Android 2.0? On Mon, Nov 23, 2009 at 9:59 AM, Jason Mallet-Prevost hyperje...@gmail.comwrote: Hi Mihai, I have an HTC G1 running Android 1.6. I'm working on getting your new code implemented this morning. I'll let you know how it goes. And thank you. On Mon, Nov 23, 2009 at 7:56 AM, Mihai Fonoage fonoag...@gmail.com wrote: Hi Jason, Have you tried the updated version of my code (http:// mihaifonoage.blogspot.com/2009/11/displaying-images-from-sd-card- in.html http://mihaifonoage.blogspot.com/2009/11/displaying-images-from-sd-ca...) ? I am curious if you'll encounter the same problem with it. I am still using MediaStore, so you might. It would also be interesting to know what is wrong with the above code. I remember getting the same behavior on the emulator once, but I deleted the AVD, created a new one, and could not reproduce it afterwards. By the way, what phone are you using, and what version of the SDK do you have on it? Mihai Fonoage On Nov 22, 1:38 pm, JasonMP hyperje...@gmail.com wrote: Hello, I'm testing some code from a demo found in a forum and I'm getting some strange results. My goal is to be able to allow users to access the pictures on their device to choose an avatar/logo. This code run flawlessly except that I only get a handful of images on the phone. And its not even always the same images. Whats more is that it loads those images into a gridview and repeats them for what looks like a number of times equal to the actual number of images that are on the device. And on top of that if I scroll down the through the pictures, and scroll back up, it reorders the pictures from what they were previously. Each time I load the app the pictures seem to be different as well. I have around 400 pictures stored on my phone, and thats what I'm using to test. If someone could shed some light on this for me that would be great. This is my first time using a URI to access content to I'm not sure where to start troubleshooting this one. public class gallery extends Activity { /** * Cursor used to access the results from querying for images on the SD card. */ private Cursor cursor; /* * Column index for the Thumbnails Image IDs. */ private int columnIndex; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.gallery); // Set up an array of the Thumbnail Image ID column we want String[] projection = {MediaStore.Images.Thumbnails._ID}; // Create the cursor pointing to the SDCard cursor = managedQuery ( MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI, projection, // Which columns to return null, // Return all rows null, MediaStore.Images.Thumbnails.IMAGE_ID); // Get the column index of the Thumbnails Image ID columnIndex = cursor.getColumnIndexOrThrow (MediaStore.Images.Thumbnails._ID); GridView sdcardImages = (GridView) findViewById(R.id.sdcard); sdcardImages.setAdapter(new ImageAdapter(this)); // Set up a click listener sdcardImages.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView parent, View v, int position, long id) { // Get the data location of the image String[] projection = {MediaStore.Images.Media.DATA}; cursor = managedQuery ( MediaStore.Images.Media.EXTERNAL_CONTENT_URI, projection, // Which columns to return null, // Return all rows null, null); columnIndex = cursor.getColumnIndexOrThrow (MediaStore.Images.Media.DATA); cursor.moveToPosition(position); // Get image filename String imagePath = cursor.getString(columnIndex); // Use this path to do further processing, i.e. full screen display } }); } /** * Adapter for our image files.
[android-developers] Re: Securing a paid app
I agree getting IMEI to store on a server not in telecoms control bad idea..both security wise and legally.. Fred Grott Android Developer | http://mobilebytes.wordpess.com | http://twitter.com/sharemefg | http://www.linkedin.com/in/shareme | gtalk: fred.grott | skype: fred.grott | googlewave: fred.gr...@googlewave.com | gmail:fred.gr...@gmail.com On Nov 23, 9:23 am, David Given d...@cowlark.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 jax wrote: [...] How would I go about generating the hash code? I am intending on using the ime. If you're in the UK and you want to keep track of customers' IMEIs, you may need to get legal advice --- there's a good chance you'll be liable under the Data Protection Act (as you're storing personally identifiable information). - -- ┌─── dg@cowlark.com ─http://www.cowlark.com─ │ │ Sufficiently advanced incompetence is indistinguishable from │ malice. -- Vernon Schryver -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org iEYEARECAAYFAksKqO8ACgkQf9E0noFvlzjDQgCgrXFzamiu5EX6agg7NFI7OKiz BUEAn1CMcFfWIro+V8E7RtbDMF3rPqLa =KH5U -END PGP SIGNATURE- -- 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: custom dialog crashing
is it because i am calling it from a handler ? this handler is a private member variable of my activity private Handler myhandler = new Handler() { /* (non-Javadoc) * @see android.os.Handler#handleMessage(android.os.Message) */ @Override public void handleMessage(Message msg) { switch (msg.what) { case FINISHED: ShowAlert(); break; } super.handleMessage(msg); } }; On Nov 23, 9:08 pm, Jags jag...@gmail.com wrote: ok! i moved the code to onCreateDialog and even tough vg is null, it created the alert. but should vg be null ? but it crashed again ! here is code protected Dialog onCreateDialog(int id) { AlertDialog.Builder builder; AlertDialog alertDialog = null; Context mContext = getApplicationContext(); LayoutInflater inflater = (LayoutInflater) mContext.getSystemService (LAYOUT_INFLATER_SERVICE); switch(id) { case MY_DIALOG_ID: ViewGroup vg = (ViewGroup) findViewById(R.id.layout_root); View layout = inflater.inflate(R.layout.mydialog, vg); builder = new AlertDialog.Builder(mContext); builder.setView(layout); alertDialog = builder.create(); break; default: alertDialog = null; } return alertDialog; } void CheckHighScore() { showDialog(MY_DIALOG_ID); } On Nov 23, 8:26 pm, Jags jag...@gmail.com wrote: I understand that this is coming null because my current activity layout is main.xml. but is it that i need to do a setlayout to mydialog before starting any of my code ? On Nov 23, 8:11 pm, Jags jag...@gmail.com wrote: I have written below code for showing a custom dialog void CheckHighScore() { AlertDialog.Builder builder; AlertDialog alertDialog; Context mContext = getApplicationContext(); LayoutInflater inflater = (LayoutInflater) mContext.getSystemService (LAYOUT_INFLATER_SERVICE); ViewGroup vg = (ViewGroup) findViewById(R.id.layout_root); View layout = inflater.inflate(R.layout.mydialog, vg); builder = new AlertDialog.Builder(mContext); builder.setView(layout); alertDialog = builder.create(); alertDialog.show(); } __ xml file __ LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:id=@+id/layout_root android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent android:padding=10dp TextView android:id=@+id/desc android:text=@string/ask_info android:layout_width=wrap_content android:layout_height=wrap_content android:textColor=#FFF / EditText android:text=Enter your info here android:id=@+id/ yourinfo android:layout_width=wrap_content android:layout_height=wrap_content/EditText /LinearLayout it is unable to find ViewGroup in above code and is crashing. I have another main.xml file which is set to content layout in this activity. So how can I correct this thing ? Also I need to add some validation here to this dialog like info cannot be empty ! thanks in advance Jags -- 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: MediaStore returning loop of images and not entire directory
Happy it does. I posted a very brief description of the code at the beginning of the blog; that, together with code comments should help a bit. Let me know if you have any questions. Mihai Fonoage On Nov 23, 10:52 am, Jason Mallet-Prevost hyperje...@gmail.com wrote: Mihai, It works! Like a charm too. Thanks for your help on this. I'll have to tinker around with it and see how it works exactly. On Mon, Nov 23, 2009 at 10:27 AM, Mihai Fonoage fonoag...@gmail.com wrote: No, you can take that line out (I updated the code with this change). Thanks for noticing that. Mihai Fonoage On Nov 23, 10:04 am, Jason Mallet-Prevost hyperje...@gmail.com wrote: Do I need to be including any other classes for this to run? What is a PuzzleView? Is that something in Android 2.0? On Mon, Nov 23, 2009 at 9:59 AM, Jason Mallet-Prevost hyperje...@gmail.comwrote: Hi Mihai, I have an HTC G1 running Android 1.6. I'm working on getting your new code implemented this morning. I'll let you know how it goes. And thank you. On Mon, Nov 23, 2009 at 7:56 AM, Mihai Fonoage fonoag...@gmail.com wrote: Hi Jason, Have you tried the updated version of my code (http:// mihaifonoage.blogspot.com/2009/11/displaying-images-from-sd-card- in.html http://mihaifonoage.blogspot.com/2009/11/displaying-images-from-sd-ca...) ? I am curious if you'll encounter the same problem with it. I am still using MediaStore, so you might. It would also be interesting to know what is wrong with the above code. I remember getting the same behavior on the emulator once, but I deleted the AVD, created a new one, and could not reproduce it afterwards. By the way, what phone are you using, and what version of the SDK do you have on it? Mihai Fonoage On Nov 22, 1:38 pm, JasonMP hyperje...@gmail.com wrote: Hello, I'm testing some code from a demo found in a forum and I'm getting some strange results. My goal is to be able to allow users to access the pictures on their device to choose an avatar/logo. This code run flawlessly except that I only get a handful of images on the phone. And its not even always the same images. Whats more is that it loads those images into a gridview and repeats them for what looks like a number of times equal to the actual number of images that are on the device. And on top of that if I scroll down the through the pictures, and scroll back up, it reorders the pictures from what they were previously. Each time I load the app the pictures seem to be different as well. I have around 400 pictures stored on my phone, and thats what I'm using to test. If someone could shed some light on this for me that would be great. This is my first time using a URI to access content to I'm not sure where to start troubleshooting this one. public class gallery extends Activity { /** * Cursor used to access the results from querying for images on the SD card. */ private Cursor cursor; /* * Column index for the Thumbnails Image IDs. */ private int columnIndex; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.gallery); // Set up an array of the Thumbnail Image ID column we want String[] projection = {MediaStore.Images.Thumbnails._ID}; // Create the cursor pointing to the SDCard cursor = managedQuery ( MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI, projection, // Which columns to return null, // Return all rows null, MediaStore.Images.Thumbnails.IMAGE_ID); // Get the column index of the Thumbnails Image ID columnIndex = cursor.getColumnIndexOrThrow (MediaStore.Images.Thumbnails._ID); GridView sdcardImages = (GridView) findViewById(R.id.sdcard); sdcardImages.setAdapter(new ImageAdapter(this)); // Set up a click listener sdcardImages.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView parent, View v, int position, long id) { // Get the data location of the image String[] projection = {MediaStore.Images.Media.DATA}; cursor = managedQuery ( MediaStore.Images.Media.EXTERNAL_CONTENT_URI, projection, // Which columns to return null, // Return all rows null, null); columnIndex = cursor.getColumnIndexOrThrow (MediaStore.Images.Media.DATA);
[android-developers] Re: OpenGL gluUnProject
http://groups.google.com/group/android-developers/browse_frm/thread/9d2bf53e3a798cb6/07cfa3ee11507fc1?lnk=gstq=gluUnproject#07cfa3ee11507fc1 On Nov 22, 3:35 am, Anfernee anfernee2...@gmail.com wrote: i want to get the 3D coordinate from the android screen x,y coordinate i choose to use the gluUnProject but the gluUnProject function always returns NaN why please help me -- 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: Picture location on HTC sense phones
If you do a ContentResolver.insert, instead of a MediaStore.Images.Media.insertImage, you have to provide the fully qualified path to the image-file in the ContentValues as well: // fullyQualifiedPathName is the absolute/canonical path-name to the JPEG file. values.put(MediaStore.Images.Media.DATA, fullyQualifiedPathName); And you should call bitmap.compress on the FileOutputStream of this JPEG file to save the actual image/jpeg data. If you don't do this, the MediaScanner will pick it up, but only after you unmounted your sd-card or restarted your phone. On Nov 22, 6:04 pm, Derek dlawl...@gmail.com wrote: Agree we are seeing the same thing. Haven't found any solution yet. In Sense UI seems like HTC wrote their own camera app that is listening to the same intent as the default Android camera but not conforming to the same interface contract as the Android code. Anyone else find a fix to this? On Nov 5, 6:27 am, SCMSoft scms...@gmail.com wrote: (The message was accidentally sent, here is the full one:) Hi, We have multiple apps that save pictures to the phone. We use the following code for that: ContentValues values = new ContentValues(); values.put(MediaStore.Images.Media.DISPLAY_NAME, Photo); values.put(MediaStore.Images.Media.DESCRIPTION, Camera Pro); values.put(MediaStore.Images.Media.MIME_TYPE, image/jpeg); values.put(MediaStore.Images.Media.DATE_TAKEN, System.currentTimeMillis()); Uri uri = getContentResolver().insert (MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values); ... save Image to getContentResolver().openOutputStream (uri) ... This works fine on the G1 and a Samsung Galaxy, but on HTC phones with thesenseUI, the photos seem to be stored in a different location. The HTC Albums app doesn't pick these photos up and to the user it seems like the photos are not there at all. Also the default gallery app is not present. Is there a way to save images in the right place always? Can any phone manufacturer just choose to shuffle things around like this? It seems to make it unnecesarily hard on app developers if there are no standards. Best regards, Swiss Codemonkey team.- Hide quoted text - - Show quoted text - -- 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: custom dialog crashing
ok, this worked, but i dont know what was wrong in my aproach, for the sake of meeting deadline i will use this for now http://www.anddev.org/viewtopic.php?p=12915 in the above example, can I remove the edit text and show some scrollable text info full screen ? any helps are thanked regards On Nov 23, 10:21 pm, Jags jag...@gmail.com wrote: is it because i am calling it from a handler ? this handler is a private member variable of my activity private Handler myhandler = new Handler() { /* (non-Javadoc) * @see android.os.Handler#handleMessage(android.os.Message) */ @Override public void handleMessage(Message msg) { switch (msg.what) { case FINISHED: ShowAlert(); break; } super.handleMessage(msg); } }; On Nov 23, 9:08 pm, Jags jag...@gmail.com wrote: ok! i moved the code to onCreateDialog and even tough vg is null, it created the alert. but should vg be null ? but it crashed again ! here is code protected Dialog onCreateDialog(int id) { AlertDialog.Builder builder; AlertDialog alertDialog = null; Context mContext = getApplicationContext(); LayoutInflater inflater = (LayoutInflater) mContext.getSystemService (LAYOUT_INFLATER_SERVICE); switch(id) { case MY_DIALOG_ID: ViewGroup vg = (ViewGroup) findViewById(R.id.layout_root); View layout = inflater.inflate(R.layout.mydialog, vg); builder = new AlertDialog.Builder(mContext); builder.setView(layout); alertDialog = builder.create(); break; default: alertDialog = null; } return alertDialog; } void CheckHighScore() { showDialog(MY_DIALOG_ID); } On Nov 23, 8:26 pm, Jags jag...@gmail.com wrote: I understand that this is coming null because my current activity layout is main.xml. but is it that i need to do a setlayout to mydialog before starting any of my code ? On Nov 23, 8:11 pm, Jags jag...@gmail.com wrote: I have written below code for showing a custom dialog void CheckHighScore() { AlertDialog.Builder builder; AlertDialog alertDialog; Context mContext = getApplicationContext(); LayoutInflater inflater = (LayoutInflater) mContext.getSystemService (LAYOUT_INFLATER_SERVICE); ViewGroup vg = (ViewGroup) findViewById(R.id.layout_root); View layout = inflater.inflate(R.layout.mydialog, vg); builder = new AlertDialog.Builder(mContext); builder.setView(layout); alertDialog = builder.create(); alertDialog.show(); } __ xml file __ LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:id=@+id/layout_root android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent android:padding=10dp TextView android:id=@+id/desc android:text=@string/ask_info android:layout_width=wrap_content android:layout_height=wrap_content android:textColor=#FFF / EditText android:text=Enter your info here android:id=@+id/ yourinfo android:layout_width=wrap_content android:layout_height=wrap_content/EditText /LinearLayout it is unable to find ViewGroup in above code and is crashing. I have another main.xml file which is set to content layout in this activity. So how can I correct this thing ? Also I need to add some validation here to this dialog like info cannot be empty ! thanks in advance Jags -- 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: custom dialog crashing
http://developer.android.com/guide/topics/ui/dialogs.html#ShowingADialog There was a thread recently about how that part of the documentation was wrong, actually. At the minimum you're going to have to replace this line: builder = new AlertDialog.Builder(mContext); With this: builder = new AlertDialog.Builder(this); On Nov 23, 9:24 am, Jags jag...@gmail.com wrote: yeah i referred this tutorial of oogle http://developer.android.com/guide/topics/ui/dialogs.html#ShowingADialog On Nov 23, 8:11 pm, Jags jag...@gmail.com wrote: I have written below code for showing a custom dialog void CheckHighScore() { AlertDialog.Builder builder; AlertDialog alertDialog; Context mContext = getApplicationContext(); LayoutInflater inflater = (LayoutInflater) mContext.getSystemService (LAYOUT_INFLATER_SERVICE); ViewGroup vg = (ViewGroup) findViewById(R.id.layout_root); View layout = inflater.inflate(R.layout.mydialog, vg); builder = new AlertDialog.Builder(mContext); builder.setView(layout); alertDialog = builder.create(); alertDialog.show(); } __ xml file __ LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:id=@+id/layout_root android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent android:padding=10dp TextView android:id=@+id/desc android:text=@string/ask_info android:layout_width=wrap_content android:layout_height=wrap_content android:textColor=#FFF / EditText android:text=Enter your info here android:id=@+id/ yourinfo android:layout_width=wrap_content android:layout_height=wrap_content/EditText /LinearLayout it is unable to find ViewGroup in above code and is crashing. I have another main.xml file which is set to content layout in this activity. So how can I correct this thing ? Also I need to add some validation here to this dialog like info cannot be empty ! thanks in advance Jags -- 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] embeded web browser with custom width and height
I try to create a web browser with custom width and height rather than fill screen, is that possible to do in android? Below is my snippet code: AbsoluteLayout.LayoutParams params = new AbsoluteLayout.LayoutParams( 180, 180, 50, 90); webview = (WebView) findViewById(R.id.webview); webview.setLayoutParams(params); webview.getSettings().setJavaScriptEnabled(true); webview.loadUrl(http://www.google.com;); what am I doing is set web view's width and height to 180 pixels, and coordinate to 50 and 90. when I run this test, it display a white square on screen, nothing render at all. Could any one tell me how to do it in 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
Re: [android-developers] Re: Picture location on HTC sense phones
Or you can just explicitly ask the media scanner to scan the file: http://developer.android.com/reference/android/media/MediaScannerConnection.html On Mon, Nov 23, 2009 at 8:49 AM, Streets Of Boston flyingdutc...@gmail.comwrote: If you do a ContentResolver.insert, instead of a MediaStore.Images.Media.insertImage, you have to provide the fully qualified path to the image-file in the ContentValues as well: // fullyQualifiedPathName is the absolute/canonical path-name to the JPEG file. values.put(MediaStore.Images.Media.DATA, fullyQualifiedPathName); And you should call bitmap.compress on the FileOutputStream of this JPEG file to save the actual image/jpeg data. If you don't do this, the MediaScanner will pick it up, but only after you unmounted your sd-card or restarted your phone. On Nov 22, 6:04 pm, Derek dlawl...@gmail.com wrote: Agree we are seeing the same thing. Haven't found any solution yet. In Sense UI seems like HTC wrote their own camera app that is listening to the same intent as the default Android camera but not conforming to the same interface contract as the Android code. Anyone else find a fix to this? On Nov 5, 6:27 am, SCMSoft scms...@gmail.com wrote: (The message was accidentally sent, here is the full one:) Hi, We have multiple apps that save pictures to the phone. We use the following code for that: ContentValues values = new ContentValues(); values.put(MediaStore.Images.Media.DISPLAY_NAME, Photo); values.put(MediaStore.Images.Media.DESCRIPTION, Camera Pro); values.put(MediaStore.Images.Media.MIME_TYPE, image/jpeg); values.put(MediaStore.Images.Media.DATE_TAKEN, System.currentTimeMillis()); Uri uri = getContentResolver().insert (MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values); ... save Image to getContentResolver().openOutputStream (uri) ... This works fine on the G1 and a Samsung Galaxy, but on HTC phones with thesenseUI, the photos seem to be stored in a different location. The HTC Albums app doesn't pick these photos up and to the user it seems like the photos are not there at all. Also the default gallery app is not present. Is there a way to save images in the right place always? Can any phone manufacturer just choose to shuffle things around like this? It seems to make it unnecesarily hard on app developers if there are no standards. Best regards, Swiss Codemonkey team.- Hide quoted text - - Show quoted text - -- 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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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] AlarmManager - scheduled alarms after updating app canceled?
App xy schedules 2 alarms in 1 hour. The app xy is updated with a newer version. The already scheduled 2 alarms are gone?! Why? It seems the updating or deinstalling of an app does include to cancel all active alarms sent from this app. Is this right? -- 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: ActivityGroup and subactivities Lifetime.
It is trying to mimic the the behavior of normal activities -- if you start an activity, this will start on top (or here replace) the current one, unless its launch mode is singleTop. It seems there is a bug where it is ignoring the single top flag. This should be fixed, but note that activity groups and child activities are a little odd in that the code driving them is completely different than top-level activities, so there can be many subtle differences in behavior between the two. On Mon, Nov 23, 2009 at 7:45 AM, chentschel chentsc...@gmail.com wrote: Update on this: Setting 'android:launchMode=singleTop' at the sub- activity definition on the manifest file. Solves my problem. Can someone shed a light on this?. Thanks. CH On Nov 23, 11:59 am, chentschel chentsc...@gmail.com wrote: Hi!, I'm extending ActivityGroup class and implemented a custom tabHost and widgets for my app. Can someone shed a light on how are the Activities fife-time inside an ActivityGroup?. Im getting a weird behavior when using the following code to send a new intent to the current sub-activity, then change tab, and getting back to original tab. (TAB1 - TAB2 - TAB1) LocalActivityManager lm = getLocalActivityManager(); Intent i = new Intent(this, lm.getCurrentActivity().getClass()); i.setAction(WeegohApp.INTENT_ACTION_FILTER_SHC); i.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP); lm.startActivity(tabHost.getCurrentTabTag(), i); What i see from debug.. onSaveInstanceState() is called on TAB1, then TAB2 is current subActivity, but when going back to TAB1 onCreate() is called. onCreate() is not called with the same test without using the onNewIntent() described above. Thanks in advance ! CH -- 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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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: SDK 2.0 Traceview in The Droid.
You can also use the new adb shell am profile ... commands to start and stop profiling in a process. On Mon, Nov 23, 2009 at 6:40 AM, davemac davemac...@gmail.com wrote: Yes. You need to add a uses-permission to your AndroidManifest.xml file for android.permission.WRITE_EXTERNAL_STORAGE. - dave On Nov 20, 9:39 pm, JHandal jhand...@gmail.com wrote: HI I'm running the basic HelloActivity from the SDK 2. samples. When I try Trace view in the DDMS prespective its generate the trace file but can not opened. '/sdcard/com.google.android.apps.uploader.trace': Permission denied Do I need a permission to write in the SD card? 4:38.380: INFO/dalvikvm(10434): Debugger has detached; object registry had 1 entries 11-20 21:34:38.380: DEBUG/dalvikvm(10434): VM cleaning up 11-20 21:34:38.411: ERROR/AndroidRuntime(10434): ERROR: thread attach failed 11-20 21:34:38.466: DEBUG/VoiceDialerReceiver(1225): onReceive Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.example.android.helloactivity flg=0x2000 cmp=com.android.voicedialer/.VoiceDialerReceiver (has extras) } 11-20 21:34:38.466: DEBUG/dalvikvm(10434): LinearAlloc 0x0 used 636716 of 5242880 (12%) 11-20 21:34:38.490: WARN/ResourceType(1015): Resources don't contain package for resource number 0x7f08 11-20 21:34:38.490: WARN/ResourceType(1015): Resources don't contain package for resource number 0x7f020040 11-20 21:34:38.490: WARN/ResourceType(1015): Resources don't contain package for resource number 0x7f020041 11-20 21:34:38.497: WARN/ResourceType(1015): Resources don't contain package for resource number 0x7f05 11-20 21:34:38.521: WARN/ResourceType(1015): Resources don't contain package for resource number 0x7f020005 11-20 21:34:38.529: WARN/ResourceType(1015): Resources don't contain package for resource number 0x7f020004 11-20 21:34:38.529: WARN/ResourceType(1015): Resources don't contain package for resource number 0x7f0700e4 11-20 21:34:38.529: WARN/ResourceType(1015): Resources don't contain package for resource number 0x7f020031 11-20 21:34:38.529: WARN/ResourceType(1015): Resources don't contain package for resource number 0x7f020030 11-20 21:34:38.529: WARN/ResourceType(1015): Resources don't contain package for resource number 0x7f05 11-20 21:34:38.552: INFO/ActivityManager(1015): Start proc com.example.android.helloactivity for activity com.example.android.helloactivity/.HelloActivity: pid=10441 uid=10045 gids={1015} 11-20 21:34:38.599: INFO/dalvikvm(10441): Debugger thread not active, ignoring DDM send (t=0x41504e4d l=38) 11-20 21:34:38.622: INFO/dalvikvm(10441): Debugger thread not active, ignoring DDM send (t=0x41504e4d l=70) 11-20 21:34:38.708: WARN/ResourceType(1015): Resources don't contain package for resource number 0x7f060001 11-20 21:34:44.208: DEBUG/dalvikvm(2166): GC freed 1260 objects / 80072 bytes in 83ms 11-20 21:34:49.318: DEBUG/dalvikvm(1517): GC freed 256 objects / 14624 bytes in 75ms 11-20 21:34:50.986: DEBUG/dalvikvm(1181): +++ active profiler count now 1 11-20 21:34:50.990: INFO/dalvikvm(1181): TRACE STARTED: '/sdcard/ com.google.android.apps.uploader.trace' 8192KB 11-20 21:34:50.990: ERROR/dalvikvm(1181): Unable to open trace file '/ sdcard/com.google.android.apps.uploader.trace': Permission denied 11-20 21:34:50.990: DEBUG/dalvikvm(1181): +++ active profiler count now 0 11-20 21:34:54.435: DEBUG/dalvikvm(1225): GC freed 159 objects / 10488 bytes in 68ms 11-20 21:34:59.560: D -- 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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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] Running a service once per day
Yes that is what you have to do; the alarm manager does not persist alarms across boots. On Sun, Nov 22, 2009 at 10:36 PM, Armond Avanes armond...@yahoo.com wrote: Hi Folks, I want to run a background service once per day (after the date changed at midnight) and I don't want this schedule to be forgotten after a reboot. But I was not successful when I tried to listen for DATE_CHANGED or TIME_SET intents! Currently I'm listening for BOOT_COMPLETED intent and do a manual schedule using AlarmManager. Is this the intended way to do so? Or there is a better solution? Thank you, Armond -- 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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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 allow user to remove an activity form the Launcher
Use the PackageManager to disable that component. On Sun, Nov 22, 2009 at 8:58 PM, Ob1 obinw...@gmail.com wrote: Hi. I am creating an alternative keyboard. In order to help users understand how to set up the IME after it is installed I have added a simple Main Activity that appears in the Application Launcher with set up and usage instructions. I also have a preferences Activity and I want the user to have an option to hide or show the setup instructions Activity if they don't want to see it any more. My question is how best I can do this? I am assuming if it is possible it would require overriding the IntentFilter for the setup instruction Activity. I have experimented with this and read through the Intents and IntentFilter documentation but I can't see how to do this. Any pointers would be great. Thanks in advance -O -- 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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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: MediaStore returning loop of images and not entire directory
I implemented a bit of code at the end there before you recycle the bitmap to open a fileoutput stream and write the image to the /data/ data/package/file directory and save it there after the scaling. What I need to figure out is how to grab that images URI so that I can bind it to a simpleCursorAdapter. Does the image even have a URI after I place it into the apps file dir? or should I instead of copying it to the file dir just reference the original image on the sdcard? On Nov 23, 11:23 am, Mihai Fonoage fonoag...@gmail.com wrote: Happy it does. I posted a very brief description of the code at the beginning of the blog; that, together with code comments should help a bit. Let me know if you have any questions. Mihai Fonoage On Nov 23, 10:52 am, Jason Mallet-Prevost hyperje...@gmail.com wrote: Mihai, It works! Like a charm too. Thanks for your help on this. I'll have to tinker around with it and see how it works exactly. On Mon, Nov 23, 2009 at 10:27 AM, Mihai Fonoage fonoag...@gmail.com wrote: No, you can take that line out (I updated the code with this change). Thanks for noticing that. Mihai Fonoage On Nov 23, 10:04 am, Jason Mallet-Prevost hyperje...@gmail.com wrote: Do I need to be including any other classes for this to run? What is a PuzzleView? Is that something in Android 2.0? On Mon, Nov 23, 2009 at 9:59 AM, Jason Mallet-Prevost hyperje...@gmail.comwrote: Hi Mihai, I have an HTC G1 running Android 1.6. I'm working on getting your new code implemented this morning. I'll let you know how it goes. And thank you. On Mon, Nov 23, 2009 at 7:56 AM, Mihai Fonoage fonoag...@gmail.com wrote: Hi Jason, Have you tried the updated version of my code (http:// mihaifonoage.blogspot.com/2009/11/displaying-images-from-sd-card- in.html http://mihaifonoage.blogspot.com/2009/11/displaying-images-from-sd-ca...) ? I am curious if you'll encounter the same problem with it. I am still using MediaStore, so you might. It would also be interesting to know what is wrong with the above code. I remember getting the same behavior on the emulator once, but I deleted the AVD, created a new one, and could not reproduce it afterwards. By the way, what phone are you using, and what version of the SDK do you have on it? Mihai Fonoage On Nov 22, 1:38 pm, JasonMP hyperje...@gmail.com wrote: Hello, I'm testing some code from a demo found in a forum and I'm getting some strange results. My goal is to be able to allow users to access the pictures on their device to choose an avatar/logo. This code run flawlessly except that I only get a handful of images on the phone. And its not even always the same images. Whats more is that it loads those images into a gridview and repeats them for what looks like a number of times equal to the actual number of images that are on the device. And on top of that if I scroll down the through the pictures, and scroll back up, it reorders the pictures from what they were previously. Each time I load the app the pictures seem to be different as well. I have around 400 pictures stored on my phone, and thats what I'm using to test. If someone could shed some light on this for me that would be great. This is my first time using a URI to access content to I'm not sure where to start troubleshooting this one. public class gallery extends Activity { /** * Cursor used to access the results from querying for images on the SD card. */ private Cursor cursor; /* * Column index for the Thumbnails Image IDs. */ private int columnIndex; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.gallery); // Set up an array of the Thumbnail Image ID column we want String[] projection = {MediaStore.Images.Thumbnails._ID}; // Create the cursor pointing to the SDCard cursor = managedQuery ( MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI, projection, // Which columns to return null, // Return all rows null, MediaStore.Images.Thumbnails.IMAGE_ID); // Get the column index of the Thumbnails Image ID columnIndex = cursor.getColumnIndexOrThrow (MediaStore.Images.Thumbnails._ID); GridView sdcardImages = (GridView) findViewById(R.id.sdcard); sdcardImages.setAdapter(new ImageAdapter(this)); // Set up a click listener sdcardImages.setOnItemClickListener(new
Re: [android-developers] Android 2.0 bluetooth
The Android framework will handle this automatically for you. For example, if you attempt to establish a connection that requires pairing, a pairing notification will be shown to the user. Nick On Sat, Nov 21, 2009 at 11:46 PM, george george.gam...@gmail.com wrote: Hi i want to pair with a device using android 2.0 how can i do that there is no method does 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 -- 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] Keeping an Activity alive instead of destroying it?
Hi, Is there a way to keep an Activity in memory after the user hits the back button on it? Example: ActivityMainMenu (entry point) | --- ActivitySearch ActivitySearch is used frequently in my app, however after the user starts it up, then hits the back button, it's destroyed, and the next visit to it requires it be built from scratch again. If after its first construction, I could just request it be paused instead of destroyed on the back button, then I could reuse it. Is there a sensible way of doing this? The only way I could think of reasonably doing it is to combine ActivitySearch with ActivityMainMenu into a single activity, and simply switch views when the user chooses search, but this is probably a bad design. 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] Appropriate way to implement a list of GridView(s)
Please suggest the most appropriate way to implement a list of GridView (s), having different number of items. First problem was to have differnt height for each GridView. So, I have successfully tried to create the GridView dynamically and appending them to the ScrollView. Is this appropriate? But now I am concerned about peformance, as the list needs to be re- drawn many times. And we have lots of images that may scale, so GC got too much work to do. Any suggestions? -- 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] adsense account $20 only within 1hour
adsense account $20 only within 1hour www.equityloanshop.com for sale $500 dollars only contact no +919866357079 chinnamnaidu hyderabad india -- 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: Improving the Donut VoiceDialer
It's a safety issue, and probably No1. reason for returns. On Nov 13, 2:09 am, Zoide andreso...@gmail.com wrote: The Voice Dialer issue has now gone up to #3 in priority for the overall Android issues:http://code.google.com/p/android/issues/list Could anyone lend me a hand please? Thanks! On Nov 11, 12:12 am, Zoide andreso...@gmail.com wrote: Anyone? I see this is becoming a *huge* problem, heading straight for the top 5 starred issues for Android:http://code.google.com/p/android/issues/detail?id=1181 On Nov 7, 6:52 pm,Zoideandreso...@gmail.com wrote: Hi, The Donut VoiceDialer is far from ideal for in-car use because it requires users to confirm their selection by tapping on the screen. My idea is to enhance it so that it can be hands-free from start to finish. I was looking at VoiceDialerActivity.java and the most interesting part is the function onRecognitionSuccess(), which starts at line 383: /** * Called by the {...@link RecognizerEngine} when is succeeds. If there is * only one item, then the Intent is dispatched immediately. * If there are more, then an AlertDialog is displayed and the user is * prompted to select. * @param intents a list of Intents corresponding to the sentences. */ public void onRecognitionSuccess(final Intent[] intents) We could modify it so that if there is more than one item, it reads the items out loud and then does another recognition cycle among those items. Once the user's voice matches a single item, we can execute this pre- existing code (which is commented out for some reason): // only one item, so just launch /* if (intents.length == 1 mVoiceDialerTester == null) { // start the Intent startActivityHelp(intents[0]); finish(); return; } */ What do you think? For now, my main problem is that I have never developed for Android and my default compilation of the Donut branch does not generate a VoiceDialer.apk file in /mydroid/out/target/product/generic/system/ app/, where I had expected it to be. When I compile, I get the following: target R.java/Manifest.java: VoiceDialer (out/target/common/obj/APPS/ VoiceDialer_intermediates/src/R.stamp) target Java: VoiceDialer (out/target/common/obj/APPS/ VoiceDialer_intermediates/classes) Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: packages/apps/VoiceDialer/src/com/android/voicedialer/ RecognizerEngine.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. After that Dex and Package don't do anything with the VoiceDialer app and the compilation goes on to other packages. Any ideas? Thanks, Andrés -- 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] Asynchronous Server Call
Hi all, I am relatively new to android development. I am attempting to build an app that will have to make asynchronous server calls. Is there a recommended way to do this in android? I haven't found too much information by googling. Thank you, Craig -- 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: Failed to fetch URL https://dl-ssl.google.com/android/repository/repository.xml
I am using Ubuntu Karmic Koala. I created file ~/.android/androidtool.cfg and and sdkman.force.http=true Now I can download the Repository,But I still cannot download any platform file or doc CAN I DOWNLOAD THE PLATFORM ZIP FILE FROM A DIRECT LINK? On 10月28日, 上午7時31分, Xavier Ducrohet x...@android.com wrote: ok this is weird. Someone else (running ubuntu) had the same problem on IRC. It looks like it fails somehow to create the file containing the settings, but I don't know why (it works fine here). The file is ~/.android/androidtool.cfg try to create it manually and add one line to it: sdkman.force.http=true we'll try to figure out why it fails. Xav On Tue, Oct 27, 2009 at 3:58 PM, garycode garyma...@hotmail.com wrote: Hi, I'm trying to install a platform but when I type android the manager loads then I click Available Software then select the https://dl-ssl.google.com/android/repository/repository.xmlrepository I get this error., Failed to fetch URLhttps://dl-ssl.google.com/android/repository/repository.xml, reason: HTTPS SSL error. You might want to force download through HTTP in the settings. So I click the settings tab and select the force through http then click apply and save then nothing happens it doesn't save it because if i then close it and reload it the checkbox is unticked so it's not even using the force through http method. I get the same error if i go straight back to available software. I'm using Fedora and wget can download the xml file using ssl so I don't know why it's getting this https ssl error. Any ideas anyone? Thank you -- Xavier Ducrohet Android SDK Tech Lead Google Inc. -- 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: Flicker problem with animation
I figured out a solution to this problem. The clue came from the fact that when showing the view, everything worked fine. Apparently, when the animation is running, the update that would be forced by the show happens in the background and doesn't cause the flicker. Adding a short animation to the back end of the onAnimationEnd() when we are hiding the view makes the flicker go away. Here is the new onAndimationEnd() in the working code public void onAnimationEnd(Animation animation) { if (!mOpenWhenDone) { mButtonPanel.setVisibility(View.GONE); // The following null animation just gets rid of screen flicker animation = new TranslateAnimation(0.0f, 0.0f, 0.0f, 0.0f); animation.setDuration(1); mPlayer0Panel.startAnimation(animation); } // if } // onAnimationEnd -- 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: SDK 1.6, ADT 0.9.3, Eclipse 3.4.2: Problem with Android Editors
I could just revert to my old configuration and everything worked again. What if I don't have an old configuration to revert to? I'm running a fresh Eclipse install, and got the WST stuff by letting eclipse download it from the ganymede site to satisfy dependencies when installing the Android plugins. It pulled down version 3.1, and I'm stuck with that version. I'm pretty new to eclipse plugins. Is there a way to install a particular back version of stuff, or am I just out of luck until this gets fixed moving forward? -- 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] openInputStream(uri) vs openFileDescriptor(uri, r)
Hi there, To decode an image from an uri, which of the following is the preferred way: InputStream in = cr.openInputStream(uri); Bitmap bm = BitmapFactory.decodeStream(in, null, sBitmapOptions); ParcelFileDescriptor fd = cr.openFileDescriptor(uri, r); Bitmap b = BitmapFactory.decodeFileDescriptor (fd.getFileDescriptor(), null, sBitmapOptions); Or is there other better way? Thanks in advance, Yong -- 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 configure your application to ensure proper display on Motorola Droid?
Hi Dexter. Take a look at the technical spec sheet for the Droid where the screen size and other technical information is detailed: http://developer.motorola.com/products/droid/ Obviously Droid is Eclair so you will need to ensure that the Android SDK and ADT Plugin (if you are using Eclipse) are the correct versions and you will need to compile your application against the Android 2.0 libraries. For your information the Droid screen size is: WVGA (480 x 854), up to 16M colours and a pixel density of 240dpi. With regards, Alex. On Nov 20, 8:47 am, Dexter#39;s Brain coomar@gmail.com wrote: Hi, I am having trouble in finding out the right settings for my emulator to simulate the Motorola Droid. Does anyone know with what settings should I create my emulator, so that I can emulate the Droid handset? Thanks, Dexter -- 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] DDMS from Eclipse doesn't send geo location to emulator.
I was struggling one day. I was not sure if my app is wrong or emulator doesn't work. I have simple app with requestLocationUpdates (all permissions added). Sending geo location (manual) from DDMS 'emulator console' doesn't work, my app gets coords only once, and its 0,0 location. (maybe thats why app gets coords only once - there are always 0,0). But I can send coords from consol (geo fix 10 11) and my app reads it right, so my assumption is that DDMS emulator console doesn't work. I'm using win7 x64, eclipse 3.5.1, ADT 0.9.4v20091022, tested with targets Android 1.6 and 2.0. -- 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: Repository Grief
I got the same error on the same project prebuilt which is the 128th of 142 On Nov 21, 3:25 am, Guy Cole guyc...@gmail.com wrote: I have only recently tried to build Android from the repository. repo sync keeps failing (example below), does anybody know of a workaround? Thank you. g...@cornfed:209repo sync Fetching projects: 90% (128/142) warning: no common commits remote: Counting objects: 2279, done. remote: Compressing objects: 100% (1187/1187), done. fatal: pack has bad object at offset 24477965: inflate returned -5 fatal: index-pack failed error: Cannot fetch platform/prebuilt fatal: write error (Broken pipe) -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Guy Cole Expert Plain And Fancy Bit Twiddling guyc...@gmail.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: Repository Grief
I got the same error at the 128th project, after checking, it is prebuilt. It may be the problem of the server.. I am still trying. On Nov 21, 3:25 am, Guy Cole guyc...@gmail.com wrote: I have only recently tried to build Android from the repository. repo sync keeps failing (example below), does anybody know of a workaround? Thank you. g...@cornfed:209repo sync Fetching projects: 90% (128/142) warning: no common commits remote: Counting objects: 2279, done. remote: Compressing objects: 100% (1187/1187), done. fatal: pack has bad object at offset 24477965: inflate returned -5 fatal: index-pack failed error: Cannot fetch platform/prebuilt fatal: write error (Broken pipe) -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Guy Cole Expert Plain And Fancy Bit Twiddling guyc...@gmail.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] Post Your Business Opportunities Here
According to me sales and business increase by marketing.So market place need to be clean and powerful.Take a step for clear business. place ad @ http://www.adplacebd.com your trustful partner.visit http://www.adplacebd.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: Incoming calls
Carlos, Could this be a simple race condition? What happens if you delay a couple of seconds before displaying your activity? Does it work under both scenarios? Matt On Nov 12, 10:19 am, Carlos Pérez takut...@gmail.com wrote: I've got an awesome result. If I call my emulator as this: - open telnet and execute gsm call phonenumber Now, I just try call my emulator with DDMS. The result it was a surprise for me: my activity appears over InCallScreen. Somebody can explain me how I should simulate an incoming call? Why did I get differents results? On 12 nov, 16:24, Miguel Paraz mpa...@gmail.com wrote: Hi, It's really not supported, because the Phone app runs in a system process. I also want to do it. On Nov 12, 6:17 pm, Carlos Pérez takut...@gmail.com wrote: It's really important for me and for my app. Then, If someone has another idea about how resolve my problem, I'll be very grateful On 11 nov, 18:39, Carlos Pérez takut...@gmail.com wrote: This is another post about incoming calls. I was looking for about this subject and always I read de same: It is not replace inCallScreen, You can't modify inCallScreen, ... The problem is almost all threads where I read this, are dated posts. Then, I want to know if I can do some of this things above now. I need react to an incoming call and show two big buttons any way (new dialog, modifing incallscreen,...). I got start a new activity, but it appears after I reject incoming call. I need my activity appears over inCallScreen. Another thing I thought is use NDK, but I don't know if NDK support this. Somebody can help me? -- 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] AIDL to Connect to a server
Hi all, I am new to android development and I have a question about AIDL. I have a requirement to call some functions and perform quite a bit of processing remote server. Most of my calls will be made from the ListActivity class. Is it possible to use AIDL to call functions on my server from the android device? If so then is this the best way to do this? If not then what is the recommended way of doing this. Thank you very much for your help, Craig -- 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] adsense account $20 only within 1hour
adsense account $20 only within 1hour www.equityloanshop.com for sale $500 dollars only contact no +919866357079 chinnamnaidu hyderabad india -- 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: New to android and java - Cannot run or debug with eclipse 3.5.1 on windows
I'm experiencing the same problem (I just installed the SDK into Eclipse and installed the AVD). It compiles correctly, opens the AVD, but I can't get the text within the AVD to change. Were you successful in fixing 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: How to get all contact's name phone number, email for 2.0
Rachel: My understanding is that the contact Id in the Phone/Email table actually refers to the _ID in the ContactsContract.RawContacts table. You might want to first get the list of all Raw Contacts associated with the particular contact id and then query the Phone table based on the RawContact id you have obtained. -Padma. On Nov 21, 12:16 am, Rachel Blackman ceruleanspa...@gmail.com wrote: On Nov 20, 2009, at 6:55 AM, Henry wrote: Now, it always return just one row. I tried several ways, like ContactsContract.CommonDataKinds.Email.CONTACT_ID + in ('1', '2', '3'); It always one row. If I just contact id 3, it will return contact 3. Do you know a way to get all the emails in one single query? Honestly, given the schema (raw contacts and virtual contacts all stored together), if you just want all email addresses while maintaining any sort of mapping to their respective contacts, I would query all the contacts individually. (Do a query that returns all the contacts, then a query on each of them to return the emails, eliminating duplicates.) Am I misunderstanding the usage case? (I'm hoping to have some time this weekend to work more on the Contacts 2.0 FAQ and samples that we've gathered so far, too!) -- 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] RSSI like indicator in notification area
Hi, Is it possible to display indicator similar to RSSI in notification area i.e. in status bar area in Android? Regards, Jay -- 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: Encrypting in PHP and Decrypting in Android
Find a common encryption / decryption library that has been implemented in PHP and Java (or Python or C). Base64 is encryptable and decryptable by both but isnt really secure. On Nov 23, 10:38 am, Fabio piuc...@gmail.com wrote: What about SSL/TLS ? On Nov 22, 2:47 pm, jax jackma...@gmail.com wrote: What would I use to: Encrypt a string in PHP and Decrypt that string from Android? What methods are supported by both and which is the most secure? -- 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: Fetch IMSI or detect SIM change?
Hi Roman, I'm trying to get the IMSI using TelephonyManager.getSubscriberId(), but all I'm getting is MCC(Mobile Country Code ),MNC(Mobile Network Code ) and not MSIN(Mobile Network Code ). Can you please help me with fetching the MSIN. Thanks, Vasanth On Oct 30, 11:50 pm, Roman ( T-Mobile USA) roman.baumgaert...@t- mobile.com wrote: Use TelephonyManager getSubscriberId() to get the IMSI Roman Baumgaertner Sr. SW Engineer-OSDC ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Oct 29, 10:59 pm, javame_android su...@saltriver.com wrote: Hi, I want to fetch the IMSI number so that I could keep it in memory and detect whenever SIM card changes. Is it actually possible? Is there anyone who can guide me a bit? Hope to get a positive reply soon. Regards Sunil- Hide quoted text - - Show quoted text - -- 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 play two videos gapless using MediaPlayer.
Hi, I'm trying to play number of short .mp4 files gapless, one after another. The steps is do are : mMediaPlayer = new MediaPlayer(); mMediaPlayer.setDataSource(1.mp4); mMediaPlayer.setDisplay(holder); mMediaPlayer.prepare(); The same way i initialize mMediaPlayer1 object with 2.mp4 and set setOnCompletionListener where I play mMediaPlayer1 The problem I face here is the audio of the second file plays gapless but the video doesnt play. I just see the last frame of the first video. Once I get this working I plan to keep a counter for filename as I wanna play 1.mp4 to 99.mp4 continuously. Am I on the write track or am I missing something, Any help on the same would be highly appreciated. Thanks in advance. Regards, Milind -- 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] Unsubscribe
-- 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] Warning when using BufferedInputStream
Hi everybody, We are developing an application which uses the BufferedInputStream class several times, and we are getting an annoying message in the logcat: I/global ( 749): Default buffer size used in BufferedInputStream constructor. It would be better to be explicit if an 8k buffer is required. We cannot meet the suggestion all the times and it's very annoying and it doesn't make much sense. Is it possible to remove that warning message? Or to change the log level to fine instead of info or warning, for example, so that it doesn't appear in the logcat messages? Thanks a lot and congratulations for your wonderful work on 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] Tapping activity after startActivityForResult
Hi, I have two buttons in an activity/view A0, b1 and b2 that respectively starts (for result) the activities A1 and A2. After tapping/clicking b1 I quickly tap b2 aswell. The result will be that both A1 and A2 are launched. Is there any obvious way to not have this behaviour, i.e. to lock A0? I am thinking of overriding dispatchTouchEvent to consume everything after the call to startActivityForResult, but it seems a bit much... Best regards, Michael -- 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] free directory submission site
we provide a directory listing site which allow any site approve within minutes. http://vinayakholidays.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] handle back button
working with notepad3 from NotepadCodeLab i saw that if you opened the note_edit form to add or update a note and you pressed the Back button the changes where committed in the database before you got back to the main form. is there anyway to handle the back button event to get asked if you want to update the database before you get back to the previous form? Thanks for 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] Re: Prevent full-screen behaviour via the InputMethodManager
Or, to put it another way, perhaps there is a way to bring up the software keyboard and suppress this behaviour? Bottom line, is that it looks awful on larger resolutions. I can overload the right events within the control to prevent this behaviour, but I would still need to manually invoke the InputMethodManager... On Nov 19, 4:30 pm, Michael mikecg...@gmail.com wrote: I'm looking to prevent the default behaviour of going full screen when controls like EditText receive focus in an application. The InputMethodManager class does indeed have a setFullscreen() method available, but it seems to have been hidden on purpose in the SDK. Is there any other way to disable this behaviour while still using the software keyboard? Thanks, Michael -- 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] Programmatically setting the layout_above value
Hello, I need to dynamically change the layout_above value for a ListView within a RelativeLayout. I know that within the XML, all you need is android:layout_above=@id/myid, but what is the equivalent if I want to do this in my java code? Thanks, Becca -- 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 can I access a data provider where permission is null?
Hi, I have as an example, this provider information from the PackageManager. 1:[14]= ProviderInfo (id=830058701400) applicationInfo= ApplicationInfo (id=830058701752) authority= sms (id=830058702720) enabled= true exported= true grantUriPermissions= false icon= 0 initOrder= 0 isSyncable= false labelRes= 0 metaData= null multiprocess= true name= com.android.providers.telephony.SmsProvider (id=830058701488) nonLocalizedLabel= null packageName= com.android.providers.telephony (id=830058701632) processName= com.android.phone (id=830058702632) readPermission= android.permission.READ_SMS (id=830058702784) uriPermissionPatterns= null writePermission= android.permission.WRITE_SMS (id=830058702896) URI: content://sms/ No problem here, just pop READ_SMS in the manifest and all is peachy. :) 2:[8]= ProviderInfo (id=830058693120) applicationInfo= ApplicationInfo (id=830058693392) authority= sync (id=830058694096) enabled= true exported= true grantUriPermissions= false icon= 0 initOrder= 0 isSyncable= false labelRes= 0 metaData= null multiprocess= false name= android.content.SyncProvider (id=830058693208) nonLocalizedLabel= null packageName= android (id=830058693320) processName= system (id=830058694032) readPermission= null uriPermissionPatterns= null writePermission= null URI: content://sync/ Here the read and write permissions are null, so I have nothing to put in the manifest, and my app crashes 'unexpectedly' Is it possible to still access this provider? -- Morten A. Steien -- 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: SDK 2.0 Auto Dim Control?
Good question. I'd like to know too because I find the placement (or actions) of the ambient light sensor to be arbitrary and erratic :-/ On Nov 23, 8:40 am, bklik brenton.k...@gmail.com wrote: Has a way been added to the Android 2.0 SDK to disable auto dimming on the Motorola Droid? Brenton -- 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] Raw Audio Capture?
I've read a lot of posts in this group regarding raw audio processing. Most of them include references by Mr. Sparks about support for this in future releases. I hope maybe he was referring to Android 2.0? To be clear, all I want to do is obtain audio data from the microphone in as high a fidelity as possible to perform DSP against it. This is blissfully outside the realm of any DRM-laden audio output issues (I hope). So, in short, can we get raw audio off the microphone using Android 2.0 and a Droid, for example? 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] Sending binary signals on the USB port
Hi! Is it possible to send binary signals (high/low) on the cellphone's USB port using the Android SDK, or perhaps the NDK? If so: has anyone done it? What should I google for? Which package is used? Thank you! -- 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] Tapping activity after startActivityForResult
Michael Scott wrote: Hi, I have two buttons in an activity/view A0, b1 and b2 that respectively starts (for result) the activities A1 and A2. After tapping/clicking b1 I quickly tap b2 aswell. The result will be that both A1 and A2 are launched. Is there any obvious way to not have this behaviour, i.e. to lock A0? Disable the buttons before launching A1. Re-enable the buttons in onActivityResult(). -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Beginning Android_ from Apress Now Available! -- 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: Keeping an Activity alive instead of destroying it?
Hi Mark, It's only causing a slight annoyance to the user. Although the UI takes about 1.5 seconds to completely build, I am doing a staggered load. This lets the user see content immediately, but they're wondering why every time they leave the search activity, then come back, all the content must be reloaded. The actual search data is kept in a global static singleton, no problem there, just the UI is kind of heavy to keep regenerating around it. This would work better as a tabbed-view in a single Activity, but my spec calls for the search screen to be in a separate Activity. I like keeping it separated too, just wish I could pause the app to resume it later since I'm sure it's an Activity users will keep coming back to while using the app. Thanks On Nov 23, 12:55 pm, Mark Murphy mmur...@commonsware.com wrote: Mark Wyszomierski wrote: If after its first construction, I could just request it be paused instead of destroyed on the back button, then I could reuse it. Is there a sensible way of doing this? Is it causing you particular problems? If you are not experiencing problems, this feels a bit like premature optimization. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy _Beginning Android_ from Apress Now Available! -- 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] Keeping an Activity alive instead of destroying it?
Mark Wyszomierski wrote: If after its first construction, I could just request it be paused instead of destroyed on the back button, then I could reuse it. Is there a sensible way of doing this? Is it causing you particular problems? If you are not experiencing problems, this feels a bit like premature optimization. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Beginning Android_ from Apress Now Available! -- 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] startActivity in another package
I have splitted my Android project in 2 packages, lets say: test.current and test.another. From an activity in test.current I want to start an activity in the package test.another Intent i = new Intent(); i.setClassName(test.another, test.another.MyActivity); startActivity(i); But I got ActivityNotFoundException. The essential parts of my manifest looks like this: manifest xmlns:android=http://schemas.android.com/apk/res/android; package=test.current ... activity android:name=test.another.MyActivity android:exported=true ... Please 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
Re: [android-developers] Re: Keeping an Activity alive instead of destroying it?
What are you doing that is making it so heavy to build the UI? 1.5 second just to get the basic activity UI up is pretty long, for example. You would probably be best off first looking at optimizing this work (such as by simplifying view hierarchies etc). On Mon, Nov 23, 2009 at 10:03 AM, Mark Wyszomierski mar...@gmail.comwrote: Hi Mark, It's only causing a slight annoyance to the user. Although the UI takes about 1.5 seconds to completely build, I am doing a staggered load. This lets the user see content immediately, but they're wondering why every time they leave the search activity, then come back, all the content must be reloaded. The actual search data is kept in a global static singleton, no problem there, just the UI is kind of heavy to keep regenerating around it. This would work better as a tabbed-view in a single Activity, but my spec calls for the search screen to be in a separate Activity. I like keeping it separated too, just wish I could pause the app to resume it later since I'm sure it's an Activity users will keep coming back to while using the app. Thanks On Nov 23, 12:55 pm, Mark Murphy mmur...@commonsware.com wrote: Mark Wyszomierski wrote: If after its first construction, I could just request it be paused instead of destroyed on the back button, then I could reuse it. Is there a sensible way of doing this? Is it causing you particular problems? If you are not experiencing problems, this feels a bit like premature optimization. -- Mark Murphy (a Commons Guy)http://commonsware.com| http://twitter.com/commonsguy _Beginning Android_ from Apress Now Available! -- 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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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: SDK 2.0 Auto Dim Control?
Go to the screen settings and turn it off. On Mon, Nov 23, 2009 at 7:01 AM, Wes wes.beli...@gmail.com wrote: Good question. I'd like to know too because I find the placement (or actions) of the ambient light sensor to be arbitrary and erratic :-/ On Nov 23, 8:40 am, bklik brenton.k...@gmail.com wrote: Has a way been added to the Android 2.0 SDK to disable auto dimming on the Motorola Droid? Brenton -- 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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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: Prevent full-screen behaviour via the InputMethodManager
This is up to the input method. Note that most of the platform UI has not been optimized for larger screens (only normal medium density and normal long high density), so I wouldn't spend a lot of time trying to tweak systemish behavior for them. When someone does a large screen device they will need to do the work to make the system UI behave appropriately on it. On Mon, Nov 23, 2009 at 7:38 AM, Michael mikecg...@gmail.com wrote: Or, to put it another way, perhaps there is a way to bring up the software keyboard and suppress this behaviour? Bottom line, is that it looks awful on larger resolutions. I can overload the right events within the control to prevent this behaviour, but I would still need to manually invoke the InputMethodManager... On Nov 19, 4:30 pm, Michael mikecg...@gmail.com wrote: I'm looking to prevent the default behaviour of going full screen when controls like EditText receive focus in an application. The InputMethodManager class does indeed have a setFullscreen() method available, but it seems to have been hidden on purpose in the SDK. Is there any other way to disable this behaviour while still using the software keyboard? Thanks, Michael -- 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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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: Keeping an Activity alive instead of destroying it?
Mark Wyszomierski wrote: It's only causing a slight annoyance to the user. Although the UI takes about 1.5 seconds to completely build, I am doing a staggered load. This lets the user see content immediately, but they're wondering why every time they leave the search activity, then come back, all the content must be reloaded. The actual search data is kept in a global static singleton, no problem there, just the UI is kind of heavy to keep regenerating around it. I'd focus on making the UI faster to load, but that's just me. And apparently Ms. Hackborn, seeing her reply as I was typing this one. This would work better as a tabbed-view in a single Activity, but my spec calls for the search screen to be in a separate Activity. I like keeping it separated too, just wish I could pause the app to resume it later since I'm sure it's an Activity users will keep coming back to while using the app. You might achieve your desired effect by overriding onBackPressed() (or perhaps onKeyUp() if onBackPressed() is too late) and using startActivity() with an Intent and some likely flags to try to get control to the other activity. This, coupled with android:launchMode=singleTop, should mean you'll have 0-1 instances of your search activity at all times. However: 1. This assumes that the search activity knows who to go back to via startActivity(). That may be easy to determine in your case. 2. You'd also need to arrange to finish() this activity at some point, otherwise your app is never exitable. 3. If you have N other activities besides the search one, all this bookkeeping gets much more icky. Hence, I'd focus on making the UI faster to load. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- 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] startActivity in another package
You are starting the package test.another but your manifest declares it as test.current. On Mon, Nov 23, 2009 at 10:07 AM, Tomas tomas.c.hjelmb...@gmail.com wrote: I have splitted my Android project in 2 packages, lets say: test.current and test.another. From an activity in test.current I want to start an activity in the package test.another Intent i = new Intent(); i.setClassName(test.another, test.another.MyActivity); startActivity(i); But I got ActivityNotFoundException. The essential parts of my manifest looks like this: manifest xmlns:android=http://schemas.android.com/apk/res/android; package=test.current ... activity android:name=test.another.MyActivity android:exported=true ... Please 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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: Encrypting in PHP and Decrypting in Android
If you want something secure, do a RSA encryption using a private key on your server. Your application will fetch this and decrypt using the public key. You could throw some extra things in there if you'd like, but that would probably be your best bet. On Nov 23, 8:41 am, sixones sixo...@me.com wrote: Find a common encryption / decryption library that has been implemented in PHP and Java (or Python or C). Base64 is encryptable and decryptable by both but isnt really secure. On Nov 23, 10:38 am, Fabio piuc...@gmail.com wrote: What about SSL/TLS ? On Nov 22, 2:47 pm, jax jackma...@gmail.com wrote: What would I use to: Encrypt a string in PHP and Decrypt that string from Android? What methods are supported by both and which is the most secure? -- 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: Keeping an Activity alive instead of destroying it?
I definitely agree with just working on making the UI faster to load - I rewrote the activity so the UI loads in a staggered manner. It's a ScrollView with several irregularly shaped sub views (which don't fit nicely in a ListView). Therefore I am adding each subview one at a time to the ScrollView, but this can take some time. I create only the first few subviews and add them to the ScrollView in the onCreate() method. The activity starts immediately and the user can start interacting. However, the remaining views are generated in delayed intervals (using a series of postDelayed()), and appended to the bottom of the ScrollView. This works, it's just a little annoying to see all that work being redone on each load of the Activity. I tried looking at overriding the back button and tweaking the history stack to somehow keep the activity around, but yeah you're right, it's a bit dangerous and will probably not end nicely. In this case, it's probably best to keep everything in one activity, and switch views on the back button (not the greatest either, but manageable). This comes at the expense of keeping all the UI stuff in memory then, but I haven't seen this go above 5mb. Thanks On Nov 23, 1:10 pm, Mark Murphy mmur...@commonsware.com wrote: Mark Wyszomierski wrote: It's only causing a slight annoyance to the user. Although the UI takes about 1.5 seconds to completely build, I am doing a staggered load. This lets the user see content immediately, but they're wondering why every time they leave the search activity, then come back, all the content must be reloaded. The actual search data is kept in a global static singleton, no problem there, just the UI is kind of heavy to keep regenerating around it. I'd focus on making the UI faster to load, but that's just me. And apparently Ms. Hackborn, seeing her reply as I was typing this one. This would work better as a tabbed-view in a single Activity, but my spec calls for the search screen to be in a separate Activity. I like keeping it separated too, just wish I could pause the app to resume it later since I'm sure it's an Activity users will keep coming back to while using the app. You might achieve your desired effect by overriding onBackPressed() (or perhaps onKeyUp() if onBackPressed() is too late) and using startActivity() with an Intent and some likely flags to try to get control to the other activity. This, coupled with android:launchMode=singleTop, should mean you'll have 0-1 instances of your search activity at all times. However: 1. This assumes that the search activity knows who to go back to via startActivity(). That may be easy to determine in your case. 2. You'd also need to arrange to finish() this activity at some point, otherwise your app is never exitable. 3. If you have N other activities besides the search one, all this bookkeeping gets much more icky. Hence, I'd focus on making the UI faster to load. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android App Developer Books:http://commonsware.com/books -- 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: Programmatically setting the layout_above value
Hi Becca, It's very simple, you can do something like the following: LayoutParams layoutParams = new RelativeLayout.LayoutParams (LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); layoutParams.addRule(RelativeLayout.ABOVE, myView.getId()); Where myView is the view you want to be above. Make sure you call setId to programmatically assign an id. Extra tip: If you're using the layout params on a View that will be instantiated frequently (like a ListView child), you can create a single static instance of your LayoutParams (initialize it in a static block), and reuse it for all items (for id's assign predefined constants. They don't have to be globally unique) Lior UltimateFavesPRO developer. http://ultimatefaves.wordpress.com On Nov 23, 5:13 pm, Becca rsquaredcreati...@gmail.com wrote: Hello, I need to dynamically change the layout_above value for a ListView within a RelativeLayout. I know that within the XML, all you need is android:layout_above=@id/myid, but what is the equivalent if I want to do this in my java code? Thanks, Becca -- 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