[android-beginners] Bringing an Activity to the from when notification is tapped
Hi! My app is having an Activity, and a local Service. The Service shows notifications for time to time, and I like to open the Activity when the notification is tapped. Now the problem is, I may get multiple activies stacked if I tap the notifications many times in a row. Here's how I show the notification: final NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE); Notification notification = new Notification(R.drawable.icon, Hello, System .currentTimeMillis()); notification.flags |= Notification.FLAG_ONGOING_EVENT; notification.flags |= Notification.FLAG_NO_CLEAR; Intent intent = new Intent(this, MyActivity.class); intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); PendingIntent i = PendingIntent.getActivity(this, 0, intent, 0); notification.setLatestEventInfo(this, Hello, Hello, i); notificationManager.notify(NOTIFICATION_ID, notification); Any suggestions how to just bring the Activity to the front if it already exists? Br, Antti -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Communicating with local computer
Hi! If I connect an Android Phone to PC using USB cable, what options do I have in communicating between the phone and the PC? I would like to achieve following communication features in my application: 1) Java application on PC should be able to recognize when a phone with my app is connected or disconnected via USB, 2) Phone should recognize if the PC has my app running or not and 3) Phone and PC should be able to transfer textual data in both directions. [Application on Phone] -USB-- [Application on PC] Only thing really coming to my mind is to use TCP for data transfer and UDP for presence, but I don't even know if this is possible with Android. The idea is to enable cable connection, so TCP may not be the nicest way. So could someone give me some advice what options I have, and how should I get started? Best Regards, Antti Karhu -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
Re: [android-beginners] Book for learning Android
Try your local book store, (technical/university) library or online book store. On Wed, Jan 27, 2010 at 11:26 AM, Chirayu Dalwadi chirayu.dalw...@gmail.com wrote: I want useful links, requried to learn android Help me out -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
Re: [android-beginners] Re: Many objects with identical Listeners
Hey, that was handy :) On Tue, Jan 26, 2010 at 9:40 AM, skink psk...@gmail.com wrote: On Jan 25, 9:46 pm, Antti Karhu antti.iisa...@gmail.com wrote: If all of EditText listeners should contain identical code, you could implement the listener interface instead of using anonymous classes. well, anonymous class will work as well: OnClickListener listener = new OnClickListener { public void onClick(params) { // Do something } } a.setOnClickListener(listener); b.setOnClickListener(listener); c.setOnClickListener(listener); pskink -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
Re: [android-beginners] Re: Video recording
Wild guesses for permissions: CAMERAhttp://developer.android.com/reference/android/Manifest.permission.html#CAMERAand RECORD_AUDIOhttp://developer.android.com/reference/android/Manifest.permission.html#RECORD_AUDIO. Can be found at http://developer.android.com/reference/android/Manifest.permission.html On Mon, Jan 25, 2010 at 4:38 PM, Dave Feltenberger dave.feltenber...@gmail.com wrote: Perhaps I'm doing something wrong? What permissions do I need other than to record audio and video? On Sat, Jan 23, 2010 at 9:52 PM, Android Development indodr...@gmail.comwrote: Based on your observations, I will not be upgrading to these versions. On Sat, Jan 23, 2010 at 8:11 PM, Dave Feltenberger dave.feltenber...@gmail.com wrote: Bump. Any ideas, guys? Has anybody been able to record video in Android 2.0.1 or 2.1? Both of those versions seem to be affected. On Fri, Jan 22, 2010 at 3:33 PM, Dave Feltenberger dave.feltenber...@gmail.com wrote: Hi all, Have any of you tried using the MediaRecorder in Android 2.1? I can't get video or audio to record using it. When I set the video or audio source (with MediaRecorder.AudioSource.MIC or MediaRecorder.VideoSource.CAMERA), I keep getting error messages saying it's an invalid parameter/device, and then when I try to prepare/record I just get exceptions. I'm using this in debug mode tethered to a Nexus One phone. Any ideas on this? I see a lot of other people having the problem, but nobody has come up with a solution that I can find. Is there an alternative method? Thanks. Dave -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
Re: [android-beginners] how to put button in list activity?
HI. Just like with other views, put it in the layout xml: ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent Button android:id=@+id/selection android:layout_width=fill_parent android:layout_height=wrap_content android:text=a button / ListView android:id=@android:id/list android:layout_width=fill_parent android:layout_height=fill_parent android:drawSelectorOnTop=false / /LinearLayout -- Antti On Thu, Jan 21, 2010 at 11:38 AM, umar mr_muskura...@yahoo.com wrote: hi, can any one guide me how can i put Text Button in list activity??? any help would be appriciated. -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
Re: [android-beginners] Add more supported devices to USB Driver for Windows?
Hi. I originally installed the stuff in the following order: 1) Android SDK + 1.5 platform 2) Eclipse 3) New PC Studio + Drivers from Samsung CD. Installing New PC Studio installs also the correct drivers plus some additional ones 4) Connected the phone to USB To make it work, I had to remove the New PC Studio from my machine. I also re-istalled the drivers, don't know if that made any difference. But now the drivers from Samsung CD work ok. I got a reply from Samsung Finnish support which stated the New PC Studio is not yet compatible with Spica (update should be available in couple months), and it should be uninstalled to get the debugging working. So Spica developer might do something like this to enable debugging: 1) Install Android SDK + platforms 2) Install Eclipse 3) Install New PC Studio (installs the drivers) 4) Remove New PC Studio but leave the drivers 5) Enable USB Debugging in phone 6) Connect phone to USB Sadly I did not search the groups - I think I was a bit hasty and did not realize the groups website obviously has a search field :) Now I'll search the groups before posting :) Best Regards, Antti On Wed, Jan 20, 2010 at 1:22 AM, Justin Anderson janderson@gmail.comwrote: Did you, by chance, connect your phone to your Windows machine before having all the development stuff set up (on your phone and in Windows)? If so, this is a known issue with a fairly simple fix. Just out of curiosity, did you search this group before posting this question? A simple search for Samsung Galaxy brings up a thread titled Debugging on Samsung Galaxy which tells you how to get it all working... Here is the link: http://groups.google.com/group/android-beginners/browse_thread/thread/bd9f0690e0171ffd/71292b2e7d98d9a1?lnk=gstq=Samsung+Galaxy#71292b2e7d98d9a1 Thanks, Justin -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Sat, Jan 16, 2010 at 1:02 PM, ana antti.iisa...@gmail.com wrote: Hi! I bought an Android phone (Samsung Galaxy Spica i5700) from my mobile operator, with also development in mind. However, I now must accept that I cannot use it as a full-fledged development, at least not yet, since there doesen't seems to be suitable drivers available. The drivers coming with the device did do anything, and modifying the ini of the USB Driver for Windows of the SDK did not help either. ADB does not simply see the device. I can of course copy installation packets to the device and install, but I cannot debug and copying packets is tedious. I assume many of the beginners use MS Windows, and there the problem is the worst - virtually nothing can be done without proper drivers either from Android or manufacturer. For Mac things should be working, and for Linux the devices can be configured using instructions found from net. Currently, the drivers coming with the SDK support only few devices, 5 or 6? It would be very nice to add more supported devices to make development easier. Best Regards, Antti Karhu -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
Re: [android-beginners] Breakpoints on device debugging
Thanks, that did the trick :) On Tue, Jan 19, 2010 at 1:10 PM, ryan alford ryanalford...@gmail.comwrote: Open the AndroidManifest.xml file. On the Application tab, make sure debuggable is set to true. This tells Android that the app can be debugged on a device. Ryan Sent from my DROID On Jan 19, 2010 4:26 AM, ana antti.iisa...@gmail.com wrote: Hi! Should breakpoints / exception breaking be working when debugging on device using Eclipse? If I place a breakpoint in my code, or add an unhandled exception to code, Eclipse does not break to code when the place is reached. I place the breakpoint by double clicking the code side, and start debugging by pressing F11 and selecting Android Application. How to achieve proper debugging on device? -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en