[android-developers] Problem restoring values after rotation in a custom view (when it is added twice to the layout)
Hi! I have the following problem: I want to write a specialized Date Input view, which basically has a EditText, with button for clearing the input and another button opening a date picker. Thefore I started with writing a ClearableTextView, which extends RelativeLayout. This view only has an EditText and the button for clearing the edit text. Now I implement a ClearableDatePicker which extends the ClearableTextView. It only adds the button for opening the Date Picker. In the layout of the activity I add it using com.test.view.ClearableDatePicker android:id=@id/cdpBirthDate android:hint=@string/tvBirthDate android:padding=3dip android:scrollHorizontally=true / Everything works great until I add a second one and then rotate the device. Now something really strange happens. The value of the second EditText is restored to the first one and the second one is empty. I can't explain this behavior. Does anyone have an idea? Thanks Charlie -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Using Camera and compass
Hello! I have a task what i'm need to do. The App should make a photo and then share it on facebook or twitter, application must have ruler compass with degrees...like in this app: https://play.google.com/store/apps/details?id=com.sourcebt.android.cameracompassfeature=search_result#?t=W251bGwsMSwyLDEsImNvbS5zb3VyY2VidC5hbmRyb2lkLmNhbWVyYWNvbXBhc3MiXQ.. ...Also the application should view all maked photos on a google map. I have a problem with compass ruler like in app in gogle play. How can i do the same?? I have no idea how this can be implemented...If anyone have the same problem or If anyone has any ideas how to do it please help me. Thanks, Charlie. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] forcing slidingDrawer content always in landscape mode
Hallo! My activity contains a Slidingdrawer. How is it possible that the content of the sliding drawer is always in landscape mode, even if the phone is in portrait mode? This means that when the sliding drawer is open the orientation switches to landscape, no matter what the orientation of the phone is. The rest of the activity (apart from the content of the sliding drawer) should behave as normal, when the phone is rotated. Thanks Charlie -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Best practice/difference between @id/ and @+id/
What is a best practise for using ids defined in a separate ids.xml file (and using them with @id/) or adding them dynamically with @+id/. When should I declare them in the ids.xml and when should I simply create them using the +id. Is there a recommendation, guidline or best practise that you can recommend? Thanks Charlie -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Slidingdrawer hides last element of listview.
Hallo! In my activity I have a list view and I want to have a sliding drawer at the bottom of the screen. The handle of the sliding drawer has a solid image and the size of the whole screen width. The problem now is, that the last row of the list is not visible anymore, since it is below the sliding drawer's handle. What is the best solution to solve it. My layout looks as follows: Activity layout: RelativeLayout android:layout_width=fill_parent android:layout_height=fill_parent xmlns:android=http:// schemas.android.com/apk/res/android fragment android:name=test.sample.ListFragment android:layout_width=wrap_content android:layout_height=wrap_content android:id=@+id/listfragment / SlidingDrawer android:id=@+id/slidingdrawer android:layout_width=fill_parent android:layout_height=fill_parent android:handle=@+id/slidingdrawer.handle android:content=@+id/ slidingdrawer.content include android:layout_gravity=bottom android:id=@+id/slidingdrawer.handle layout=@layout/ slidingdrawerhandle / include android:id=@+id/slidingdrawer.content layout=@layout/slidingdrawercontent android:layout_width=fill_parent android:layout_height=fill_parent / /SlidingDrawer /RelativeLayout My Handle Layout: ?xml version=1.0 encoding=utf-8? RelativeLayout android:background=@drawable/handle_background android:layout_width=fill_parent android:layout_height=wrap_content xmlns:android=http://schemas.android.com/apk/res/android; LinearLayout android:layout_gravity=center android:orientation=horizontal android:layout_width=wrap_content android:layout_height=wrap_content android:layout_centerInParent=true TextView android:textSize=14.0sp android:textStyle=bold android:textColor=@android:color/white android:layout_gravity=center_vertical android:layout_width=wrap_content android:layout_height=wrap_content android:text=News android:singleLine=true android:shadowColor=@android:color/ black android:shadowRadius=2.0 / /LinearLayout /RelativeLayout Do you have any idea how I could fix this? Thanks Charlie -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Slidingdrawer hides last element of listview.
Yes, I already tried this. Setting this will make the handle of the sliding drawer disappear and the list takes the full space. Well, now I see everything from the list but the sliding drawer is gone... -- 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] Image manipulation similar to google+ app
Hallo! Looking on the google+ app on the dashboard, I have seen that they display my profile image and draw a blue circle arround it. What is the easiest way to achieve something like this? I want to create an ImageView which contains an image (I'm loading it from the SD Card) and drawing a rectangle as a frame around it. Where should I start looking? Thanks charlie -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] View in Google+ Application
Hallo! Yesterday I installed the Google+ Application (for the Android 2 series) and found a really nice looking view. When you select stream in the dashboard at the top (below the actionbar kind of header) there is some kind of tab replacement (you can switch between nearby, All circles an incoming). Does anyone know what kind of view this is or how I can build something like this? Thanks CHarlie -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] JDK Installation
An environment variable, or add to the PATH, and pointing to what, exactly? From: mailto:iamvijayaku...@gmail.com Sent: Tuesday, June 14, 2011 11:13 PM To: android-developers@googlegroups.com Subject: Re: [android-developers] JDK Installation you have to set environment path. On Tue, Jun 14, 2011 at 11:57 PM, Charles ccha...@gmail.com wrote: When I'm trying to install the Android SDK, I know I have to have a Java SDK installed first. I'm installing jdk-6u26-windows-i586 on an XP platform prior to installing install_r11-windows.exe. I consistently get the error that the JDK is not installed. Has anyone else run into this, and how did you resolve it (if you did)? -- 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 mailto:android-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Nobody can go back and start a new beginning, but anyone can start today and make a new ending - Thanks, Regards, νιנαソαkum@r M BloG:http://iamvijayakumar.blogspot.com/ Mob.No:09048382536(Kerala) Mob.No:09751076707(TN) -- 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] Android MediaPlayer cannot play VoD stream from VLC server
Hi all, Recently I am developing VoD application on Android. I use VLC as the VoD server. I succeed in creating VoD stream with telnet interface. Now the problem is my MediaPlayer class in Android cannot play this VoD stream created. Then I try to use VLC to pick the stream and it works. Does anyone know why? By the way, I have managed to use MediaPlayer to play broadcast stream from VLC. Both broadcast and VoD stream look something like this: rtsp://ip address:port/Test. Anyone please help. Thanks in advance. Charlie -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] apps became empty shells on Nexus One, then flash memory size seems reduced
Hi, I had been happily using my N1 when one night it shut itself down due to the battery running down. After charging it, I turned it back on and found that all of the apps (except those stored on the SD card) had stopped worked, reporting Could not launch the requested activity. Eventually I found that I could uninstall each app and reinstall it, and it would then work. However, I was never able to reinstall all the same I apps I had before this issue, because the flash memory fills up. t's almost as if some of the memory has been lost, or somehow kept from being available. Any ideas about what might have happened, from a developer's standpoint? I am a developer by trade, but know little about Android. How might I investigate this, or even fix it? I'm getting close to resorting to a factory reset, which I assume will clear out all the memory. I already went through and cleared data and cache for most of the apps, and moved what I could to the SD card (it had been that way before, anyway). I'd like to get this fixed of course so I can get back to using all the old apps I had, but I'm also just curious about what in the world happened, as I've been unable to find anyone else on the web describing a similar issue. Thanks for any insight you might have to offer. Hope this is a reasonable place to post this question. I figured experienced Android developers might have the most to say about it. -- 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] Send video through socket and playing problem
Hi all, I have two simple programmes, one server and one mediaplayer client, both at localhost. The problem is I can send byte/text through the socket, but when I try to send a video file, from the sdcard to the socket, the client side mediaplayer cannot play it. Anyone know how to solve this problem? What I send is just first few bytes of the video. Do I need add some packet headers?Thanks. Server: Socket client=serversocket.accept(); System.out.println(accept); //Receive client message. BufferedReader in=new BufferedReader(new InputStreamReader(client.getInputStream())); String str=in.readLine(); System.out.println(read:+str); //Send message to client. //PrintWriter out=new PrintWriter(new BufferedWriter(new OutputStreamWriter(client.getOutputStream())),true); //out.println(server message); FileInputStream fis=new FileInputStream(/sdcard/ toystory3.3gp); byte buffer[]=new byte[2000]; fis.read(buffer,0,20); DataOutputStream out=new DataOutputStream(client.getOutputStream()); out.write(buffer,0,20); in.close(); out.close(); client.close(); System.out.println(close); Client: Socket socket=new Socket(127.0.0.1,); String message=Initial+\r\n; //Send message to server. PrintWriter out=new PrintWriter(new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())),true); out.println(message); //Receive message from server. //BufferedReader br=new BufferedReader(new InputStreamReader(socket.getInputStream())); //String msg=br.readLine(); ParcelFileDescriptor pfd=ParcelFileDescriptor.fromSocket(socket); MediaPlayer m=new MediaPlayer(); m.setDataSource(pfd.getFileDescriptor()); m.prepare(); m.start(); /*if(msg!=null) { System.out.println(Data received.); System.out.println(msg); } else { System.out.println(Data not received.); }*/ out.close(); br.close(); socket.close(); -- 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] Streaming buffer problem
Hi all, I am trying to store the content of a streaming to a buffer array and then a file and try to play from the file. The problem now is the buffer cannot store the input stream. My code is something like this: private void saveStreaming() throws IOException{ InetAddress inetAddress = InetAddress.getByName(IP_ADDR); Socket client = new Socket(inetAddress,5544); InputStream stream = client.getInputStream(); Log.d(TAG,Connection is established...); File temp=File.createTempFile(mediaplayertmp,dat); tempPath=temp.getAbsolutePath(); FileOutputStream out=new FileOutputStream(temp); byte buf[]=new byte[200]; do { Log.d(TAG,stuck here); int numread = stream.read(buf); if(numread=0) break; out.write(buf, 0, numread); }while(true); Log.d(TAG,SO DIFFICULT...I AM DYING...); mMediaPlayer.stop(); stream.close(); out.close(); client.close(); } I check the logcat and the connection to the host post is built and the stuck here information appears only once, followed by the message error (1,-11), then I check the PVMF elements. -11 means PVMFErrTimeout. Does anyone know what does that error mean and how to solve that problem? Many thanks! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Greystripe experiences?
hey - in full disclosure, i'm connected to the company so do not have an unbiased opinion. that being said: 1. i know they do monthly payments. i've never heard of issues with payments. 2. i believe their eCPM is competitive. when asking about eCPM of networks, make sure you take fill rate into account. a really high eCPM with minimal fill can of course be a good bit lower than a decent eCPM on close to 100% fill. that's my 2 biased cents! charlie On Aug 22, 7:22 pm, andfan22 andfa...@gmail.com wrote: Hi all Is anyone using Greystrip for ads within their apps? Care to share experiences? In particular: 1. Any hassles getting payments from them? 2. eCPM comparisons with other ad networks? Many 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] 3g problem with telephony
Hallo! This isn't probably the right group to ask this question, but I haven't found anything else. I have the following problem on my Samsung Galaxy S with Android: as soon as I disable the settings option use only 2G networks to save battery I have no network connection (3G and H is available at my location and provided by the provider - verified it with a Nokia phone) and not even telephony works. Moreover it doesn't even seem to dial when I call somebody. The phone is not reachable, so it doesn't ring when somebody calls. I already tried a reset of the phone, but it didn't help (the thing is that it already worked). Do you have an idea, which settings I messed up? Thanks in advance Charlie -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: BufferedReader(new InputStreamReader(url.openStream())) hangs app when no internet
Check for the status of the network before making the call, and also set a connection timeout in case it drops after/during: http://stuffthathappens.com/blog/2007/09/10/urlopenstream-might-leave-you-hanging/ You might want to look at the Apache HttpClient stuff Android comes with too, you have a much more robust library there that can handle all kinds of things, as opposed to raw URL class and streams. Here is an example of using the HttpClient stuff: http://code.google.com/p/and-bookworm/source/browse/trunk/src/com/totsp/bookworm/data/HttpHelper.java On Jul 7, 2:54 pm, Boozel boozelcl...@gmail.com wrote: I'm trying to get an HTTP response using BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream())); but if no internet connection is present the app hangs here. Can any one give me a way to prevent this? Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: New to android finally leaving Windows !!!
To get started you can use the SDK and the emulators it provides (you don't need a device to dive in, though yes you will want one at some point for further testing). http://developer.android.com/intl/es/guide/index.html You can also buy a developer device: http://android.brightstarcorp.com/index.htm. Honestly though, the dev phone 2, while unlocked (and perfect for ATT) is a bit pricey for the hardware you get. The N1 is a better option IMO: http://www.google.com/phone (there is an ATT version, while they last, but not cheap). That or if your contract is up you can wait a bit and get a subsidized Samsung Captivate: http://www.wired.com/gadgetlab/2010/06/samsung-android-phone-heads-to-att/. Really none of the other ATT phones are very promising (Backflip, etc, shrug). On Jul 7, 1:17 pm, Martin martinj...@gmail.com wrote: I would love to start developing for Android- I am currently on the ATT network. How does one acquire a test device? -- 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] Problem with Quick Search Box: ContentProvider with a custom non-sqlite datasource
Hi, I've been trying to implement a quick search feature to my app Thinking Space this weekend without much success.. I've created a searchable.xml, modified the app's manifest, and created a 'dummy' content provider. My app doesn't use SQLite for data, as the searchable objects are MindMaps that are stored in XML files on the SDCard, so my trouble is with trying to get the Quick Search system to use my dummy content provider. My initial goal is just to have the opened map searchable, with the user's search queries being performed in code against the Java object model of the currently opened MindMap. The problem is, that when the using the Quick Search Box, I can see the search query string arrive at my dummy content provider's query() method, but the main Activity doesn't get it's onCreate() called with a search intent; I suspect that this is because the dummy contentprovider returns Null for the cursor in the query() method, and then the SearchManager assumes there are no results to bother the activity with. Has anyone else had success in utilising the Quick Search Functionality with non-SQLite datastores? Or should I abandon trying to use the Quick Search functionality like this, and implement my own method of doing it? Any help appreciated! Thanks Charlie -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Problem with Quick Search Box: ContentProvider with a custom non-sqlite datasource
Mark (you legend!), thanks for heads up! MatrixCursor looks like just the kind of thing I need :D Cheers Charlie On Jul 3, 8:44 am, Mark Murphy mmur...@commonsware.com wrote: On Sat, Jul 3, 2010 at 3:41 AM, Charlie Chilton power...@gmail.com wrote: The problem is, that when the using the Quick Search Box, I can see the search query string arrive at my dummy content provider's query() method, but the main Activity doesn't get it's onCreate() called with a search intent; I suspect that this is because the dummy contentprovider returns Null for the cursor in the query() method, and then the SearchManager assumes there are no results to bother the activity with. Why are you returning null? Why not return a Cursor (e.g., MatrixCursor) with the results of the query? -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training...At Your Office:http://commonsware.com/training -- 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: Maintaining the state when changing the orientation
http://developer.android.com/intl/de/guide/topics/fundamentals.html#actlife Saving activity state When the system, rather than the user, shuts down an activity to conserve memory, the user may expect to return to the activity and find it in its previous state. To capture that state before the activity is killed, you can implement an onSaveInstanceState() method for the activity. Android calls this method before making the activity vulnerable to being destroyed — that is, before onPause() is called. It passes the method a Bundle object where you can record the dynamic state of the activity as name-value pairs. When the activity is again started, the Bundle is passed both to onCreate() and to a method that's called after onStart(), onRestoreInstanceState(), so that either or both of them can recreate the captured state. Unlike onPause() and the other methods discussed earlier, onSaveInstanceState() and onRestoreInstanceState() are not lifecycle methods. They are not always called. For example, Android calls onSaveInstanceState() before the activity becomes vulnerable to being destroyed by the system, but does not bother calling it when the instance is actually being destroyed by a user action (such as pressing the BACK key). In that case, the user won't expect to return to the activity, so there's no reason to save its state. Because onSaveInstanceState() is not always called, you should use it only to record the transient state of the activity, not to store persistent data. Use onPause() for that purpose instead. http://developer.android.com/intl/de/reference/android/app/Activity.html Configuration Changes If the configuration of the device (as defined by the Resources.Configuration class) changes, then anything displaying a user interface will need to update to match that configuration. Because Activity is the primary mechanism for interacting with the user, it includes special support for handling configuration changes. Unless you specify otherwise, a configuration change (such as a change in screen orientation, language, input devices, etc) will cause your current activity to be destroyed, going through the normal activity lifecycle process of onPause(), onStop(), and onDestroy() as appropriate. If the activity had been in the foreground or visible to the user, once onDestroy() is called in that instance then a new instance of the activity will be created, with whatever savedInstanceState the previous instance had generated from onSaveInstanceState(Bundle). This is done because any application resource, including layout files, can change based on any configuration value. Thus the only safe way to handle a configuration change is to re-retrieve all resources, including layouts, drawables, and strings. Because activities must already know how to save their state and re-create themselves from that state, this is a convenient way to have an activity restart itself with a new configuration. In some special cases, you may want to bypass restarting of your activity based on one or more types of configuration changes. This is done with the android:configChanges attribute in its manifest. For any types of configuration changes you say that you handle there, you will receive a call to your current activity's onConfigurationChanged(Configuration) method instead of being restarted. If a configuration change involves any that you do not handle, however, the activity will still be restarted and onConfigurationChanged(Configuration) will not be called. That should get you going in the right direction. There is also onRetainNonConfigurationInstance (Activity method) but it's not what you should rely on (can be used to optimize), but the basics are the onSaveInstanceState and onRestoreInstanceState methods. On May 13, 4:29 am, Alok Kulkarni kulsu...@gmail.com wrote: I am having an application showing ListItems and Dialog boxes in it.. I want that when i change the orientation from Portrait to landscape mode, i need to maintain the state of the application .. I have seperate XMLs for landscape and portrait mode.. What is the best way to achieve this Thanks , Alok. -- 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 athttp://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] Re: Device Seeding Program for Top Android Market Developers
Mine is scheduled for delivery tomorrow! Derby, UK! -- 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: Reg: Layouts
That sounds like a trick question ;). The best layout depends on the situation you are in, the context. There is no one best for all kind of applications. That said, RelativeLayout is often noted as the most robust layout because it can sometimes be used to replace multiple other types of layouts (still it's not the best all the time). http://android-developers.blogspot.com/2009/10/ui-framework-changes-in-android-16.html One thing I would recommend that not enough people use, regardless of what layouts you are working with, is the layoutopt tool. This is a tool that can help you detect common layout problems and lets you know how to resolve them. http://android-developers.blogspot.com/2009/11/optimize-your-layouts.html On Apr 9, 8:26 am, Santha nsd1...@gmail.com wrote: Hello Everyone, I'm currently looking in to layouts. can anyone tell me which layout is the best layout to be used for all kind of applications. and Why? Thanks in Advance, Santha -- 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 To unsubscribe, reply using remove me as the subject.
[android-developers] Re: Where is the import android.hardware.CameraDevice
Most of the tutorials that use CameraDevice are from ~2007. CameraDevice was around pre-1.0, I believe. Currently you would use the Camera class and the callbacks around it, etc.: http://developer.android.com/reference/android/hardware/Camera.html. Here is a more recent tutorial (no idea if it's any good, just noticed the date and that it uses Camera): http://www.brighthub.com/mobile/google-android/articles/43414.aspx. On Apr 9, 1:14 am, saikiran n saikiran@gmail.com wrote: Hi , Iam trying to implement camera application in android. In several sites they used import android.hardware.CameraDevice; But when iam doing same import it is giving me error that it can't be resolved. In which sdk the CameraDevice class is defined. I tried 1.1,1.5,2.0,2.1 but it was not there Please help me Regards, Saikiran -- 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 To unsubscribe, reply using remove me as the subject.
[android-developers] Re: Device Seeding Program for Top Android Market Developers
Saturday will be 4 weeks for me aswell. I'm kind of glad in a way that it hasn't come yet as I am away from the address it will be delivered at! Do you know if FedEx can re-route packages to a different address if I am not in? I am in the UK too (Derby) On Mar 31, 1:52 pm, David Scott dar...@googlemail.com wrote: It seems no one has got anything outside of the US / Canada, so it's not a problem with just a few people, it's everyone. I'm in the UK and 2-4 weeks would be Saturday for me. If they are being sent from the US you have to expect them to take longer. If they are coming from the EU though, it shouldn't take much longer. I'm pretty certain the 2-4 weeks estimate only applied to the US though, as per most things... I doubt Google will have any information so it's just playing the waiting game. On Mar 31, 12:36 pm, Richard rtaylor...@googlemail.com wrote: Okay, thanks. I guess I'll email them when the time comes around... I know we shouldn't really complain - we are getting these phones for free. But if they say 2-4 weeks and it's not there, I feel like maybe the dispatchers are being a little careless - maybe even lost some orders. Also Thomas: I get two emails everytime I post on this group, one from dreamhost.com and another from naver.com - in (what I guess is) Japanese. Very strange. On Mar 31, 12:28 pm, Thomas Riley tomrile...@googlemail.com wrote: I quoted the 4 week contact thing from the original FAQ http://sites.google.com/site/developermarketandroidgiveaway/faq And glad i'm not the only one getting these annoying emails! It's extremely strange... On Mar 31, 12:24 pm, Richard rtaylor...@googlemail.com wrote: That happens to me Thomas - when I post anything on this group. I'm in the UK, and I've just checked with FedEx. They have nothing dispatched to me in the last 2 weeks. Can anyone confirm that it's FedEx in Europe too? Where does it say in your confirmation email to notify them if it hasn't arrived within 4 weeks? Mine simply says: If you need to make any changes to your information above, please contact us at android-market-seed...@google.com as soon as possible. Otherwise, you should receive your phone in 2-4 weeks! That 4 weeks expires on Friday, and considering FedEx have nothing dispatched yet - that's unlikely to happen. Thanks, Richard On Mar 31, 12:10 pm, Thomas Riley tomrile...@googlemail.com wrote: What's also annoying me if everytime I post on this thread I get this email! We're sorry.. your email was unable to be processed by our automatic support system, and so is being returned to you. We could not find your email address in our customer database and so couldn't accept your email. Due to the HUGE volume of spam we receive at this address, we've been forced to implement this new policy. Therefore, please just re-submit your message at: http://www.dreamhost.com/contact.cgi All messages submitted through that form are guaranteed to be received, even if you aren't currently a customer! Our apologies for the inconvenience, -- The Happy DreamHost Support Team! Argh, whats going on! On Mar 31, 12:07 pm, Thomas Riley tomrile...@googlemail.com wrote: Serious though, the FAQ says Please allow 2-4 weeks from the date of submission of the form for delivery of the phone. If you do not receive the phone within that timeframe, please send an email to android-market-seed...@google.com. Do we just need to wait, or is it worth contacting? I'm not really bothered about waiting, but since FedEx have no pending deliveries in their system for me I makes me thinks a mistake has been made at Brightpoints/Brightstars end! On Mar 31, 10:30 am, David Horn pga...@gmail.com wrote: Do as I say, not as I do etc. ;-) On Mar 30, 11:57 pm, Thomas Riley tomrile...@googlemail.com wrote: Yes David I would suggest that you wait until after the deadline before whining- uh, asking where it is. ;-) On Mar 30, 10:53 pm, David Horn pga...@gmail.com wrote: It looks to me like the system sent out US Nexus's first, then US Droids, and hopefully us EU yokels will get a Nexus later this week. I say hopefully, as I launched into a bit of an attack on someone whose phone hadn't turned up with 2 days of the deadline to run; and now I'm in that situation with a few days off work flinching every time a van goes past the house and wishing Google would hurry up. Has anyone tried phoning Brightpoint to ask what the plan is? Dave. On Mar 30, 10:47 pm, Breezy mbre...@gmail.com wrote:
[android-developers] Re: Update SQLite Database from other app
The applications are in different processes, with different permissions (by default, you can work around that but you don't want to). So the answer is no, not directly, but as the other post here stated, that is exactly what a ContentProvider is for. http://developer.android.com/guide/topics/providers/content-providers.html On Jan 25, 10:17 pm, David Toledo dtole...@gmail.com wrote: Hi All Is possible update the records from SQLite from my Android Application1 from other Application2 Android Thanks David -- 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 the contents of an array
If your array is not too large, I agree with theSmith, using SharedPreferences is very easy if you are not sure about how to use other data storage approaches. If you store it as a String you could then parse it and rebuild the array. If you have a lot of data, you might want to go ahead and check out using a database. Here is a quick database example I wrote recently, in case it helps: http://www.screaming-penguin.com/node/7742. Also, here are some examples of writing and reading to files: http://unlocking-android.googlecode.com/svn/chapter5/trunk/FileStorage/src/com/msi/manning/chapter5/filestorage/. See CreateFile for writing to a file, and ReadFile for reading the data back. These are a bit simplified, and the process is pretty raw, but the concepts are there. HTH On Jan 19, 8:25 pm, Jeffrey jeffisagen...@gmail.com wrote: How do I save the contents of an array to a file and then read it again later? I have a small amount of data that will need to be stored and since I have no idea where to start on using a SQLite database, I think this will work a lot better. -- 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: is AndroidHttpClient deprecated?
Android began including HttpClient 4 around version 1.1 or so. The org.apache.http package is usually the one you will want for HTTP (java.net is still available, but that is a much lower level). http://developer.android.com/reference/org/apache/http/package-summary.html On Jan 19, 12:26 am, eli sweehoe.l...@gmail.com wrote: Are most of the classes in android.net.http.* deprecated? There is no javadoc except for SslCertificate and SslError but most classes are still in the sdk? Can I still use it or java.net.* is the way to go? -- 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: Building APPS that require an online database
You might have to narrow that down and be more specific to get a focused response. On Dec 16, 12:44 pm, rohitspage rohitsp...@gmail.com wrote: Hi! Folks I am looking for a free SAAS provider that I could use to accomplish the following. a. CRUD data using webservices or someother compatible mechanism. Any ideas would be great. -- 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: Start SDK Emulator fail!
The Android SDK is currently version r04 (the modular one). Try the latest instructions with the latest versions. http://developer.android.com/sdk/index.html#quickstart If you get failures, check the logcat output with the IDE view (using Eclipse?) or with adb. On Dec 15, 10:46 pm, Ph4nut ph4...@gmail.com wrote: Hi,every one! I am new here! I did download the Android SDK 1.3r and Java SE SDK6,after install the two successfully,I execute the emulator and it did not start up,it can only process to the step,and it appears the flashing word Android,and stop here... now what can i do? any idea? -- 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: Installing Apps on Acer Netbook Running Android
The answer is here: http://www.aspireoneuser.com/forum/viewtopic.php?f=90t=19016 On Dec 7, 8:37 am, Charlie charles.l...@gmail.com wrote: I have an Acer Aspire netbook which dual boots Android and XP. I am trying to figure out how to (1) look at the file system (with a file manager type of interface), and (2) install an app on it (specifically one that I am developing). It seems like all this should be obvious, but the netbook isn't something that I can just hook up to my SDK using USB so apps don't install on it the same way that they do on (say) a Droid. The environment seems to be relatively closed compared to other devices. Maybe there is a way to ssh into it over the network? Thanks for any 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] Installing Apps on Acer Netbook Running Android
I have an Acer Aspire netbook which dual boots Android and XP. I am trying to figure out how to (1) look at the file system (with a file manager type of interface), and (2) install an app on it (specifically one that I am developing). It seems like all this should be obvious, but the netbook isn't something that I can just hook up to my SDK using USB so apps don't install on it the same way that they do on (say) a Droid. The environment seems to be relatively closed compared to other devices. Maybe there is a way to ssh into it over the network? Thanks for any 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: J2EE client on Android
Depends what you mean by J2EE client. A client could be just a web browser (Servlets and JSP are part of the JEE spec). You might mean more along the lines of a SOAP or JMS client or such though (which also can be done, not that they *should* be done, but can be). You need to clarify this quite a bit before anybody can really try to help you. On Dec 2, 2:55 am, Bruce Xia bruce.xi...@gmail.com wrote: is there a way to port or implement a J2EE client on android? Does anybody have example code please? -- 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: Building cupcake for G1
http://source.android.com/documentation/building-for-dream On Dec 1, 7:36 am, Bytes toyvenu.t...@gmail.com wrote: Hi, I've G1 dev phone. Earlier I upgraded it to 1.5 using HTC website. Now I want to customize (make some changes to ) source code and keep the changes running on G1 phone. I wanna go with cupcake release. Could any body please give me some pointers. If I download cupcake source code from android website and do 'make' for which target it will generate the images ??? [Emulator or G1 phone etc.,] regards -Bytes. -- 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: Https client in Android
It should be as simple as gjs notes there, assuming you are using HttpClient (the org.apache.http packages). Here are some examples that are a bit older (from Android 1.1 timeframe), but still work and should give you an idea of it: http://unlocking-android.googlecode.com/svn/chapter6/trunk/NetworkExplorer/src/com/msi/manning/network/. HTH On Nov 30, 8:00 am, JITU meet2...@gmail.com wrote: Can you provide some sample code... so that i can test. Regards, jit On Nov 30, 5:43 pm, gjs garyjamessi...@gmail.com wrote: Hi, Yes https is supported, just change your request from http to https. Regards On Nov 30, 3:49 pm, Nithin nithin.war...@gmail.com wrote: Hi, I also want to know whether Android support Https. Thanks On Nov 30, 9:20 am, JITU meet2...@gmail.com wrote: Hi All, Is android supports https ? Objective: Sending a xml file over https to a web server. The GET and POST is working fine with HTTP, but i don't have any idea regarding https. It will be great if some sample code can provide me. Regards, jit -- 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: help me pliiiiiz
Context has a setWallpaper method: http://developer.android.com/reference/android/content/Context.html#setWallpaper%28java.io.InputStream%29. An example of it in use (look for SetWallpaperTask): http://code.google.com/p/apps-for-android/source/browse/trunk/Photostream/src/com/google/android/photostream/ViewPhotoActivity.java On Oct 27, 5:08 am, iori baallal.abderra...@gmail.com wrote: hello every body,im trying to change the system wallpaper,i have tried a lot of solution but without any result; please i want have a simple code to do it thanks a lot --~--~-~--~~~---~--~~ 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: help me pliiiiiz
Sorry, also just noticed that for API level 5 and above there is newer WallpaperManager. http://developer.android.com/reference/android/app/WallpaperManager.html On Oct 27, 5:08 am, iori baallal.abderra...@gmail.com wrote: hello every body,im trying to change the system wallpaper,i have tried a lot of solution but without any result; please i want have a simple code to do it thanks a lot --~--~-~--~~~---~--~~ 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 did you localize your app?
Hi, I'm relying on volunteers to translate my app (Thinking Space) via email. Managing the translations this way is difficult and slow, many people offer to translate, however get scared off once they get the XML files. I would like to use something like launchpad (https://launchpad.net/ ) to provide an online portal for people to submit their translations to. This would be ideal! However, since my app isn't open source, I would need a $$$ commercial launchpad license to do this with :-/ Another option that could work is to set up a Pootle server (http:// translate.sourceforge.net/wiki/pootle/index) If your question on 'Impact on downloads' refers to the number of downloads increasing, then no.. If it refers to the overall size of the download, I've just done a very quick test, APK size with just english: 398KB, APK size with english + 5 translations: 474KB. (For reference, the size of my english/default 'values' folder is 45KB) Hope this helps! Charlie On Oct 12, 2:39 pm, Jason Van Anden jason.van.an...@gmail.com wrote: How have non-multilingual indy devs gone about translating their apps for different languages? I don't mean how do you localize ... I mean, how did you get translation done (paid, bartered, online translator, ...)? Did you notice an impact on downloads? Jason Van Anden --~--~-~--~~~---~--~~ 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: Tut (SDK 1.5) Get google account of user
Hi, I've managed to get this to work for Google App Engine by specifying ah for the service parameter, for example : GoogleLoginServiceHelper.getCredentials(this, 54321, null, GoogleLoginServiceConstants.REQUIRE_GOOGLE, ah, false); This also requires permission: com.google.android.googleapps.permission.GOOGLE_AUTH.ah I don't like having to use undocumented API's, but I suppose it's better than the alternative of having the user to enter their username and password. Charlie On 10 Sep, 07:24, kostmo kos...@gmal.com wrote: been investigating whether GoogleLoginService can subsan substitute fo tLogin (seehttp://code//code.goog/apis/accounts/docs/ AuthForInstalledApps.html) on Google App Engine. To use ClientLogin, I solicit the usehe usernameassword from theom the u in a dialog and exchange them on the Google server (https:// www.google.com/accounts/ClientLogin) for a 203-character string called Auth. This Auth string can can be exchanxchafor a cookie on the application server (http://myapp.appspot.com/_ah/login?auth=...). The Value of this obtained cookie is a 460-character string. The cookie can be used from then on to maintain the user session. I was able to obtain the authtoken, aka SID, using the Ge GooglnService method described ibed in this threade authtoken obtained through this meis method happened to be 203 characters. I was hoping that the authtoken might be substituted for the the Aut string in the ClientLogin procerocethus bypassing the the need toicit the username/password. Sadly, this appears nrs not t the case. ClientLogin returns a 500 Server Error ror rather tthe 204 I usually get with a good login. So unless anyone out there is ais awto the contrary, my conclusion is that you must prompt the user for their password if you want an authenticated App Engine session. --~--~-~--~~~---~--~~ 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: Sending email with Apache commons
You are trying to use classes that the Android platform simply doesn't support (see the nice error message - in this case it's very informative). In your case javax.naming from JNDI which is a core class is not present, but regardless, not every java library runs or is supported on Android (not everything that runs in a standalone application which probably means desktop or server VM). If you want to send email you might want to consider using an Intent and going through the mailer UI so the user knows what's happening, or if you want to do it programmatically it's purported that JavaMail works without any porting (to use commons-email you will have to port the parts Android doesn't support, that is, modify it to work with Android). See this thread for more info: http://groups.google.com/group/android-developers/browse_thread/thread/c58d75c1ccfe598b/ On Sep 16, 8:15 am, Isuru danagalle iisuru@gmail.com wrote: Hi All, I am trying a simple send mail application using apache commons library.Here is the code. The email sending code is working fine in a standalone application.However when I try to run it as android application it gave following error message. trouble processing javax/naming/AuthenticationException.class: [2009-09-17 05:33:20 - Commons] Attempt to include a core VM class in something other than a core library. It is likely that you have attempted to include the core library from a desktop virtual machine into an application, which will most assuredly not work. If you really intend to build a core library -- which is only appropriate as part of creating a full virtual machine binary, as opposed to compiling an application -- then use the --core-library option to suppress this error message. If you go ahead and use --core-library but are in fact building an application, then please be aware that your build will still fail at some point; you will simply be denied the pleasure of reading this helpful error message. [2009-09-17 05:33:20 - Commons] 1 error; aborting [2009-09-17 05:33:20 - Commons] Conversion to Dalvik format failed with error 1 I have added mail.jar,commons jars and jndi.jar to the references of eclipse If anybody know a resolution please let me know. *public* *void* onClick(View view) { String[] recipients = {recei...@gmail.com}; SimpleEmail email = *new* SimpleEmail(); email.addTo(sam...@gmail.com, John Doe); email.addTo(sam...@gmail.com, John Doe); email.setAuthentication(andr...@gmail.com, android); email.setHostName(smtp.gmail.com); email.setDebug(*true*); email.setSmtpPort(465); email.setSSL(*true*); *for* (*int* i = 0; i recipients.length; i++) { email.addTo(recipients[i]); } email.setFrom(sen...@gmail.com, Me); email.setSubject(Test message); email.setMsg(This is a simple test of commons-email); email.send(); Thanks Regards, Isuru --~--~-~--~~~---~--~~ 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: Hmm... at last ADC2 is out of our way ... tell about your app and experience
Hi, I've entered my labour of love for the last 3 months, Thinking Space Category: Productivity/Tools Thinking Space is a Mind Mapping app for Android heres a screen shot of the welcome map: http://homepages.nildram.co.uk/~bakachu/screenshot.png Its on the market too: http://www.cyrket.com/package/net.thinkingspace I couldn't help but add '1 more feature' right until the last minute! Having to code this app in my free time, and around my 2 year old daughter was challenging and exhausting! There were times I was still up at 1am on a weekday (bloodstream saturated with caffeine, eye lids held open by toothpicks) absolutely determined to get the layout code working correctly before I went to bed (this almost broke me on two occasions, but I got it cracked the 3rd time!) Now the deadline has passed, I'm just having week off the coding and remembering what its like to have your brain running in 'neutral gear' (and, my wife will go mental if I start coding again like I was doing :) --~--~-~--~~~---~--~~ 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: Can't find file with OpenFile
Window-Show View-Android-File Explorer Or you can use the DDMS file explorer: http://developer.android.com/guide/developing/tools/ddms.html. Or you can use adb shell to connect and browse around manually (ls / data/data - for example): http://developer.android.com/guide/developing/tools/adb.html. On Jul 27, 11:52 am, Lorenz lorenzoteod...@gmail.com wrote: Any idea? On 27 Lug, 17:31, Lorenz lorenzoteod...@gmail.com wrote: Sorry guys, but Ican'tfindthe folder /data..I use Eclipse and type: file-openFile but i'm unable tofind/data/data/myfile.. How can I do in eclipse tofindit? On 27 Lug, 17:19, Charlie Collins charlie.coll...@gmail.com wrote: I didn't see Mark's reply before I posted mine, sorry. As always, Mark is on top of this group ;). On Jul 27, 11:16 am, Charlie Collins charlie.coll...@gmail.com wrote: Files created with Context.openFileOutput are in the context they were created in. 99% of the time you don't really care what that physical location is, you just retrieve the same file using the name with Context.openFileInput. If memory serves the actual physical location is /data/data/ package_name/, or somewhere nearby. You can use the ADB or the Eclipse plugin file browser to browse around andfindthe exact location. The reason this is usually irrelevant though, is the permissions will only be set for the application that stored it, youcan'taccess it from other apps anyway (not if created with openFileOutput). On Jul 27, 10:51 am, Lorenz lorenzoteod...@gmail.com wrote: Hi, I've a problem with method openFileOutput(), Ican'tfindthe file or the directory where the file is stored..the code is: import java.io.BufferedWriter; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; import java.io.PrintWriter; import android.app.Activity; import android.app.AlertDialog; import android.content.Context; import android.os.Bundle; import java.io.*; import java.net.*; import java.util.NoSuchElementException; import java.util.Scanner; public class C extends Activity { /** Called when the activity is first created. */ private PrintWriter savedpoint; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); try{ savedpoint = new PrintWriter(openFileOutput (Data.dat,MODE_APPEND)); for(int i=0;i20;i++) { savedpoint.println(-78.443221+i+ +120.344423+i); } }catch (FileNotFoundException e) { e.printStackTrace(); } } } and the manifest is: ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=prova.client android:versionCode=1 android:versionName=1.0 application android:icon=@drawable/icon android:label=@string/ app_name activity android:name=.C android:label=@string/app_name intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity /application uses-sdk android:minSdkVersion=3 / /manifest Any idea?where can Ifindthe directory where is stored the file? thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Can't find file with OpenFile
Files created with Context.openFileOutput are in the context they were created in. 99% of the time you don't really care what that physical location is, you just retrieve the same file using the name with Context.openFileInput. If memory serves the actual physical location is /data/data/ package_name/, or somewhere nearby. You can use the ADB or the Eclipse plugin file browser to browse around and find the exact location. The reason this is usually irrelevant though, is the permissions will only be set for the application that stored it, you can't access it from other apps anyway (not if created with openFileOutput). On Jul 27, 10:51 am, Lorenz lorenzoteod...@gmail.com wrote: Hi, I've a problem with method openFileOutput(), I can't find the file or the directory where the file is stored..the code is: import java.io.BufferedWriter; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; import java.io.PrintWriter; import android.app.Activity; import android.app.AlertDialog; import android.content.Context; import android.os.Bundle; import java.io.*; import java.net.*; import java.util.NoSuchElementException; import java.util.Scanner; public class C extends Activity { /** Called when the activity is first created. */ private PrintWriter savedpoint; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); try{ savedpoint = new PrintWriter(openFileOutput (Data.dat,MODE_APPEND)); for(int i=0;i20;i++) { savedpoint.println(-78.443221+i+ +120.344423+i); } }catch (FileNotFoundException e) { e.printStackTrace(); } } } and the manifest is: ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=prova.client android:versionCode=1 android:versionName=1.0 application android:icon=@drawable/icon android:label=@string/ app_name activity android:name=.C android:label=@string/app_name intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity /application uses-sdk android:minSdkVersion=3 / /manifest Any idea?where can I find the directory where is stored the file? thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Can't find file with OpenFile
I didn't see Mark's reply before I posted mine, sorry. As always, Mark is on top of this group ;). On Jul 27, 11:16 am, Charlie Collins charlie.coll...@gmail.com wrote: Files created with Context.openFileOutput are in the context they were created in. 99% of the time you don't really care what that physical location is, you just retrieve the same file using the name with Context.openFileInput. If memory serves the actual physical location is /data/data/ package_name/, or somewhere nearby. You can use the ADB or the Eclipse plugin file browser to browse around and find the exact location. The reason this is usually irrelevant though, is the permissions will only be set for the application that stored it, you can't access it from other apps anyway (not if created with openFileOutput). On Jul 27, 10:51 am, Lorenz lorenzoteod...@gmail.com wrote: Hi, I've a problem with method openFileOutput(), I can't find the file or the directory where the file is stored..the code is: import java.io.BufferedWriter; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; import java.io.PrintWriter; import android.app.Activity; import android.app.AlertDialog; import android.content.Context; import android.os.Bundle; import java.io.*; import java.net.*; import java.util.NoSuchElementException; import java.util.Scanner; public class C extends Activity { /** Called when the activity is first created. */ private PrintWriter savedpoint; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); try{ savedpoint = new PrintWriter(openFileOutput (Data.dat,MODE_APPEND)); for(int i=0;i20;i++) { savedpoint.println(-78.443221+i+ +120.344423+i); } }catch (FileNotFoundException e) { e.printStackTrace(); } } } and the manifest is: ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=prova.client android:versionCode=1 android:versionName=1.0 application android:icon=@drawable/icon android:label=@string/ app_name activity android:name=.C android:label=@string/app_name intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity /application uses-sdk android:minSdkVersion=3 / /manifest Any idea?where can I find the directory where is stored the file? thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Create custom mime type handler
http://developer.android.com/guide/topics/providers/content-providers.html To use your content provider, you just declare Intents with the data type you want: http://developer.android.com/guide/topics/intents/intents-filters.html. Meaning, register an Intent that handles your content type. On Jul 22, 5:39 am, BouHu petrov@gmail.com wrote: Hello. I need to create a handler for the files with custom MIME type, e.g. *.my_type. Could anybody please provide me with the detailed tutorial how to archive it? As far as i understand, i need to create a custom content provider to take care about my type object storage, so i can handle the queries to get some data about files, e.g. it's path. But i don't know how to make the system to call my Activity to react on VIEW action for specific type. Thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Maven Android Plugin: stable version 2.0.0 released
I haven't used this yet, but will try to take a look soon. Just wanted to say thanks for putting this out though. I know android- maven is deprecated (already), and I am not sure how far Masa has gotten. Having a solid and well supported Maven plugin for droid will be essential going forward, thanks again. On Jul 16, 11:45 am, Hugo Josefson h...@josefson.org wrote: For those of you who like to use Maven for application development, there is now a much improved Maven Android Plugin available. Version 2.0.0 was released yesterday. It lets you focus on programming, and takes care of compiling the apk for you. It generates R.java, Java files from aidl files and more. It even autodetects instrumentation test classes and runs them on device. Sample projects for using these features are available. http://code.google.com/p/maven-android-plugin/ Maven Android Plugin is a new project, originally based on Masa, but has since received numerous improvements in terms of bugfixing, features and ease-of-use. It has gone through a number of test releases, and is now quite stable and ready for mass consumption. Some of the new features include: * Dynamic detection and support for Android SDK versions 1.1 -- 1.5r2 and beyond. * No need to double-configure parameters in the pom if the plugin can read them from somewhere else, for example from your AndroidManifest.xml of even from inside binary apk files. * No pluginRepository config necessary - we're published on Maven Central servers. New features will be added during the 2.x series, but none that will break backwards compatibility. You should feel safe in starting to use it right now! Go ahead --http://code.google.com/p/maven-android-plugin/ /Hugo --~--~-~--~~~---~--~~ 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: Networking with the Android Emulator.
I think a lot of this stuff, though not all, is covered in the docs - http://developer.android.com/guide/developing/tools/emulator.html#emulatornetworking. If you have already seen that, I apologize, but if not, it's a good starting point for how the emul networking is configured, how to redirect, how to connect different emul instances, and how the routing is done. All of that relates, at least in part, to all 3 of your questions. Try giving that a look (if you haven't already). On Jul 16, 7:06 am, Mani mani.on.gt...@gmail.com wrote: All : Currently , when i launch the Android Emulator , it creates a Virtual eth0 interface and assigns the IP Address 10.0.2.15 to it . It also has a Host Loop Back address 10.0.2.2 which is nothing but the alias to the PC Loop Back address 127.0.0.1 . Now , if i am running the Anrdroid Emulator on a PC , containing the IP address, say, 192.168.11.2 and another Machine-A is connected to the Same LAN , and contains the IP address , say , 192.168.11.14. Q1 - How does the Client process running in Android space communicate with server process running on Machine-A ( 192.168.11.14 ) ? I assume the packet flow as Android eth0 ( 10.0.2.15) --- Android host loopback ( 10.0.2.2) --- PC Loopback ( 127.0.0.1) --- PC eth0 ( 192.168.11.2) Machine-A ( 192.168.11.14) Can you kindly let me know if this is correct ? if so , how is packet flowing from PC Loopback to PC eth0 ? if not , how exactly is the packet flowing ? Q2 - How exactly is the virtual eth0 interface created in the android Emulator, what API's are used ? . If i want to create a eth1 interface and assign some IP Address to virtual eth1 and then be able to use eth1 interface to send a Packet to Machine-A . How can i acheive it Q3 - How is the Android Router ( with IP Address 10.0.2.1) used ? Can you Kindly Provide any links , that would provide these information , on how to work with the Android Virtual network Thanks Mani --~--~-~--~~~---~--~~ 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: changing orientation resets activity?
That is intentional. http://developer.android.com/reference/android/app/Activity.html Unless you specify otherwise, a configuration change (such as a change in screen orientation, language, input devices, etc) will cause your current activity to be destroyed, going through the normal activity lifecycle process of onPause(), onStop(), and onDestroy() as appropriate. If the activity had been in the foreground or visible to the user, once onDestroy() is called in that instance then a new instance of the activity will be created, with whatever savedInstanceState the previous instance had generated from onSaveInstanceState(Bundle). Have a look at onSaveInstanceState and onRestoreInstanceState - you should set your state that way. StackOverflow has a good example of it - http://stackoverflow.com/questions/151777/how-do-i-save-an-android-applications-state. On Jul 7, 3:40 pm, schwiz sch...@gmail.com wrote: So I finally got to the point where I was ready to deploy my app to my G1 and test it out and the first thing I noticed was that when I change my phone to landscape view my main activity restarts and resets all of my variables to their default settings. How can I avoid 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: Connect to a SQL Database
In general you don't want to do that - connect directly to your SQL server from Android. If your Android device is on the same subnet, and you configure host resolution and port access, you *might* be able to do that, I have never really thought to try, but it's certainly not the normal path. Normally, you will want a server side API, like REST or such, that you can call from Android using HTTP or something. That way your device can connect to your server side API and it doesn't need to know anything about it being a SQLServer (the abstraction is at a different level), and it will work regardless of whether or not you are on the same subnet. Have a look at a REST implementation for your favorite server side language (Jersey for Java, whatever for .net, etc) and create a simple server side for your Android app to connect to, and try that. On Jul 7, 7:18 am, AntoniMG tonio...@gmail.com wrote: Hi, Im triying to connect to a SQL Database with Android, this is my code: package com.example.conversor; import java.sql.*; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; [...] try { Class.forName(com.microsoft.sqlserver.jdbc.SQLServerDriver);} catch (Exception e) { e.printStackTrace(); } try { DBConnSQL = DriverManager.getConnection(jdbc:sqlserver://zeus: 1433;DatabaseName=dsnew;,sa,sapass);} catch (Exception e) { e.printStackTrace(); } And this is what i get: 07-07 11:16:27.450: ERROR/jdwp(1597): Failed sending reply to debugger: Broken pipe 07-07 11:16:29.832: ERROR/dalvikvm(1605): Could not find class 'javax.sql.XAConnection', referenced from method com.microsoft.sqlserver.jdbc.SQLServerConnection.close 07-07 11:16:29.931: ERROR/AndroidRuntime(1605): Uncaught handler: thread main exiting due to uncaught exception 07-07 11:16:29.983: ERROR/AndroidRuntime(1605): java.lang.VerifyError: com.microsoft.sqlserver.jdbc.SQLServerConnection 07-07 11:16:29.983: ERROR/AndroidRuntime(1605): at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source) 07-07 11:16:29.983: ERROR/AndroidRuntime(1605): at java.sql.DriverManager.getConnection(DriverManager.java:192) 07-07 11:16:29.983: ERROR/AndroidRuntime(1605): at java.sql.DriverManager.getConnection(DriverManager.java:228) 07-07 11:16:29.983: ERROR/AndroidRuntime(1605): at com.example.conversor.ConversorAct.onCreate(ConversorAct.java:39) 07-07 11:16:29.983: ERROR/AndroidRuntime(1605): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java: 1123) 07-07 11:16:29.983: ERROR/AndroidRuntime(1605): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2231) 07-07 11:16:29.983: ERROR/AndroidRuntime(1605): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2284) 07-07 11:16:29.983: ERROR/AndroidRuntime(1605): at android.app.ActivityThread.access$1800(ActivityThread.java:112) 07-07 11:16:29.983: ERROR/AndroidRuntime(1605): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692) 07-07 11:16:29.983: ERROR/AndroidRuntime(1605): at android.os.Handler.dispatchMessage(Handler.java:99) 07-07 11:16:29.983: ERROR/AndroidRuntime(1605): at android.os.Looper.loop(Looper.java:123) 07-07 11:16:29.983: ERROR/AndroidRuntime(1605): at android.app.ActivityThread.main(ActivityThread.java:3948) 07-07 11:16:29.983: ERROR/AndroidRuntime(1605): at java.lang.reflect.Method.invokeNative(Native Method) 07-07 11:16:29.983: ERROR/AndroidRuntime(1605): at java.lang.reflect.Method.invoke(Method.java:521) 07-07 11:16:29.983: ERROR/AndroidRuntime(1605): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:782) 07-07 11:16:29.983: ERROR/AndroidRuntime(1605): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540) 07-07 11:16:29.983: ERROR/AndroidRuntime(1605): at dalvik.system.NativeStart.main(Native Method) SQL Server is correctly installaed and configured, and receiving Querys from other app. Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: uploads disabled
I haven't heard any official stance on this, but I would imagine there are security concerns, and then other technical hurdles on this front (having a file browser, and then which files each activity has access to). There is an open issue you can comment on and or follow - http://code.google.com/p/android/issues/detail?id=2519. It's not the same, but I have seen people complain about being able to upload a picture or video or such, and in general you can still do that with the Intent.ACTION_SEND and the correct mime type. This adds your Activity to the list when someone selects share from the gallery, and so on, but it's not the same as the upload button from a browser for a web form. The browser thing is disabled, at least for now. Any more insight on this from the Android team would be great though - set the record straight for us (will it be enabled at some point, and what are the issues, etc). On Jul 7, 11:01 am, dsurround dsurro...@gmail.com wrote: This problem in the browser has been written about for months, with no response anywhere. Some of the threads just stop, but the problem is still there. Can anyone shed some light on how to workaround the problem in the browser when a web site allows for files (pictures, etc) to be uploaded, but when done through the g1 browser, the button says uploads disabled. Would appreciate any guidance at all. 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] SOAP envelop not being created for response from seam server
Hi Guys, I am trying to connect to webservices in jboss(using seam) from a google android phone. So far, I implemented all the necessary beans and android classes. Unfortunately, I am getting an exception on the server side after the request is dispatched from the android emulator, java.lang.IllegalArgumentException: Cannot create SOAP envelope from: methodCall. I have tried everything I can but to no success. On the other hand, when I try to connect to the service from SOAP UI, everything works great. Please if you have any clue, help! Thanks a lot in advance. Interface [code] package de.iu.soko.web.webservice; import javax.ejb.Remote; @Remote public interface SokoServiceRemote { public String hello(); } [/code] Stateless Web Service Facade [code] package de.iu.soko.web.webservice; import javax.ejb.Stateless; import javax.jws.WebMethod; import javax.jws.WebService; import javax.jws.soap.SOAPBinding; import org.jboss.seam.annotations.In; import org.jboss.seam.annotations.Name; import org.jboss.seam.contexts.Contexts; import org.jboss.seam.security.Identity; @Stateless @WebService(name = SokoService, serviceName = SokoService) @SOAPBinding(style = SOAPBinding.Style.RPC) @Name(sokoServiceCallHandler) public class SokoService implements SokoServiceRemote { @Logger private Log log; @In(required=true) Identity identity; @WebMethod public String hello(){ return Hello from a seam component; } } [/code] standard-ws-config xml file [code][/code] jaxws-config xmlns=urn:jboss:jaxws-config:2.0 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:javaee=http://java.sun.com/xml/ns/javaee; xsi:schemaLocation=urn:jboss:jaxws-config:2.0 jaxws-config_2_0.xsd endpoint-config config-nameSeam WebService Endpoint/config-name pre-handler-chains javaee:handler-chain javaee:protocol-bindings##SOAP11_HTTP /javaee:protocol-bindings javaee:handler javaee:handler-nameSOAP Request Handler/javaee:handler-name javaee:handler- classorg.jboss.seam.webservice.SOAPRequestHandler /javaee:handler-class /javaee:handler /javaee:handler-chain /pre-handler-chains /endpoint-config /jaxws-config entries in web.xml [code][/code] filter filter-nameSeam Context Filter/filter-name filter-classorg.jboss.seam.web.ContextFilter/filter-class /filter filter-mapping filter-nameSeam Context Filter/filter-name url-pattern/test/url-pattern /filter-mapping servlet-mapping servlet-nameAndroidService/servlet-name url-pattern/androidService/url-pattern /servlet-mapping servlet servlet-nameAndroidService/servlet-name servlet-classde.iu.soko.web.webservice.SokoService/servlet-class /servlet SOAP UI request [code] POST http://sylar:8080/soko-web/androidService?wsdl HTTP/1.1 Content-Type: text/xml;charset=UTF-8 SOAPAction: User-Agent: Jakarta Commons-HttpClient/3.1 Host: sylar:8080 Content-Length: 219 soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/ envelope/ xmlns:web=http://webservice.web.soko.iu.de/; soapenv:Header/ soapenv:Body web:hello/ /soapenv:Body /soapenv:Envelope [/code] SOAP UI Response [code] env:Envelope xmlns:env=http://schemas.xmlsoap.org/soap/envelope/; env:Header seam:conversationId xmlns:seam=http://www.jboss.org/seam/ webservice21/seam:conversationId /env:Header env:Body web:helloResponse xmlns:web=http:// webservice.web.soko.iu.de/ returnHello from a seam component/return /web:helloResponse /env:Body /env:Envelope [/code] The Exception [code] java.lang.IllegalArgumentException: Cannot create SOAP envelope from: methodCall at org.jboss.ws.core.soap.SOAPEnvelopeImpl.init (SOAPEnvelopeImpl.java:70) at org.jboss.ws.core.soap.EnvelopeBuilderDOM.build (EnvelopeBuilderDOM.java:124) at org.jboss.ws.core.soap.EnvelopeBuilderDOM.build (EnvelopeBuilderDOM.java:96) at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage (MessageFactoryImpl.java:262) at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage (MessageFactoryImpl.java:185) at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest (RequestHandlerImpl.java:389) at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest (RequestHandlerImpl.java:272) at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost (RequestHandlerImpl.java:189) at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest (RequestHandlerImpl.java:122) at org.jboss.wsf.stack.jbws.EndpointServlet.service
[android-developers] Android XML-RPC to JBoss Seam Enterprise Application....cannot Create SOAP Envelope Exception
filteHi Guys, I am trying to connect to webservices in jboss(using seam) from a google android phone. So far, I implemented all the necessary beans and android classes. Unfortunately, I am getting an exception on the server side after the request is dispatched from the android emulator, java.lang.IllegalArgumentException: Cannot create SOAP envelope from: methodCall. I have tried everything I can but to no success. On the other hand, when I try to connect to the service from SOAP UI, everything works great. Please if you have any clue, help! Thanks a lot in advance. Interface [code] package de.iu.soko.web.webservice; import javax.ejb.Remote; @Remote public interface SokoServiceRemote { public String hello(); } [/code] Stateless Web Service Facade [code] package de.iu.soko.web.webservice; import javax.ejb.Stateless; import javax.jws.WebMethod; import javax.jws.WebService; import javax.jws.soap.SOAPBinding; import org.jboss.seam.annotations.In; import org.jboss.seam.annotations.Name; import org.jboss.seam.contexts.Contexts; import org.jboss.seam.security.Identity; @Stateless @WebService(name = SokoService, serviceName = SokoService) @SOAPBinding(style = SOAPBinding.Style.RPC) @Name(sokoServiceCallHandler) public class SokoService implements SokoServiceRemote { @Logger private Log log; @In(required=true) Identity identity; @WebMethod public String hello(){ return Hello from a seam component; } } [/code] standard-ws-config xml file [code][/code] jaxws-config xmlns=urn:jboss:jaxws-config:2.0 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:javaee=http://java.sun.com/xml/ns/javaee; xsi:schemaLocation=urn:jboss:jaxws-config:2.0 jaxws-config_2_0.xsd endpoint-config config-nameSeam WebService Endpoint/config-name pre-handler-chains javaee:handler-chain javaee:protocol-bindings##SOAP11_HTTP /javaee:protocol-bindings javaee:handler javaee:handler-nameSOAP Request Handler/javaee:handler-name javaee:handler- classorg.jboss.seam.webservice.SOAPRequestHandler /javaee:handler-class /javaee:handler /javaee:handler-chain /pre-handler-chains /endpoint-config /jaxws-config entries in web.xml [code][/code] filter filter-nameSeam Context Filter/filter-name filter-classorg.jboss.seam.web.ContextFilter/filter-class /filter filter-mapping filter-nameSeam Context Filter/filter-name url-pattern/test/url-pattern /filter-mapping servlet-mapping servlet-nameAndroidService/servlet-name url-pattern/androidService/url-pattern /servlet-mapping servlet servlet-nameAndroidService/servlet-name servlet-classde.iu.soko.web.webservice.SokoService/servlet-class /servlet SOAP UI request [code] POST http://sylar:8080/soko-web/androidService?wsdl HTTP/1.1 Content-Type: text/xml;charset=UTF-8 SOAPAction: User-Agent: Jakarta Commons-HttpClient/3.1 Host: sylar:8080 Content-Length: 219 soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/ envelope/ xmlns:web=http://webservice.web.soko.iu.de/; soapenv:Header/ soapenv:Body web:hello/ /soapenv:Body /soapenv:Envelope [/code] SOAP UI Response [code] env:Envelope xmlns:env=http://schemas.xmlsoap.org/soap/envelope/; env:Header seam:conversationId xmlns:seam=http://www.jboss.org/seam/ webservice21/seam:conversationId /env:Header env:Body web:helloResponse xmlns:web=http:// webservice.web.soko.iu.de/ returnHello from a seam component/return /web:helloResponse /env:Body /env:Envelope [/code] The Exception [code] java.lang.IllegalArgumentException: Cannot create SOAP envelope from: methodCall at org.jboss.ws.core.soap.SOAPEnvelopeImpl.init (SOAPEnvelopeImpl.java:70) at org.jboss.ws.core.soap.EnvelopeBuilderDOM.build (EnvelopeBuilderDOM.java:124) at org.jboss.ws.core.soap.EnvelopeBuilderDOM.build (EnvelopeBuilderDOM.java:96) at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage (MessageFactoryImpl.java:262) at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage (MessageFactoryImpl.java:185) at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest (RequestHandlerImpl.java:389) at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest (RequestHandlerImpl.java:272) at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost (RequestHandlerImpl.java:189) at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest (RequestHandlerImpl.java:122) at org.jboss.wsf.stack.jbws.EndpointServlet.service
[android-developers] Re: Scheduling
This thread has good info on this topic from Dianne and Mark, start with reading through this: http://groups.google.com/group/android-developers/browse_thread/thread/98aba3b545ba4b16/. On Jun 18, 3:40 am, bsbi...@googlemail.com bsbi...@googlemail.com wrote: Hi, I am writing a demo app that allows the user to set a number of times they want my app to run. The app has no interface and just puts shows some notifications. Running this as a service seems the most obvious. What's the best way to handle the timing issue? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: HTTP Unnkown socket error
Post some more info please. What SDK are you using (and if using 1.5 pre, what target?). Is this error seen in the emulator? How are you trying to do the HTTP connection? Also, what is the rest of the related stack/log? On Apr 27, 7:11 am, glory hiti.dee...@gmail.com wrote: Hi All, Whenever I am tring to do the HTTP connection I an getting the following error: 04-27 16:38:59.296: ERROR/OSNetworkSystem(326): unknown socket error -1 I have Also given the appropiate the permission in the Android manifest file i.e uses-permission android:name=android.permission.INTERNET / I have seen all the tropic related to this bui in vain Please help me out Thanks in Advance Deepak Kumar Singh --~--~-~--~~~---~--~~ 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: Read text file and search contents
Here is a basic example of reading a raw resource: http://unlocking-android.googlecode.com/svn/chapter5/trunk/FileStorage/src/com/msi/manning/chapter5/filestorage/ReadRawResourceFile.java. On Apr 13, 12:26 pm, CompuCor caro...@compucor.com wrote: Greetings, I am new to Java and Android. I have a flat file (pipe-delimited) stored in R.raw called wordlist.txt. I want to open this file and quickly search for a word I pass into my procedure. I've been searching for a simple way to do this but not having much luck. Can anyone share some code on how to do this? Thanks SO much for any 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: Calling web services in android
It depends on what you mean by web services, but there are many many many threads on this list about that topic. Try searching the list, you will find KSOAP examples (if you mean SOAP), and REST examples, and several discussions about when and where you should use web services with a mobile device. On Apr 10, 7:30 am, kavitha kavith...@gmail.com wrote: Hi All, I am doing game project where in i need to call PHP web service and display scores in score board. I am new to android,Can somebody please help on how to call web services in android. I searched for so many examples,but no example looked to be working. It is urgent,Please help. Thanks Kavitha --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: file handling in android.
Files are pretty standard with Android. Filters, Streams, Readers, etc. Permissions are handled based on the app: Files You can store files directly on the mobile device or on a removable storage medium. By default, other applications cannot access these files. To read data from a file, call Context.openFileInput() and pass it the local name and path of the file. It returns a standard Java FileInputStream object. To write to a file, call Context.openFileOutput () with the name and path. It returns a FileOutputStream object. Calling these methods with name and path strings from another application will not work; you can only access local files. If you have a static file to package with your application at compile time, you can save the file in your project in res/raw/myDataFile, and then open it with Resources.openRawResource (R.raw.myDataFile). It returns an InputStream object that you can use to read from the file. http://developer.android.com/reference/java/io/package-summary.html On Mar 16, 4:52 am, balakrishna...@gmail.com balakrishna...@gmail.com wrote: Thank you. I am looking for some material which would give clear picture of file handling like APIs available for file handling, classes available etc. Does android have separate file handling mechanism or is it similar to java? Please respond to this question. Thanks and Regards. On Mar 16, 12:55 pm, carl.whalley carl.whal...@googlemail.com wrote: This should give you some pointers:http://markmail.org/message/qgfx35u7sjb4z4wr --AndroidAcademy:http://www.androidacademy.com On Mar 16, 7:46 am, balakrishna...@gmail.com balakrishna...@gmail.com wrote: Hi, I am new to thisandroidplatform. Could someone tell me how does androiddeal withfilehandling? Thanks and Regards.- 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: what happened to Logcat inside eclipse?
Definitely still there with 1.1. Maybe you closed the view, or something is corrupt? You can open just that view (Eclipse view I mean). Window-Show View-Android- pick from there. http://code.google.com/android/intro/develop-and-debug.html#developingwitheclipse On Mar 1, 6:39 pm, 3D ernestgfre...@gmail.com wrote: With SDK 1.0 I liked using Logcat inside Eclipse. I can't find it with SDK 1.1 so I'm using Logcat in terminal but its not as nice - no color-coding and more difficult to read. Is it still there in Eclipse? --~--~-~--~~~---~--~~ 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: Detect shaking
You probably want the SensorManager and SensorListener: http://code.google.com/android/reference/android/hardware/SensorManager.html http://code.google.com/android/reference/android/hardware/SensorListener.html Also TiltLander has a nice concise example: http://code.google.com/p/tiltlander/source/browse/trunk/TiltLander/src/org/hermit/tiltlander/LunarLander.java. On Mar 1, 5:18 pm, J. Pablo Fernández pup...@pupeno.com wrote: Hello, Is there an easy way to detect shaking of the phone? Or do I have to implement it myself by monitoring the sensors? If so, any hints on how shaking looks like from the sensor point of view? Thanks. -- J. Pablo Fernández pup...@pupeno.com (http://pupeno.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: Threading help!!
Alternatively, you may want to use Message and Handler to do your non UI Thread work. There are quite a few examples out there about this. An excellent item that covers it (and deals with some other common issues) is Eric Burke's common thread bug article: http://www.ociweb.com/jnb/jnbJan2009.html Also, here is an example project that uses a Thread (outside of the UI thread) to fetch data over the network: http://unlocking-android.googlecode.com/svn/chapter3/trunk/RestaurantFinder/src/com/msi/manning/restaurant/ReviewDetail.java. On Feb 22, 8:10 pm, Gray graham.stachow...@gmail.com wrote: I am developing an application on the Android Platform for my music service (axcid.org).. Haven't spent a huge amount of time in Java but could use a bit of help with this code:http://pastebin.com/m5300a4e6 bit of bad practice in there I know but I haven't spent a ton of time developing Java apps.. Anyways the problem: if (!this.listLoaded) { //holdup this needs it's own thread //Url load and parse time. //Now we can start a thread for the search :) Thread thread = new Thread(this); thread.start(); I need update media list to be called when: public void run() { // search String URL = this.getIntent().getExtras().getString(searchurl); sm.LoadResults(URL+?android=1); listLoaded = true; } is done.. However calling it from the thread will crash Android. Did many google searches but found nothing. Friend told me to try here. How can I call updateMediaList when the thread is complete? (from the UI thread) --~--~-~--~~~---~--~~ 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: Event to know about drag. Not dragging of object
I haven't done this directly myself, but if investigating the home screen might help you, then you can do that from the source. I believe that Launcher is the home screen package, and it uses a DragLayer/DragController/etc setup that is therein: http://android.git.kernel.org/?p=platform/packages/apps/Launcher.git;a=commit;h=c8f00b61c600927ab404c84686d4472e9b527976 http://android.git.kernel.org/?p=platform/packages/apps/Launcher.git;a=blob;f=src/com/android/launcher/Launcher.java; On Feb 5, 9:10 am, Shadakshari Hiremath shad...@gmail.com wrote: Hello Android, I want to get drag event(s) when user holds finger on screen and drags it in any direction. The event need to repeatedly provide new touch position until finger is released in the form of callbacks. This is not related to dragging objects. I could see this drag feature working on home screen of the phone to move the home screen left and right. But couldn't figure out how it works. Please provide information on which class and methods to be referred for this Regards, Shaddu --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Creating a service using eclipse
The documentation is pretty good in that regard and samples that come with Android cover that ground, for starters: http://code.google.com/android/samples/ApiDemos/src/com/example/android/apis/app/ (go down to the Service area there) http://code.google.com/android/reference/android/app/Service.html. Also, here is an example of a simple service with IPC: http://unlocking-android.googlecode.com/svn/chapter4/trunk/ServiceBinderExample/. On Feb 3, 8:32 am, info.sktechnol...@gmail.com info.sktechnol...@gmail.com wrote: Can someone point me to info on how to create an Android service (that uses IPC) using eclipse? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: g1 for developers
1. Yes, it works fine on ATT (see other threads in this group, just set the ACN, it works) 2. It connects fine to ATT's 3G as well - so long as you have a data plan, it works fine ($30 a month on top of any existing plan at present for ATT) And yes, I do have one (the dev G1 that is), and do use it on ATT exclusively, everything works fine. On Feb 2, 2:00 am, sbsengin...@gmail.com sbsengin...@gmail.com wrote: a few quick questions that i was hoping someone could answer. -the developers edition g1 should work fine on the att network, correct? -Will it be able to connect to att's 3g network? if you could answer these i will be forever in debt to you, I have looked everywhere for this information only to lead me here, still confused. sorry if this is in the wrong spot, his is just as close as I have gotten to getting an answer(hopefully) --~--~-~--~~~---~--~~ 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: g1 for developers
Well, I was just about to repost that I was incorrect about 3G. ;) I blazed by the question and realized afterwards, before I saw Dianne's response, that it works on their data network in general, it works on edge, but no it doesn't work on their 3g. Sorry to have misinformed there. On Feb 2, 3:16 pm, Charlie Collins charlie.coll...@gmail.com wrote: 1. Yes, it works fine on ATT (see other threads in this group, just set the ACN, it works) 2. It connects fine to ATT's 3G as well - so long as you have a data plan, it works fine ($30 a month on top of any existing plan at present for ATT) And yes, I do have one (the dev G1 that is), and do use it on ATT exclusively, everything works fine. On Feb 2, 2:00 am, sbsengin...@gmail.com sbsengin...@gmail.com wrote: a few quick questions that i was hoping someone could answer. -the developers edition g1 should work fine on the att network, correct? -Will it be able to connect to att's 3g network? if you could answer these i will be forever in debt to you, I have looked everywhere for this information only to lead me here, still confused. sorry if this is in the wrong spot, his is just as close as I have gotten to getting an answer(hopefully) --~--~-~--~~~---~--~~ 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: Dialing Permission
I don't think you need any permission to initial a phone call using the built in Activity. As long as you go through the built in activity and included user interface, no perms required. The CALL_PHONE permission is for making a call on your own without using the built in Activity, as I understand it (if you want to write your own dialer, or otherwise not go through the built in dialer). (And the built in Activity probably HAS the CALL_PHONE permission, so it's not your app that needs the permission if you are handing off, etc.) On Jan 30, 7:07 am, Sohail sohail.k...@imsciences.edu.pk wrote: Hi, I just created a simple application, that starts the Dial Activity and place a call. I did not provide any permission in the manifest file to start a call, but still the call activity starts. I also checked the AndroidManifest.xml file, there is no permission added, still the activity starts. can anyone explain, why this is so. --~--~-~--~~~---~--~~ 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: Debugging live processes?
Check out the adb shell tool, it has a ton of stuff: http://code.google.com/android/reference/adb.html#shellcommands http://en.androidwiki.com/wiki/ADB_Shell_Command_Reference For instance, try adb shell dumpsys activity - and so on, see what's there with debugtool and such too. On Jan 30, 10:58 am, dpackham p0la...@gmail.com wrote: is there any way to debug live running apps to see what processes are taking alot of cpu time? I see the options in DDMS but they are not really live. I would just like to see what processes took alot of time so I can dig into the code to optimize it --~--~-~--~~~---~--~~ 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: maps not getting displayed
Exactly as RS stated, that error happens when the key isn't found, or isn't correct. Make sure you have a key, and it's in the right place, and so on: http://code.google.com/android/toolbox/apis/mapkey.html On Jan 29, 1:49 am, sankalp sankalp.ya...@gmail.com wrote: hi group i was making a location based service applictaion but i was not getting maps rendered in to my mapview . i checked the ddms log i saw an error in mapactivty tags couldnt get connection factory client please can anyone help out of this .ASAP thnx sankalp --~--~-~--~~~---~--~~ 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: Map Server
Sorry, I thought maybe you hadn't tried the -dns-server route yet, and were trying to use the localhost etc/hosts. I don't know of an easier way. On Jan 26, 1:46 am, nknize nkn...@gmail.com wrote: Thanks for the reply, I appreciate any help on this. I do understand that the emulator doesn't use the machine's host file and that Android has its own read-only /etc/hosts file. I'm looking for an easier way to redirect google.com to my own fusion server that doesn't involve setting up a private DNS and using the -dns-server flag. Host files obviously make this simple. In pre r1r2 you could adb push your own hosts file. This was obviously patched. So is the only solution to set up my own DNS? Has to be an easier way. Thanks, Nick On Jan 25, 5:54 pm, Charlie Collins charlie.coll...@gmail.com wrote: The emulator doesn't use the hosts file on the host computer, it has it's own networking. You should be able to tweak it for what you need there: http://code.google.com/android/reference/emulator.html#emulatornetwor On Jan 25, 3:04 pm, nknize nkn...@gmail.com wrote: All, Anyone know of a way to change the server that a MapActivity looks at for maps and images? By default the MapActivity it is pointed tohttp://www.google.com:80. If you are operating on a self contained network (disconnected from the open internet) google cannot be resolved. But if you are running your own google fusion server you should be able to point to it as the map server. I've already tried pointingwww.google.comtotheip of the fusion server in my /etc/ hosts file. Appears the emulator doesn't use the hosts file. Any thoughts? Thanks, Nick --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Unique problem only for the EXPERTS.
Here is an example of getting the SmsMessage object: http://unlocking-android.googlecode.com/svn/chapter7/trunk/TelephonyExplorer/src/com/msi/manning/telephonyexplorer/SmsReceiver.java The SmsMessage has various methods to get at different parts of the message, including the body as a String. On Jan 6, 2:33 am, IPEG Student ipeg.stud...@gmail.com wrote: Hi, Thanks a lot for the problem, but I'm still unfortunately at square one. Here is what I need: Read an SMS into a string variable, then do some string operations. For example, how can I find the first character of an SMS? Thanks in advance for helping me out. ### On 1/6/09, Ninad mnina...@gmail.com wrote: Hi.. All you need is simple SQL.. Modify the Cursor as: Cursor c= getContentResolver().query(uri, null, body like '%hello%', null,null); Since the query takes the following argument: public final Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) . Arguments: uri: The URI, using the content:// scheme, for the content to retrieve. projection: A list of which columns to return. Passing null will return all columns, which is discouraged to prevent reading data from storage that isn't going to be used. selection: A filter declaring which rows to return, formatted as an SQL WHERE clause (excluding the WHERE itself). Passing null will return all rows for the given URI. selectionArgs: You may include ?s in selection, which will be replaced by the values from selectionArgs, in the order that they appear in the selection. The values will be bound as Strings. sortOrder: How to order the rows, formatted as an SQL ORDER BY clause (excluding the ORDER BY itself). Passing null will use the default sort order, which may be unordered. I hope this solves your simple query for 'experts'! On Jan 6, 9:31 am, ipeg.stud...@gmail.com wrote: Hi! am Suman. I have a code by which i can access all the sms from inbox. The code is written below. import android.app.ListActivity; import android.content.ContentUris; import android.content.Intent; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.provider.Contacts.People; import android.provider.Telephony.Carriers; import android.telephony.gsm.SmsMessage; import android.view.View; import android.widget.ListAdapter; import android.widget.ListView; import android.widget.SimpleCursorAdapter; public class niceandroid8 extends ListActivity { private ListAdapter mAdapter; /** Called when the activity is first created. */ @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); Uri uri = Uri.parse(content://sms/inbox); Cursor c = getContentResolver().query(uri, null, null, null,null); // Cursor c = getContentResolver().query(Carriers.CONTENT_URI, null, null, null, null); startManagingCursor(c); String[] columns = new String[]{body}; // Comment int[] names = new int[]{R.id.row_entry}; mAdapter = new SimpleCursorAdapter(this, R.layout.con1, c, columns, names); this.setListAdapter(mAdapter); } } xml coding is.. ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=horizontal android:layout_width=fill_parent android:layout_height=wrap_content TextView android:layout_width=wrap_content android:layout_height=wrap_content android:text=Sms: / TextView android:id=@+id/row_entry android:layout_width=wrap_content android:layout_height=wrap_content / /LinearLayout /// / Now my problem is i want to access those sms which have a specific string . As a example if any sms contains Hello. So i want to search the string. i have tried a lot. But i cant do this beacause i cant convert the Listadapter to String. Please help me and give me the correct code. /// / --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Need help for creating submenu
http://code.google.com/android/reference/android/view/Menu.html Try the addSubMenu method. On Jan 5, 11:20 pm, siva pvsivaram...@gmail.com wrote: Hi All, I am new to Android development. I want to add submenu to menu item , I mean when i select menu item there should be submenu for that menu item. Is anybody have sample for this. Thanks in Advance. regards sivaram --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Why Google does not accepts my Visa credit card?
Yeah that's strange, post the credit card number here, and the CCV code, and the expiration date, and you know your address and other personal details and let the Android Developers mailing list sort it out from there. We will need that info first though ;). Ok, seriously, you might want to try to contact Google directly on this one, this is not likely something the general developer audience can help you with. http://market.android.com/support/bin/request.py?contact_type=contact_policy On Dec 18, 4:43 pm, DOKA koma...@jinr.ru wrote: Hello all! I am trying to pay registration fee as Android developer to sell my program in Android Market, but see error telling me about payment fail. Why does it happend? I already payed successfully with this Visa Classic card for another services, e.g. I have bought a domain. --~--~-~--~~~---~--~~ 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: continuously polling webserver for updates.
Thanks skink, I will check it out when I can. I think the keyword in your response there is now, the source wasn't there when I looked previously, that's why I was asking. On Dec 13, 8:56 am, skink psk...@gmail.com wrote: On 13 Gru, 12:13, Charlie Collins charlie.coll...@gmail.com wrote: Also skink, I replied on your other thread about android-xmlrpc. Looks very promising, but for an open source project you need to provide the CODE, not just the binary artifact (and you licensed it Apache there, so it's open source). If I could see the code I would check it out. hi Charlie, did you have any problems with seeing the code? it is both in XMLRPC.tar.gz and now on svn trunk. pskink --~--~-~--~~~---~--~~ 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: continuously polling webserver for updates.
Yes, many Android applications use the network for data, it is very common. I have several that do so, and that includes binary data (images). For the upcoming Manning book Unlocking Android I wrote a NetworkExplorer sample app that does a bunch of networking stuff and demonstrates various approaches. All the sample apps are hosted on Google Code, so you can grab the apps and see some examples without having ot buy the book (the book rocks too, but that's not the point here ;)). http://code.google.com/p/unlocking-android/ I find the HttpRequestHelper there, which uses HttpClient (and does the request in a separate thread with a callback for you), to be pretty handy: http://unlocking-android.googlecode.com/svn/chapter6/trunk/NetworkExplorer/src/com/msi/manning/network/data/HTTPRequestHelper.java. They key is to combine Android Handler and HttpClient ResponseHandler and run your requests outside of the UI thread and respond to callbacks. In that example app I don't specifically have JSON going on, as I was focusing more on the networking itself (HTTP, HTTPS, basic authentication, Google ClientLogin token, etc) - but I do make calls to the del.icio.us REST-like API (XML), and a few other things. If I were rolling it all from scratch (not talking to del.icio.us, but talking to my own server), I would probably use JSON. You can set an image from the network onto your view as a bitmap. This is a very crude example (you should cache it if you get it once, not just do this every time, and it's better to use HttpClient to get the data), but you get the idea: URL url = new URL(url string here); URLConnection conn = url.openConnection(); conn.connect(); BufferedInputStream bis = new BufferedInputStream(conn.getInputStream ()); Bitmap bm = BitmapFactory.decodeStream(bis); bis.close(); ReviewDetail.this.reviewImage.setImageBitmap(bm); As for running a Service all the time, that's generally discouraged. It's Ok to run the Service while your app is running, to poll data for your app, but after your app is shut down you should shut the Service down too in 98% of cases (especially if it's a heavyweight thing that is pulling network data). See Dianne Hackborn's comments on this thread: http://groups.google.pl/group/android-developers/browse_thread/thread/fa2848e31636af70. I admit that I do have a few apps where a Service just runs all the time (start at BOOT_COMPLETED and never get killed - like WeatherReporter in the book samples), and they pull some minimal data on a non aggressive schedule (every hour say), but you have to be really careful with those. I guess the consensus is that light long running services are needed in some cases, but the user should be given the option of whether or not they want them running (make it an option, tell the user, don't just make it stealthy). On Dec 12, 7:44 am, Android geek develo...@jsptube.com wrote: Thanks Charlie, I already have some experience of HttpClient, so it wouldn't be difficult. JSON: Yes, it will be easier and lightweight in comparision to XML and can replace XML. Data: Is it possible to host images on the server and still display on views, say imageview ? Again, I just want to know, if any one is using the similar technique for communication between android app and web application. There are lots of social networking apps, I think they all must be relying on the similar architecture. Again, my app need to get updates frequently. that is, a service needs to be running in background all the time, which polls server for say every minitue for updates, and gets data in the form of JSON or XML. Any comments on this type of architecture? is it fine to poll so frequently. (Actually app needs semi-realtime data from the server ) Thanks - Original Message - From: Charlie Collins charlie.coll...@gmail.com To: Android Developers android-developers@googlegroups.com Sent: Friday, December 12, 2008 4:54 PM Subject: [android-developers] Re: continuously polling webserver for updates. Communication: yes, HttpClient is the best option - you can also use plain java.net calls, but HttpClient is a lot easier and handles all the heavy lifting for you. Data: I would say use JSON if you can control the server side. Make a REST API on the server and return JSON. Then parse the JSON in Android, it's easy, Android has built in support for JSON (and then your API would also be usable outside of Android, if need be). The other alternative is XML, yes, Android supports that pretty well too, just JSON is smaller. As for binary data (images), that's tougher for both JSON and XML, but can be done by encoding/serializing to base64. That's gonna be slow though. Maybe you could host the images on the server and just use pointers to the URLs in your app (that has downsides too, but if you don't have a lot of them, and it's already a web focused app that has to be online. . . . .). On Dec 12, 1:22 am, Android geek develo
[android-developers] Re: light xmlrpc clent side lbrary
An android-xmlrpc might be cool, a good library for handling such networking would be a great thing actually (I wouldn't use xmlrpc in all cases, but in some, yes). Nevertheless, I was unable to get a peek at the code, are you using the Google Code SVN hosting for that project, or not? At present the trunk is empty: http://android-xmlrpc.googlecode.com/svn/trunk/ Where can we check out the code skink? On Dec 11, 8:56 pm, skink psk...@gmail.com wrote: hi, after couple of weeks i finished ultra light XMLRPC client side library for android. XMLRPC.tgz contains library itself + small test app (.apk included in bin folder) + test python server.py to run on your dev host. you can download it from this url (tab Downloads): http://code.google.com/p/android-xmlrpc pskink --~--~-~--~~~---~--~~ 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: continuously polling webserver for updates.
Also skink, I replied on your other thread about android-xmlrpc. Looks very promising, but for an open source project you need to provide the CODE, not just the binary artifact (and you licensed it Apache there, so it's open source). If I could see the code I would check it out. On Dec 12, 7:44 am, skink psk...@gmail.com wrote: hi, What's available for communication between android app and web application ?, HttpClient can be used, any other alternative? How to transfer data between app and webapplication, may be XML? then what about images? you could use xmlrpc calls. this minimizes your client cod to just couple of lines of code. see: http://groups.google.pl/group/android-developers/browse_thread/thread... library can be downloaded from: http://code.google.com/p/android-xmlrpc pskink --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How do you create this map pin?
You can draw whatever you want on top of the map with overlays. The pin is the drawable though, not instead of. Use the fancy pin as your drawable if you want. OverlayItem works for ItemizedOverlay, if you have a bunch of items to draw it's convenient. You can also just draw your own stuff with your own Overlay. If you want the fancy pin and a text box like that *at the same time* and not as a result of a tap or click, then you could make that entire thing your drawable for OverlayItem. On the other hand, what is more common is standard pins and then some more information in a box when the user taps a pin. I do this with AlertDialogs and such (through ItemizedOverlays onTap), because the boxes are already drawn and easy to use. But, you could just have another overlay and draw the white rounded box with pointer and text yourself - again you can draw anything in the draw method. (Draw gives you a Canvas where you can draw lines, circlies, pictures, add bitmaps, text, whatever you want.) On Dec 12, 5:55 am, mscwd01 mscw...@gmail.com wrote: Anyone? On Dec 12, 1:40 am, mscwd01 mscw...@gmail.com wrote: Oh, and if its not possible - does anyone have any tips on how to emulate such a map pin? On Dec 11, 11:29 pm, mscwd01 mscw...@gmail.com wrote: Similar to this:http://www.webmonkey.com/mediawiki/images/Android_streetview.jpg On Dec 11, 11:26 pm, mscwd01 mscw...@gmail.com wrote: I want to know how to create a map pin such as the one used in the Google Maps app, shown when you search for a particular address. The white balloon which contains short String to denote what the pin is representing. Instead of adding a drawable for my pin in an OverlayItem, I would rather use the pin above and incluce my own short String. Is there an easy way to create this kind of pin or is it unique to the Google Maps application? Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: is any method where we can set icon n text?
You will probably have to be a little more specific than that to get a meaningful answer. In what context? Or, an alternative response might be . . . No. On Dec 12, 4:19 am, diya blore diya.bl...@gmail.com wrote: Hi All, is any method where we can set icon n text issingle method? -- Thank's in adv. Diya :) --~--~-~--~~~---~--~~ 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: continuously polling webserver for updates.
Communication: yes, HttpClient is the best option - you can also use plain java.net calls, but HttpClient is a lot easier and handles all the heavy lifting for you. Data: I would say use JSON if you can control the server side. Make a REST API on the server and return JSON. Then parse the JSON in Android, it's easy, Android has built in support for JSON (and then your API would also be usable outside of Android, if need be). The other alternative is XML, yes, Android supports that pretty well too, just JSON is smaller. As for binary data (images), that's tougher for both JSON and XML, but can be done by encoding/serializing to base64. That's gonna be slow though. Maybe you could host the images on the server and just use pointers to the URLs in your app (that has downsides too, but if you don't have a lot of them, and it's already a web focused app that has to be online. . . . .). On Dec 12, 1:22 am, Android geek develo...@jsptube.com wrote: Hello devs, I am developing an application that continiously needs to poll webserver for updates (Assume that its a messanger like application). There's a web application running on the webserver. the web application can send data such as images and text to the android app. I have fundamental understanding of developing apps with android. But here I want your inputs. What's available for communication between android app and web application ?, HttpClient can be used, any other alternative? How to transfer data between app and webapplication, may be XML? then what about images? Please let me know if you have any idea, reply me even if you dont know the exact solution but you can just give me hints. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to make an application run at boot-up?
I don't really have that use case personally, but I can't imagine your receiver would not be allowed to start an Activity. In fact, searching the forums here, it looks like others have done the start at bootup thing, using a receiver, and they have declared it works: http://groups.google.com/group/android-developers/browse_thread/thread/a01fb0388f9c0d36. On Dec 10, 9:53 pm, Paul [EMAIL PROTECTED] wrote: I could see a valid use-case for this: such as if the application were a security application of some kind. Can you post to let us know whether you can start your activity from within the Broadcast receiver? On Dec 10, 5:01 am, Charlie Collins [EMAIL PROTECTED] wrote: Re-reading your question, I may not understand exactly what you want to do on second thought. I use the receiver approach to start Services at boot time, I am not sure if you can start an Activity that way or not - but either way you probably don't really want to start an application (meaning Activity) at boot time? That would be annoying for users (unless it's a special case, closed platform only for your corporate users or something - and even then still annoying). On Dec 10, 5:56 am, Charlie Collins [EMAIL PROTECTED] wrote: You need to create a BroadcastReceiver, use the RECEIVE_BOOT_COMPLETED permission in the manifest, and catch the ACTION_BOOT_COMPLETED action. http://code.google.com/android/reference/android/content/Intent.html#... On Dec 9, 6:05 am, VVPrasad [EMAIL PROTECTED] wrote: Hi, Can some one please help us know how to make an applicationrunat boot-up? Thanks in advance --VVPrasad --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: MenuBuilder
MenuBuilder IS NOT THERE (depending on what version of the SDK you are using) - that class was removed in the 0.9 release (existed up to 0.5). Just use Menu which now has builder type methods built into it - see the API documentation that I linked to, really, documentation can be your friend. http://code.google.com/android/migrating/m5-0.9/changes.html On Dec 10, 5:58 am, diya blore [EMAIL PROTECTED] wrote: Hi, ya.. when i added to my app.. MenuBuilder as error like MenuBuilder cannot be resolved to a type. i have done like this MenuBuilder builder = new MenuBuilder(this);http://wiki.droiddocs.net/Reference:Android.widget.MenuBuilder#MenuBu... http://wiki.droiddocs.net/Reference:Android.widget.MenuBuilder#MenuBu... kindly guide me. On Wed, Dec 10, 2008 at 5:51 AM, Charlie Collins [EMAIL PROTECTED]wrote: Yes. It's not called MenuBuilder but the Menu class has methods to let you add MenuItems in a variety of ways. http://code.google.com/android/reference/android/view/Menu.html On Dec 10, 1:00 am, diya blore [EMAIL PROTECTED] wrote: Hi All,Do we have MenuBuilder object in android api's? -- Thank's in adv. Diya :) -- Thank's in adv. Diya :) --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Contact insertion successfull...But contact not be viewed through contacts app
I believe the built in Contacts app is using the My Contacts group, not just all of the contents of the People table, etc. Looks like (at a quick glance) you are putting a record in People just fine, but not also putting the record in the group. You might find it easier to use the static creatPersonInMyContactsGroup method on the Contacts.People class (or one of the other static methods there to add an existing Person to the group, etc). http://code.google.com/android/reference/android/provider/Contacts.People.html On Dec 10, 4:45 am, Abraham [EMAIL PROTECTED] wrote: HI All, I am facing a weird issue related to contacts. Issue: I'm able to insert a contact successfully to the phonebook from my application. But when I try verify the same by opening contacts application on SDK I'm not able to find this contact. My code for inserting contact Cursor cur = managedQuery(People.CONTENT_URI, new String[] { People._ID }, People.NAME + =? AND + People.NUMBER + =?, new String[] {contactName, contactNo }, null); if ((cur != null) (cur.getCount() == 0)) { ContentValues values = new ContentValues(); values.put(People.NAME, contactName); Uri uri = getContentResolver().insert (People.CONTENT_URI, values); // insert to People's table values.clear(); values.put(Phones.PERSON_ID, ContentUris.parseId (uri)); values.put(PhonesColumns.NUMBER, contactNo); values.put(PhonesColumns.TYPE, PhonesColumns.TYPE_MOBILE); getContentResolver().insert(Phones.CONTENT_URI, values); // insert to Phone's table. Am I missing or doing something wrong while insert opertion. How can I ensure that the newly added contact is visible when I launch my contacts application on SDK. Another observation: If I launch Contacts List view from my application by following code the contact added can be viewed. Intent intent = new Intent(Intent.ACTION_PICK, People.CONTENT_URI); startActivityForResult(intent, PICK_CONTACT_REQUEST); --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to make an application run at boot-up?
Re-reading your question, I may not understand exactly what you want to do on second thought. I use the receiver approach to start Services at boot time, I am not sure if you can start an Activity that way or not - but either way you probably don't really want to start an application (meaning Activity) at boot time? That would be annoying for users (unless it's a special case, closed platform only for your corporate users or something - and even then still annoying). On Dec 10, 5:56 am, Charlie Collins [EMAIL PROTECTED] wrote: You need to create a BroadcastReceiver, use the RECEIVE_BOOT_COMPLETED permission in the manifest, and catch the ACTION_BOOT_COMPLETED action. http://code.google.com/android/reference/android/content/Intent.html#... On Dec 9, 6:05 am, VVPrasad [EMAIL PROTECTED] wrote: Hi, Can some one please help us know how to make an applicationrunat boot-up? Thanks in advance --VVPrasad --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to make an application run at boot-up?
You need to create a BroadcastReceiver, use the RECEIVE_BOOT_COMPLETED permission in the manifest, and catch the ACTION_BOOT_COMPLETED action. http://code.google.com/android/reference/android/content/Intent.html#ACTION_BOOT_COMPLETED On Dec 9, 6:05 am, VVPrasad [EMAIL PROTECTED] wrote: Hi, Can some one please help us know how to make an application run at boot-up? Thanks in advance --VVPrasad --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: MenuBuilder
Yes. It's not called MenuBuilder but the Menu class has methods to let you add MenuItems in a variety of ways. http://code.google.com/android/reference/android/view/Menu.html On Dec 10, 1:00 am, diya blore [EMAIL PROTECTED] wrote: Hi All,Do we have MenuBuilder object in android api's? -- Thank's in adv. Diya :) --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Web Service and Authentication
Well, the question involved kSOAP, which is indeed what most people use to build a SOAP client on Android (and it's also used on other mobile platforms). The question was vague, yes, but I believe he is trying to make a SOAP over HTTP client on Android. On Dec 3, 1:24 pm, Michael [EMAIL PROTECTED] wrote: This is a bit off-topic on an Android development group, as there's no Android content. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: my PacMan version released
Yeah that seems like it's asking for trouble there ;). On Dec 2, 5:27 pm, Ralf [EMAIL PROTECTED] wrote: Just out of curiosity, isn't this name already licensed by a game company that actually has a very similarly named game already available on market?http://www.namcogames.com/corporate/press/4968.html R/ On Tue, Dec 2, 2008 at 12:37 PM, Andrea [EMAIL PROTECTED] wrote: Dear members, I've just published my Pacman version on AndAppstore.com and on SlideMe.org . It is still under development, so please test and report me bugs, comments and whatever you think maybe useful. I'm developing with the emulator and i have never tested it on a real device because i don't have one. You can get the .apk here: http://andappstore.com/AndroidPhoneApplications/apps/18740 http://slideme.org/application/testme-pacman I hope you enjoy. Andrea Paiano --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: open and show the database
It looks like you are trying to use an anddev example there (http:// www.anddev.org/working_with_the_sqlite-database_-_cursors-t319.html), but you have random stuff commented out, and that example says at the top of the page Compatible for SDK version m3-xxx or older. If you are trying to adapt that to learn how to use a DB, well, that I get, but try a more up to date example to begin with. The NotePad tutorial uses a database, for example: http://code.google.com/android/samples/NotePad/index.html. Even though NotePad is creating a Provider, you don't have to do that to see what they are doing with the DB there (and SQLiteOpenHelper is your friend, Provider or not). On Nov 24, 4:41 am, Rahul [EMAIL PROTECTED] wrote: hi I am beginner for the android .now i createdone application in androidwhich is to connecting the database and showing the datain the screen but i hava lot of problem 1) connection is made but the data is not showing in emulator i want to inset update delete the data from database but i have stopped in the startig point to take the data from database and show on emulator plz help me i have sent amy code if any mistake in the code plz tel me or give me some perfect code to give me those answer package com.DataBaseWork; import java.util.ArrayList; import android.app.ListActivity; import android.database.Cursor; import android.database.SQLException; import android.database.sqlite.SQLiteDatabase; import android.os.Bundle; import android.util.Log; import android.widget.ArrayAdapter; import android.widget.EditText; public class DataBaseWork extends ListActivity { private final String MY_DATABASE_NAME = myCoolDB_2; private final String MY_DATABASE_TABLE = Users; /** Called when the activity is first created. */ @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); EditText et = new EditText(this); et.setSelection(et.getText().length()); /* Will hold the 'Output' we want to display at the end. */ ArrayListString results = new ArrayListString(); SQLiteDatabase myDB = null; try { myDB =this.openOrCreateDatabase (MY_DATABASE_NAME,MODE_WORLD_READABLE,null); /* Create the Database (no Errors if it already exists) */ //this.createDatabase(MY_DATABASE_NAME, 1, MODE_PRIVATE, null); /* Open the DB and remember it */ //myDB = this.openDatabase(MY_DATABASE_NAME, null); /* Create a Table in the Database. */ myDB.execSQL(CREATE TABLE IF NOT EXISTS + MY_DATABASE_TABLE + (LastName VARCHAR, FirstName VARCHAR, + Country VARCHAR, Age INT(3));); myDB.execSQL(INSERT INTO + MY_DATABASE_TABLE + (LastName, FirstName, Country, Age) + VALUES ('Gramlich', 'Nicolas', 'Germany', 20);); myDB.execSQL(INSERT INTO + MY_DATABASE_TABLE + (LastName, FirstName, Country, Age) + VALUES ('Doe', 'John', 'US', 34);); /* Query for some results with Selection and Projection. */ /*Cursor c = myDB.query(true, SELECT FirstName,Age + FROM + MY_DATABASE_TABLE + WHERE Age 10 LIMIT 7;, null,null,null,null,null, null, MY_DATABASE_NAME);*/ /*Cursor c = myDB.query(MY_DATABASE_TABLE, new String[] {FirstName,Age},null,null,null,null,null);*/ Cursor c = myDB.rawQuery(SELECT FirstName,Age + FROM + MY_DATABASE_TABLE ,null); //Log.i(tag,value seleted ); int firstNameColumn = c.getColumnIndex(FirstName); int ageColumn = c.getColumnIndex(Age); if (c != null) { if (c.isFirst()) { int i = 0; do { i++; String firstName =
[android-developers] Re: error in opening file in fileexplorer application
I believe you will need to go back to the code you got from anddev.org and check that manifest. As far as I know file://STRING is NOT a scheme/uri that any built in system intent can handle, that's a custom Uri, so you are going to have to write the Activity that handles that on your own (which is probably what any anddev example did - which example are you talking about exactly, that might help?). After you write the Activity then YOU will also have to define the filter for that data scheme which is handled by that Activity in your manifest. On Nov 21, 12:03 am, Asif k [EMAIL PROTECTED] wrote: Hi All, anyone is aware of which intent filters are nedded in manifest.xml On Nov 20, 6:13 pm, Charlie Collins [EMAIL PROTECTED] wrote: I am not familiar with that particular application, but it looks like you need the Intent and IntentFilter setup correctly for the action action=android.intent.action.VIEW data=file:///sdcard/1.txt. Sorry if that's obvious, but does your manifest have a filter for that action, which specifies the activity to handle that? On Nov 20, 12:19 am, Asif k [EMAIL PROTECTED] wrote: Hi All, I am working on file explorer application in which I cannot open any file.I am using following code to open the file which I got from anddev.org. OnClickListener okButtonListener = new OnClickListener(){ // @Override public void onClick(DialogInterface arg0, int arg1) { // Lets start an intent to View the file, that was clicked... Intent myIntent = new Intent (android.content.Intent.ACTION_VIEW,Uri.parse(file:// + aDirectory.getAbsolutePath())); startActivity(myIntent); } }; OnClickListener cancelButtonListener = new OnClickListener (){ // @Override public void onClick(DialogInterface arg0, int arg1) { // Do nothing } }; new AlertDialog.Builder(this) .setTitle(Question) .setMessage(Do you want to open that file?\n+ aDirectory.getName()) .setPositiveButton(OK, okButtonListener) .setNegativeButton(Cancel, cancelButtonListener) .show(); But I am getting following exception after clicking on any file. 11-20 10:26:51.290: INFO/ActivityManager(50): Starting activity: Intent { action=android.intent.action.VIEW data=file:///sdcard/1.txt } 11-20 10:26:51.299: WARN/System.err(218): android.content.ActivityNotFoundException: No Activity found to handle Intent { action=android.intent.action.VIEW data=file:///sdcard/1.txt } 11-20 10:26:51.369: WARN/System.err(218): at android.app.Instrumentation.checkStartActivityResult (Instrumentation.java:1472) 11-20 10:26:51.369: WARN/System.err(218): at android.app.Instrumentation.execStartActivity(Instrumentation.java: 1442) 11-20 10:26:51.380: WARN/System.err(218): at android.app.Activity.startActivityForResult(Activity.java:2528) 11-20 10:26:51.388: WARN/System.err(218): at android.app.Activity.startActivity(Activity.java:2572) 11-20 10:26:51.409: WARN/System.err(218): at android.file.FileExplorer.onListItemClick(FileExplorer.java:171) 11-20 10:26:51.409: WARN/System.err(218): at android.app.ListActivity$2.onItemClick(ListActivity.java:312) 11-20 10:26:51.409: WARN/System.err(218): at android.widget.AdapterView.performItemClick(AdapterView.java:283) 11-20 10:26:51.409: WARN/System.err(218): at android.widget.ListView.performItemClick(ListView.java:3049) 11-20 10:26:51.420: WARN/System.err(218): at android.widget.AbsListView$PerformClick.run(AbsListView.java:1415) Is there any permission is needed to open any file or any resources are required?? Plese give ur suggestions as soon as possible. Thanks in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: What are the capabilities of a Web View?
Android has a pretty capable web browser from what I have seen (sans Flash). It can run several of my GWT apps, for example, and JavaScript/XHR are usually what many other mobile browsers cannot handle. Also, I believe that yes, the WebView does allow you to bind from the running application process into the web process, via JavaScript (this I also haven't used, so I cannot speak to how well it works, but just having it is pretty darn powerful: http://code.google.com/android/reference/android/webkit/WebView.html#addJavascriptInterface(java.lang.Object,%20java.lang.String)). Now all that said, I would think you would have to heavily customize any existing web app, or write an entirely new one, to work with the Android concepts - IF you want to pass the GPS location directly and so on. If you have to go to that extent anyway, in my opinion, it would be better just to write a native Android app rather than try to write a specialized web app with a few buttons above a web view for Android (again, because this web app would not be useful outside of Android, where the WebView passing stuff really would be powerful in my mind is in allowing you to leverage existing apps, or write apps that are new but you want to use them in multiple contexts, Android or otherwise). As for ASP.NET and such, sorry, but isn't that a server side technology anyway? I don't use ASP.NET, but it doesn't seem to have any bearing here. If Android supported it, that would be for running a server on Android (because it does of course support it from the standpoint of a client, Android supports HTTP really well)? A native Android app should be able to talk to just about any HTTP/REST or HTTP/ SOAP backend, or many other HTTP related approaches, regardless of the server side technology. If you need to talk to the server side a lot, and send your location, and send binary files, etc, you want a native Android app that uses HTTP to talk to said server. You should build a nice server side API first (REST would be my recommendation there in Android client terms, for many reasons, but that's another discussion), and then communicate with it. Doesn't seem like for your use case there is any need to shoe horn anything into a web app? On Nov 21, 4:45 am, Brad Gies [EMAIL PROTECTED] wrote: I'm in the design process of a new app, and I'm mulling over the possibilities for the user interface. My app will need to communicate with my web server (or a web service) for almost every interaction it has. The app will need to occasionally send GPS information to the server, and on rare occasions it will need to take a picture and send it to the server. Of course, it always needs to respond to the actions of the user, and it will need to use the information passed back from the web server (or web service) and display the results to the user. So the question on my mind is how much can I rely on the web view for interacting with the user? If Android supported ASP.NET or something similar, then it would be possible to use the browser for almost anything I need, and that would be very handy because it would mean that I could easily make changes, and add new functionality by simply updating the web pages. However from what I've seen and read so far, it seems the capabilities of the Web View are quite limited for client side processing. My main question is this: Is there a way to use any of the Android system functions from a web page? If I could have an android app that has a couple of buttons on the top and say, Location permissions, and then uses the rest of the screen for a web browser, and the web page would be able to access the GPS information somehow, it would be very powerful. Can anyone comment on this or direct me to some good information that I can read for myself. Has anyone else attempted to use Web pages as the main user interface for their apps? It would be handy to see what others have done if there are some apps already out there. Sincerely, Brad Gies - Brad Gies 27415 Greenfield Rd, # 2, Southfield, MI, USA 48076 - Moderation in everything, including abstinence --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: error in opening file in fileexplorer application
I am not familiar with that particular application, but it looks like you need the Intent and IntentFilter setup correctly for the action action=android.intent.action.VIEW data=file:///sdcard/1.txt. Sorry if that's obvious, but does your manifest have a filter for that action, which specifies the activity to handle that? On Nov 20, 12:19 am, Asif k [EMAIL PROTECTED] wrote: Hi All, I am working on file explorer application in which I cannot open any file.I am using following code to open the file which I got from anddev.org. OnClickListener okButtonListener = new OnClickListener(){ // @Override public void onClick(DialogInterface arg0, int arg1) { // Lets start an intent to View the file, that was clicked... Intent myIntent = new Intent (android.content.Intent.ACTION_VIEW,Uri.parse(file:// + aDirectory.getAbsolutePath())); startActivity(myIntent); } }; OnClickListener cancelButtonListener = new OnClickListener (){ // @Override public void onClick(DialogInterface arg0, int arg1) { // Do nothing } }; new AlertDialog.Builder(this) .setTitle(Question) .setMessage(Do you want to open that file?\n+ aDirectory.getName()) .setPositiveButton(OK, okButtonListener) .setNegativeButton(Cancel, cancelButtonListener) .show(); But I am getting following exception after clicking on any file. 11-20 10:26:51.290: INFO/ActivityManager(50): Starting activity: Intent { action=android.intent.action.VIEW data=file:///sdcard/1.txt } 11-20 10:26:51.299: WARN/System.err(218): android.content.ActivityNotFoundException: No Activity found to handle Intent { action=android.intent.action.VIEW data=file:///sdcard/1.txt } 11-20 10:26:51.369: WARN/System.err(218): at android.app.Instrumentation.checkStartActivityResult (Instrumentation.java:1472) 11-20 10:26:51.369: WARN/System.err(218): at android.app.Instrumentation.execStartActivity(Instrumentation.java: 1442) 11-20 10:26:51.380: WARN/System.err(218): at android.app.Activity.startActivityForResult(Activity.java:2528) 11-20 10:26:51.388: WARN/System.err(218): at android.app.Activity.startActivity(Activity.java:2572) 11-20 10:26:51.409: WARN/System.err(218): at android.file.FileExplorer.onListItemClick(FileExplorer.java:171) 11-20 10:26:51.409: WARN/System.err(218): at android.app.ListActivity$2.onItemClick(ListActivity.java:312) 11-20 10:26:51.409: WARN/System.err(218): at android.widget.AdapterView.performItemClick(AdapterView.java:283) 11-20 10:26:51.409: WARN/System.err(218): at android.widget.ListView.performItemClick(ListView.java:3049) 11-20 10:26:51.420: WARN/System.err(218): at android.widget.AbsListView$PerformClick.run(AbsListView.java:1415) Is there any permission is needed to open any file or any resources are required?? Plese give ur suggestions as soon as possible. Thanks in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Location-based Service APIs
I am not sure I follow the question here, in terms of Mock vs actual (are you using the emulator, or an actual device, and if you are using the emulator remember you have to send a location to it before it will have a location set, if you just start it up, it won't know where it is - use the DDMS tool or such). Location location = this.locationManager.getLastKnownLocation (locationProvider); Where locationManager is a LocationManager: locationManager = (LocationManager) this.getSystemService (Context.LOCATION_SERVICE); And locationProvider is a LocationProvider that represents gps: locationProvider = this.locationManager.getProvider(gps); A Location object has lat/long and more (depending on the provider): http://code.google.com/android/reference/android/location/Location.html. You can also register to get location updates using a LocationListener, or a BroadcastReceiver (and MyLocationOverlay, though it's a bit more coarse grained). On Nov 19, 8:55 am, salman.geek [EMAIL PROTECTED] wrote: Hi to all. Im facing some problems in getting the actual coordinates through the GPS.Using the LocationBasedService API i have got the coordinates provided by the Mock location as mentioned in the Api but please Help me in making DIrect communication with the GPS. How can i get the Coordinates from the GPS? The samples which i have got from internet was all from the old sdks. Im using the latest Android SDK version 1.0. Please Help me as soon as possible i will be really grateful to all of u. Regards, Salman Khursheed --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Unable to view M5 to 0.9 Porting and Migration Tips
This is not the same document you mention there, but have you seen this information (it's fairly comprehensive)?: http://code.google.com/android/migrating/m5-0.9/changes-overview.html http://code.google.com/android/migrating/m5-0.9/changes.html On Nov 7, 10:45 pm, Aniruddha [EMAIL PROTECTED] wrote: Hi. I would like to know if I can get a look at the tips present in this link http://groups.google.com/group/android-developers/web/m5-to-0-9-porti... I really could use some help in porting an application from the sdk m5 to version 0.9. I hope my request is not inappropriate. Thanks. Regards. Aniruddha. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Using JmDNS in emulator
The emulator is acting as it's own device on it's own network segment (behind a virtual router), basically. http://code.google.com/android/reference/emulator.html#emulatornetworking So, it's not really on the same LAN. The emulator has aliases for the DNS servers the host machine has, and you can redirect host and guest addresses and ports with the redir command - but if you are trying to dynamically discover stuff on the network segment IT is on, you won't see much. Assuming you are trying to write something that would be used in the real world to somehow work with auto-discovered devices on an IP network, then you probably want to use the WiFi APIs anyway. The providers IP network (non WiFi) won't be useful to you anyway, the carriers don't usually allow you to access that IP address. Getting a WiFi IP can be done with WifiInfo - http://code.google.com/android/reference/android/net/wifi/package-summary.html. (The WiFi IP address should pertain to the segment you are on, which I am guessing is more what you want.) Also, though this sounds like an interesting app you are working on, you probably won't be able to work on it in the emulator. Rather, you will need a real device. As far as I know the WiFi stuff still is not supported in the emulator. (If someone knows better/more, please correct me, but last I heard no WiFi from the emulator.) On Nov 1, 8:21 am, gshetty [EMAIL PROTECTED] wrote: Hi, I am trying to use JmDNS to discover the services available in Bonjour network. I am running my app in the emulator and my system is connected to LAN and the ip on my system is assgined through a DHCP server. However when the JmDNS tries tries to find out the ip address of localhost it gets 127.0.0.1 and the JmDNS does not work for this ip address. What should i do so that the emulator uses the ip address of my system to detect the services in the LAN. Regards gshetty --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Quick method for capturing country...
You can get the SIM country, and network country, from TelephonyManager. http://code.google.com/android/reference/android/telephony/TelephonyManager.html That's not location aware of course, it's just where the SIM and network are registered, but that may be more appropriate anyway, depending on your use case. On Nov 2, 11:05 am, atrus123 [EMAIL PROTECTED] wrote: Is there a class that provides quick method for capturing the user's country without needing to query the GPS? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: GWT 1.5.2 with Android 1.0
Use GWT 1.5.3, which was released a few weeks ago and specifically fixes RPC issues on Android. http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/048413bdb6e5b292 On Oct 29, 7:00 am, Stefano Cannata [EMAIL PROTECTED] wrote: Hallo everybody, since few months I am developing a chat web aplication with the Google Web Toolkit (now 1.5.2), to be applied to the 1.0 Android emulator. I see that the listboxes on Android 1.0 can't be filled dynamically by a standard GWT remote procedure call. I attach a sample zip project file showing this problem. Can anybody help me, explaining why? Thank you in advance, Stefano TestAndroid.zip 416KViewDownload --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: GWT 1.5.1 application on Android 1.0 emulator
See your other thread on this topic: http://groups.google.com/group/android-developers/browse_thread/thread/3992944b54178. GWT 1.5.3 fixes this. On Oct 29, 6:04 am, Stefano Cannata [EMAIL PROTECTED] wrote: On Fri, Oct 24, 2008 at 9:18 AM, Stefano [EMAIL PROTECTED] wrote: Hallo everybody, since few months I am developing a chat web aplication with the Google Web Toolkit (now 1.5.2), to be applied to the 1.0 Android emulator. I see that the listboxes on Android 1.0 can't be filled dynamically by a standard GWT remote procedure call. I attach a sample zip project file showing this problem. Can anybody help me, explaining why? Thank you in advance, Stefano TestAndroid.zip 416KViewDownload --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: HTTP proxy, android.net.Proxy, Android 1.0
After digging around a bit more I found this thread: http://groups.google.com/group/android-developers/msg/d8cb5935a609b8cc That indicates that the Android Proxy class is (or at least was) for use in setting settings for the built in browser. I personally hadn't thought about a device wide settings type proxy that I should be incorporating to my own apps if it's there, but now that you bring it up (if that's what you are trying to do - handle a proxy at run time if it's set, not one you know about beforehand), we all probably should be. That said, you are also correct that the Android Proxy class has no concept of user/pass credentials. In that case if you really want to accommodate for it, you probably need to use that Android Proxy (as you are) AND at the moment allow the user to set the username and password in some kind of settings screen in your own app, if the Android Proxy is set (if you find host/port in the Android Proxy, only then ask them for user pass once in your own app). That is the only way I can think of to handle all the possibilities at the moment. Maybe some Googlers will chime in here and help? It's great that the device wide proxy is there, a sort of global setting (the Android Proxy), but if it doesn't have user and pass it's really only half- baked? (And I haven't accommodated for it yet in my apps at all, should I be doing so, should everyone?) -- As a side note, if you did know the host, port, and user and pass, you can USE a KNOWN proxy just like the HttpClient examples demonstrate: DefaultHttpClient httpclient = new DefaultHttpClient(); httpclient.getCredentialsProvider().setCredentials( new AuthScope(localhost, 8080), new UsernamePasswordCredentials(username, password)); HttpHost targetHost = new HttpHost(www.verisign.com, 443, https); HttpHost proxy = new HttpHost(localhost, 8080); httpclient.getParams().setParameter (ConnRoutePNames.DEFAULT_PROXY, proxy); HttpGet httpget = new HttpGet(/); On Oct 26, 6:49 pm, Sean Sullivan [EMAIL PROTECTED] wrote: android.net.Proxy has four static methods: getDefaultHost getDefaultPort getHost(Context) getPort(Context) According to the javadocs: - (getDefaultHost, getDefaultPort) are for a carrier proxy - (getHost, getPort) are for a user specified proxy I'm looking for methods that will return the user specified proxy username and password. I looked at the source code for android.net.Proxy and I don't see any methods for retrieving the username or password: http://git.source.android.com/?p=platform/frameworks/base.git;a=blob;... Are there other API's that I should be looking at? android.net.ConnectivityManager looked promising but I did not see any methods for retrieving proxy configuration: http://code.google.com/android/reference/android/net/ConnectivityMana... android.net.http.AndroidHttpClient doesn't seem to help either. The source code doesn't reveal how Android handles proxies: http://git.source.android.com/?p=platform/frameworks/base.git;a=blob;... Sean On Oct 26, 3:32 pm, Charlie Collins [EMAIL PROTECTED] wrote: I believe the android.net.Proxy class is intended to be used for default carrier proxies, which don't require credentials (but rather use the fact that the device is on the private carrier network as auth) not for connecting through your own proxy server with authentication. You should be able to do your own proxy stuff though, with credentials, using the straight up HttpClient classes - looks like you are almost there. Check out the HttpClient 4 examples. http://hc.apache.org/httpcomponents-client/examples.html This specific example should work on Android, all these classes are there (or so it appears from a quick glance):http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/modul... --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Start Service when phone power up
At a glance your code looks correct. I use that same approach and it works fine (this project for example: http://unlocking-android.googlecode.com/svn/chapter4/trunk/WeatherReporter/src/com/msi/manning/AndroidManifest.xml). The only difference I see there is that your receiver has the LAUNCHER category, and that may be causing it not to match (or worse an illegal combination). Try removing that and see if works. Also, try posting more info about the error if that's not the problem (the debug output of logcat). On Oct 27, 7:05 am, Breno [EMAIL PROTECTED] wrote: Hi, after i read some posts here in forum, i'm able to start my program when phone power up. But i need to start a Service, in this case, the service is a notification, just for testing. Here is my code. package com.test.StartupTest; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.widget.Toast; public class TesteStartup extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { Toast.makeText(context, Test to see if this works,Toast.LENGTH_LONG).show(); //Start explicitly a Service that show in Notification bar a message context.startService(new Intent(context, NotifyInfoUser.class)); } } and the NotifyInfoUser.java: package com.test.StartupTest; import com.test.R; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.app.Service; import android.content.Intent; import android.os.IBinder; public class NotifyInfoUser extends Service{ private NotificationManager mNM; private static int MOOD_NOTIFICATIONS = R.layout.main; @Override public void onCreate() { mNM = (NotificationManager) getSystemService(NOTIFICATION_SERVICE); } @Override public void onStart(Intent intent, int startId) { super.onStart(intent, startId); showNotification(R.drawable.online_connected, Connected); } private void showNotification(int moodId, CharSequence text) { // Set the icon, scrolling text and timestamp. // Note that in this example, we pass null for tickerText. We update the icon enough that // it is distracting to show the ticker text every time it changes. We strongly suggest // that you do this as well. (Think of of the New hardware found or Network connection // changed messages that always pop up) Notification notification = new Notification(moodId, Client Started, System.currentTimeMillis()); // The PendingIntent to launch our activity if the user selects this notification //I guess putting null in Intent(this,null) can be crashing PendingIntent contentIntent = PendingIntent.getActivity(this, 0, new Intent(this, null), 0); // Set the info for the views that show in the notification panel. notification.setLatestEventInfo(this, null, text, contentIntent); // Send the notification. // We use a layout id because it is a unique number. We use it later to cancel. mNM.notify(MOOD_NOTIFICATIONS, notification); } @Override public void onDestroy() { // Cancel the persistent notification. mNM.cancel(MOOD_NOTIFICATIONS); } @Override public IBinder onBind(Intent intent) { return null; } } and finally my manifest ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=com.test android:versionCode=1 android:versionName=1.0.0 uses-permission android:name=android.permission.RECEIVE_BOOT_COMPLETED / application android:icon=@drawable/icon android:label=@string/ app_name receiver android:name=.StartupTest.TesteStartup intent-filter action android:name=android.intent.action.BOOT_COMPLETED / category android:name=android.intent.category.LAUNCHER / /intent-filter /receiver service android:name=.StartupTest.NotifyInfoUser/ /application /manifest When phone power up, the screen with This app execute a ilegal operation, etc appear. When i comment the startService, the Toast appear in screen. So, what is wrong with the context.startService? thanks a lot Breno --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at
[android-developers] Re: How do I pass data between differentActivity/Process?
AIDL, IPC - Parcelable, Binder, etc. is how you pass data directly between processes. http://code.google.com/android/reference/aidl.html That can be cumbersome and complicated though. You may be better off using the Android way and making your own ContentProvider that all the activities and apps can share? http://code.google.com/android/devel/data.html On Oct 27, 3:27 am, Dikers [EMAIL PROTECTED] wrote: Sorry I didn't clear my problem, so you misunderstand my means. For Example: I have five activities in different process, then I want to start a service to manager these activities. In the service , user can send a message to stop/finish a given activities. How do I pass data between these activity and service? Thank you! On Oct 27, 2:30 pm, Dikers [EMAIL PROTECTED] wrote: Thank you! On Oct 27, 2:17 pm, dailyLife[EMAIL PROTECTED] wrote: You can see below demo code: Intent tIntent = new Intent(); tIntent.setClassName(SKIP_PATH, SKIP_PATH_NAME); Bundle tBundle = new Bundle(); tBundle.putCharSequence(request, secondRequest.toString()); tIntent.putExtras(tBundle); startActivity(tIntent); [EMAIL PROTECTED] 2008年10月27日 - Original Message - From: Dikers To: Android Developers Sent: 2008-10-27, 14:11:03 Subject: [android-developers] How do I pass data between differentActivity/Process? Example: activity android:name=TestActivity android:theme=@android:style/ Theme.Dialog android:multiprocess=true intent-filter action android:name=android.intent.action.VIEW / category android:name=android.intent.category.DEFAULT / /intent-filter /activity I start many activities with different processes(android:multiprocess=true), Now how do I pass data between these activities? 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: AndroidHttpClient gone so now what
Yes the root is empty intentionally. I linked all the chapters as you noted chatperX/trunk off of the front page of the site (the one I posted the link for here in this thread). I will try to document that better (put a readme at the trunk root or something), but I did not want to create a separate project for each chapter, yet did want to have separate trunks for each (they may branch for different SDK versions, at different times, etc), so that was done on purpose. On Oct 27, 6:59 am, Ludwig [EMAIL PROTECTED] wrote: The code examples are potentially interesting, but could you make sure that the link to the read-only SVN checkout is correct on the google code site? If using that link it results in an empty directory. If anyone wants to check it out, do not put the /trunk at the end of the SVN URI. The authors seemingly have organized their SVN repository as /chapterX/trunk, not /trunk/chapterX etc, so use: svn checkout *http*://unlocking-android.googlecode.com/svn/unlocking-android-read-only Ludwig 2008/10/26 Charlie Collins [EMAIL PROTECTED] As Mark noted, use the HttpClient 4 stuff, just like the HttpClient examples demonstrate (he posted the link). If you need more Android specifics, the NetworkExplorer sample application from the upcoming Manning book Unlocking Android does all sorts of HttpClient stuff (HTTP, HTTPS, authentication, REST to del.icio.us, REST to GData Contacts with ClientLogin token header, and more). Source is all here (well what's been updated to 1.0 is there, other chapters are still coming): http://code.google.com/p/unlocking-android/ Full disclosure, yes, I am one of the authors, but all the code is available for free at the google code hosting site there, you don't have to buy the book to scope out the code (though it's a damn good book and you might want to check it out too ;)). On Oct 26, 6:11 pm, Sean Sullivan [EMAIL PROTECTED] wrote: On Oct 26, 1:50 am, Emery [EMAIL PROTECTED] wrote: I have spent hours on end trying to figure out how to make a simple HTTP request in Android. Examples and docs are outdated... nothing works. AGGH! Please help I built an Android application that uses HttpClient to send HTTP requests to Yahoo Fire Eagle. The code runs on Android 1.0 You can find all the source code in SVN: http://code.google.com/p/jfireeagle/source/browse/#svn/trunk Sean --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: AndroidHttpClient gone so now what
As Mark noted, use the HttpClient 4 stuff, just like the HttpClient examples demonstrate (he posted the link). If you need more Android specifics, the NetworkExplorer sample application from the upcoming Manning book Unlocking Android does all sorts of HttpClient stuff (HTTP, HTTPS, authentication, REST to del.icio.us, REST to GData Contacts with ClientLogin token header, and more). Source is all here (well what's been updated to 1.0 is there, other chapters are still coming): http://code.google.com/p/unlocking-android/ Full disclosure, yes, I am one of the authors, but all the code is available for free at the google code hosting site there, you don't have to buy the book to scope out the code (though it's a damn good book and you might want to check it out too ;)). On Oct 26, 6:11 pm, Sean Sullivan [EMAIL PROTECTED] wrote: On Oct 26, 1:50 am, Emery [EMAIL PROTECTED] wrote: I have spent hours on end trying to figure out how to make a simple HTTP request in Android. Examples and docs are outdated... nothing works. AGGH! Please help I built an Android application that uses HttpClient to send HTTP requests to Yahoo Fire Eagle. The code runs on Android 1.0 You can find all the source code in SVN: http://code.google.com/p/jfireeagle/source/browse/#svn/trunk Sean --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---