[android-developers] Re: Please help how can use WiFi hotspot feature in application
If you have root access to the device I believe you can use iwconfig through adb to create a wifi hotspot. You will need to know a bit of linux and how iwconfig works. See information here or on iwconfig man page: http://linux.hostweb.com/TopicMessages/comp.os.linux.networking/2141233/1/Default.aspx Now a possible workaround to configuring the wifi hotspot programatically within an apk can be seen here: http://code.google.com/p/market-enabler/wiki/ShellCommands Instead of doing a simple 'ls' command, you would build the iwconfig string you type in the adb, and that would enable the hotspot. Now I have never done this, but look at the source code of this application and see how they do it: http://code.google.com/p/android-wifi-tether/ Line 58 of tether_edify is executing the iwconfig commands described in the iwconfig post above. The app author decided to go with native code, but it's essentially the same concept of getting root access and sending some iwconfig commands to a shell to turn on wifi tethering. On Mar 9, 3:25 am, Edward Choi hypo...@gmail.com wrote: I am a application developer. I want to use WiFi hotspot feature in my application. But I can't find how can set a arbitrarily SSID or WiFi security option by myself in my application. Would you tell me how can set a arbitrarily SSID and WiFi security option in my application. Thank you for reading. -- 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: Buyer’s Currency
Turned ON I also have it enabled (UK), but all the sales are still for the specified amount of my native currency. Are you getting different sale amounts in checkout ? Pent -- 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: Small game develop
Have one big custom surface view for your game. Use canvas to draw stuff to it. Keep fields that are the position. Process input to change the position. Draw the ball where the position is on your surface (using canvas). See the examples that come with Android SDK for more info on using surfaceview. On Mar 9, 10:36 pm, Justin Anderson magouyaw...@gmail.com wrote: * can anyone give me suggestion ??* ummm code? Thanks, Justin Anderson MagouyaWare Developerhttp://sites.google.com/site/magouyaware On Mon, Mar 7, 2011 at 10:11 PM, JackeyChan a397420...@gmail.com wrote: I only want the ball can move with user input: up , down, left, right. now , the ball is created by extend the View class and draw it on the canvas, then set this to be default activity view. but i don't know how to handle user input for re-draw it. can anyone give me suggestion ?? -- 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
Re: [android-developers] Re: Buyer’s Currency
On 10 March 2011 09:10, Pent supp...@apps.dinglisch.net wrote: Turned ON I also have it enabled (UK), but all the sales are still for the specified amount of my native currency. Are you getting different sale amounts in checkout ? Yes. It works. -- Regards, Marcin Orlowski -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Please help how can use WiFi hotspot feature in application
I want to use WiFi hotspot feature in my application. But I can't find how can set a arbitrarily SSID or WiFi security option by myself in my application. Would you tell me how can set a arbitrarily SSID and WiFi security option in my application. There's no standarized way as wifi hotspot is not a part of SDK and there's bunch of apps that offer that feature. If your device is rooted you can have any wifi tether app from market. If you got this app bundled it can be anything manufacturer provided, so you may be out of luck with general approach -- Regards, Marcin Orlowski -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to navigate to nested PreferencesScreen
Probably I was misunderstooded. My problem is not how to navigate from a parent preference screen to child preference screen (this is done by framework), but how to navigate from another activity in my application to child preference screen. How can Preference.setOnPreferenceClickListener() help me with this task? W dniu 2011-03-10 07:43, Justin Anderson pisze: I Use Preference.setOnPreferenceClickListener() when I want to do something like this... Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Tue, Mar 8, 2011 at 1:20 AM, Witold Szymaniak [gmail] witold.szyman...@gmail.com wrote: Hi, in my app I have nested PreferencesScreen's PreferencesScreen PreferencesScreen android:key=application /PreferencesScreen/PreferencesScreen Now I want to fire Intent to take me from currrent Activity directly to application preferences subscreen. How can I do 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 -- 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: Buyer’s Currency
Yes, US only. On Mar 10, 4:10 pm, Pent supp...@apps.dinglisch.net wrote: Turned ON I also have it enabled (UK), but all the sales are still for the specified amount of my native currency. Are you getting different sale amounts in checkout ? Pent -- 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] C2DM for production. Please sort this out Google!
Hi, I am having no luck getting google to upgrade my C2DM developer quota. I have emailed google a number of times to android-c...@google.com to request an upgrade to production level quota for my c2dm application (for cont...@chesspresso.net ) with no reply. It's frustrating to say the least! Its been 2 weeks now, and a few emails later and still no reply. What is the hold-up? Regards, Eurig Jones -- 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] game source code
HI guys, would you share with me where can i get some android game souce code like angrybirds...? i want to develop the game, but i don't know how start? -- 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] game source code
On Thu, Mar 10, 2011 at 2:49 PM, a a harvey.a...@gmail.com wrote: HI guys, would you share with me where can i get some android game souce code like angrybirds...? Nobody has that and the owner will not do that. Even if someone provides you, u wont be able to understand that complex code i want to develop the game, but i don't know how start? Have you ever done game development? start making a simple game first . Its not a CMS u are working on its android. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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: HTC Hero getPicture failed error
This is my code, and i have the following as childs of my manifest-tag in the manifest-file: uses-permission android:name=android.permission.CAMERA / uses-permission android:name=android.permission.INTERNET / uses-permission android:name=android.permission.WRITE_EXTERNAL_STORAGE/ uses-feature android:name=android.hardware.camera / uses-feature android:name=android.hardware.camera.autofocus / uses-feature android:name=android.hardware.camera.flash / @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); getWindow().setFormat(PixelFormat.UNKNOWN); surfaceView = (SurfaceView)findViewById(R.id.camerapreview); surfaceHolder = surfaceView.getHolder(); surfaceHolder.addCallback(this); surfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); controlInflater = LayoutInflater.from(getBaseContext()); View viewControl = controlInflater.inflate(R.layout.control, null); LayoutParams layoutParamsControl = new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT); this.addContentView(viewControl, layoutParamsControl); Button buttonTakePicture = (Button)findViewById(R.id.takepicture); buttonTakePicture.setOnClickListener(new Button.OnClickListener(){ public void onClick(View arg0) { // TODO Auto-generated method stub if (previewing){ camera.takePicture( myShutterCallback, myPictureCallback_RAW, myPictureCallback_PV, myPictureCallback_JPG); } }}); } ShutterCallback myShutterCallback = new ShutterCallback(){ public void onShutter() { // TODO Auto-generated method stub }}; PictureCallback myPictureCallback_RAW = new PictureCallback(){ public void onPictureTaken(byte[] data, Camera cam) { // TODO Auto-generated method stub }}; PictureCallback myPictureCallback_PV = new PictureCallback(){ public void onPictureTaken(byte[] data, Camera cam) { // TODO Auto-generated method stub }}; PictureCallback myPictureCallback_JPG = new PictureCallback(){ public void onPictureTaken(byte[] data, Camera cam) { // TODO Auto-generated method stub Bitmap bitmapPicture = BitmapFactory.decodeByteArray(data, 0, data.length); try{ String path = Environment.getExternalStorageDirectory().toString(); String name = test_img.jpg; OutputStream fOut = null; File file = new File(path, name); fOut = new FileOutputStream(file); bitmapPicture.compress(Bitmap.CompressFormat.JPEG, 5, fOut); fOut.flush(); fOut.close(); MediaStore.Images.Media.insertImage(getContentResolver(),file.getAbsolutePath(),file.getName(),file.getName()); Upload upload = new Upload(); upload.put(bitmapPicture); } catch (Exception e) { e.printStackTrace(); } }}; public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { if (camera != null){ try { camera.setPreviewDisplay(surfaceHolder); camera.startPreview(); previewing = true; } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } public void surfaceCreated(SurfaceHolder holder) { // TODO Auto-generated method stub camera = Camera.open(); } public void surfaceDestroyed(SurfaceHolder holder) { // TODO Auto-generated method stub camera.stopPreview(); camera.release(); camera = null; previewing = false; } On 10 mar, 04:36, lbendlin l...@bendlin.us wrote: show your code how you address the camera. Do you specify
[android-developers] invisible part of layout
hallo, my issue is that I have a layout and at the bottom of layout I have a EditText like this: EditText android:id=@+id/EditText05 android:layout_width=fill_parent android:layout_height=fill_parent android:fadingEdge=vertical android:linksClickable=false android:singleLine=false android:lines=5 android:layout_marginLeft=10dip android:layout_marginRight=10dip android:gravity=top/ And it should be like TextArea or some edittext where I can write more than one line and if text is in the end so it shoud get to the new line. But no scroll to the right. And problem this sdittext is at the bottom and if I click on it so virtual keyboard cover it. And I cant see what I'm writting. if I maybe made a mistake I can't see it and edit the writen text is very difficult. so I think that the right way is when keyboard discovered, so little eidittext will be above at the top of keyboard. or something else but I should see what I put to the edittext. thanks a lot R. -- 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: To detect a nfc tag
the pre-installed Tags aplication defines the following intents: intent-filter action android:name=android.nfc.action.TAG_DISCOVERED/ category android:name=android.intent.category.DEFAULT/ /intent-filter !-- Offer to display anything with NDEF data -- intent-filter action android:name=android.nfc.action.TECH_DISCOVERED/ /intent-filter meta-data android:name=android.nfc.action.TECH_DISCOVERED android:resource=@xml/filter_nfc / with resources xmlns:xliff=urn:oasis:names:tc:xliff:document:1.2 !-- capture anything containing NDEF -- tech-list techandroid.nfc.tech.Ndef/tech /tech-list /resources so the TagViewer application will not be started if an Ndef Tag is discovered. Dominik -- 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 navigate to nested PreferencesScreen
setPreferenceScreen(PreferenceScreen) On Mar 10, 4:52 pm, Witold Szymaniak [gmail] witold.szyman...@gmail.com wrote: Probably I was misunderstooded. My problem is not how to navigate from a parent preference screen to child preference screen (this is done by framework), but how to navigate from another activity in my application to child preference screen. How can Preference.setOnPreferenceClickListener() help me with this task? W dniu 2011-03-10 07:43, Justin Anderson pisze: I Use Preference.setOnPreferenceClickListener() when I want to do something like this... Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Tue, Mar 8, 2011 at 1:20 AM, Witold Szymaniak [gmail] witold.szyman...@gmail.com wrote: Hi, in my app I have nested PreferencesScreen's PreferencesScreen PreferencesScreen android:key=application /PreferencesScreen/PreferencesScreen Now I want to fire Intent to take me from currrent Activity directly to application preferences subscreen. How can I do 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- 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] Action bar: attribute for changing background color when clicking an action button?
Hi all, Using the Honeycomb action bar, when touching an action button, its background become orange-colored (I'm using the Holo.Light theme). I would like to override the theme to change the color of this background, but I can't find the attribute that defines this color. Does someone knows the attribute that define the background color that appears when pressing an Action Button? -- 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] Fragment.onActivityResult is not called
Ran into this issue tonight on my Droid (2.2). I think there's an issue in FragmentActivity.startActivityFromFragment(...). YMMV, but this seems to fix it for me: https://github.com/petedoyle/android-support-v4-googlemaps/commit/06307de35a9de0a89ff52bb42a358ba6740e542c Basically there are two issues: 1) (fragment.mIndex+1)16 should be in parentheses since + has precedence over in Java 2) requestCode*0x should be requestCode0x. (I think the goal is to strip all but the first 16 bits of the request code). To understand the fix, assume you have a fragment index of 0 and a requestCode of 1. With the current code: (fragment.mIndex+1)16 + (requestCode*0x) = (0+1)16 + (1*0x) = (1) (16 + 0x) // since + has precedence over = 165551 = 32768 // according to my debugger = 1000 // fragment index is lost, request code changes from 1 to 32768 With this change: ((fragment.mIndex+1)16) + (requestCode0x) = ((0+1)16) + (10x) = (116) + 1 = 65536 + 1 = 65537 = 1 0001 Thanks, Pete On Wed, Mar 9, 2011 at 9:20 AM, Dianne Hackborn hack...@android.com wrote: Does the API demo for this work wherever you are running it? I have tested it on 3.0, 2.3, and 1.6, and it works in those places, not would I expect it to have any trouble elsewhere. (How this works is very simple, it just masks out the top X bits of the request code to determine which fragment to deliver the result to.) Also of course if you are overriding FragmentActivity.onActivityResult(), you *do* need to be sure to call the inherited version. The behavior here is slightly different than the HC implementation; the activity method will always be called first. On Wed, Mar 9, 2011 at 8:14 AM, drasticp drast...@gmail.com wrote: I have an application that targets 2.1. I'm using the Android Compatibility Package to migrate the code in my Activities to Fragments. I had an Activity which was launching a contact picker as follows: Intent contactPickerIntent = new Intent(Intent.ACTION_PICK, Contacts.CONTENT_URI); startActivityForResult(contactPickerIntent, CONTACT_PICKER_RESULT); The result was appropriately handled in the onActivityResult for the Activity: @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { if (resultCode != Activity.RESULT_OK) return; switch (requestCode) { case CONTACT_PICKER_RESULT: handleResult(data); break; } } Now, I've migrated both the startActivityForResult call and the onActivityResult into a Fragment. I have also extended FragmentActivity in the hosting Activity. The contact picker still launches correctly, but onActivityResult in the fragment is never called. If I override onActivityResult in the FragmentActivity, it *IS* called. However, I don't want to handle the result there because it breaks the encapsulation philosophy of the new fragments. Shouldn't onActivityResult in the fragment be called? Am I missing something? Thanks for your assistance! -- 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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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-voice chat
Hi, can anyine tell me Whether voice chat and video conference is possible in android -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Gettting data from web page
Hi Kunju, First you should know about what data/request info do those 20 sites need, to send back the flight rate for your request in some format (JSON, XML etc.,). That means, you first need to identify the below 2 points, 1. Individual 20 request URLs for each of your 20 sites. 2. The response format they send you (Mostly will be in XML or JSON). Once you receive these 20 responses separately, it is up to you to consolidate those 20 responses and show your response to your user. i.e., Your code will do 20 different requests and will take those 20 responses into consideration for creating the display for your user. However, you should take note of the time that will be taken for these 20 requests and processing those responses. Instead, you can try researching for a single website/application that does all these requests and consolidation and send you the consolidated response in XML or JSON format which you can directly show to your user. You may need to pay for this though, and the response consolidation cannot be customized, obviously. Regards, Sravan On Mar 10, 8:45 am, Spiral123 cumis...@gmail.com wrote: Wow. I actually planned to be nice when I browsed the group this evening. Here is the kindest response that comes to mind: your post makes no sense. 1. Just because you decide to use JSON to send your flight data request to a number of websites does not mean that they will accept it. 2. How Google finds the data from the sites and displays it is something you need to ask them. Without actually knowing I would guess that they tap into one or more aggregated data feeds that must already exist to serve travel agents. 3. If you know where you want to go from and where you want to go to and when then I suggest you research each of the 'several sites' you have in mind and find out what api (if any) they publish for 3rd parties like yourself. I would recommend that before you spend a lot more time working on this that you step back and work out if the end result that you have in mind is actually going to give any added value above all the existing solutions that are already out there. On Mar 8, 11:07 am, Kunju Vava android...@gmail.com wrote: Hi I am developng an app which displays fight ticket rate from several sites, i decided to use json to send the data, the problem is there are 20 more sites showing the details of flight rate , so how we can write this URL, if the data containe URL have big length and cannot find it how the google find all the data from sites and display i give the input as from and to place and date of journey, based on this input how we can finnd rate from a sites? plse give any idea? reply? -- 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: Gyroscope affecting other sensor event types?
Just got an email from Google that Nexus S and Xoom currently do not use the gyroscope for TYPE_GRAVITY, TYPE_LINEAR_ACCELERATION and TYPE_ROTATION_VECTOR but it will be improved sometime in the future. Currently the only way to us the gyroscope in Java is to use TYPE_GYROSCOPE where you get rotational velocity. On Jan 15, 9:05 am, nadam a...@anyro.se wrote: Sorry for the bad link. I found a discussion indicating that devices with gyro will include this input in the calculation of the new events. I assume this is the case for Nexus S too. On 11 Jan, 16:19, nadam a...@anyro.se wrote: In Android 2.3 we got three new sensor event types: TYPE_GRAVITY TYPE_LINEAR_ACCELERATION TYPE_ROTATION_VECTOR I assumed that this had something to do with thegyroscope (TYPE_GYROSCOPE) but looking at the code it seems that TYPE_GRAVITY and TYPE_LINEAR_ACCELERATION only uses the accelerometer, and TYPE_ROTATION_VECTOR uses only the accelerometer and the compass.http://www.google.co.in/codesearch/p?hl=en#uX1GffpyOZk/services/senso... Is this just the default implementation whereas for instance Google Nexus S also uses thegyroscope? -- 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] TranslateAnimation and scaleAnimation run at a time.
Hi all, i am able to run Scale adn Translate animations one after another is it possible to run both at a time.. if possible please help me with some solution.. 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: Action bar: attribute for changing background color when clicking an action button?
Well the answer was simple: the attribute is background. I use the following drawable to specify a red background color when clicking the button: selector xmlns:android=http://schemas.android.com/apk/res/android; android:exitFadeDuration=@android:integer/config_mediumAnimTime item android:state_window_focused=false android:drawable=@android:color/transparent / !-- Even though these two point to the same resource, have two states so the drawable will invalidate itself when coming out of pressed state. -- item android:state_focused=true android:state_enabled=false android:state_pressed=true android:drawable=@color/red / item android:state_focused=true android:state_enabled=false android:drawable=@color/red / item android:state_focused=true android:state_pressed=true android:drawable=@color/red / item android:state_focused=false android:state_pressed=true android:drawable=@color/red / item android:state_focused=true android:drawable=@color/red / item android:drawable=@android:color/transparent / /selector On Mar 10, 9:58 am, Clément Plantier clemplant...@gmail.com wrote: Hi all, Using the Honeycomb action bar, when touching an action button, its background become orange-colored (I'm using the Holo.Light theme). I would like to override the theme to change the color of this background, but I can't find the attribute that defines this color. Does someone knows the attribute that define the background color that appears when pressing an Action Button? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Eclipse wont regenerate files since downloading the 2.3 SDK
Yep, tried all those and nothing happens when I try to use the fix project propeties. On Wed, Mar 9, 2011 at 3:13 PM, gary lucas lucas.g...@gmail.com wrote: Something similar to this happened to me. Have you tried using the 'android' -- Fix this application from the eclipse project manager view? Also, I had R.Id.buttonX returning a TextEdit for awhile... I solved that by deleting the elements from the UI file and then saving and re- adding... I'm assuming you've cleaned, closed and reopened eclipse and all the usual suspects. On Mar 9, 6:34 am, Donal Rafferty draf...@gmail.com wrote: No, the console is blank and there are no problems reported in the problems tab On Wed, Mar 9, 2011 at 2:27 PM, C. Plantier clemplant...@gmail.com wrote: Does the console show any error? On Mar 9, 3:04 pm, Donal Rafferty draf...@gmail.com wrote: Just to add to this I have now also deleted every single XML file under my res folder and the R.java file still did not rebuild, what is going on!?? On Wed, Mar 9, 2011 at 1:07 PM, Donal Rafferty draf...@gmail.com wrote: Clean is of no benefit to me in my case I'm afraid, does nothing. Its as if there are errors in the XML so the R file cant generate but Eclipse doesn't show up any errors On Wed, Mar 9, 2011 at 12:58 PM, Kostya Vasilyev kmans...@gmail.com wrote: I'm occasionally seeing this with ADT 10, SDK 2.2 (API 10), Eclipse 3.6.2. For now, I just clean my project when this happens (usually my code blows up in the main activity's setContent because of shifting resource IDs). -- Kostya 09.03.2011 15:52, draf...@gmail.com пишет: I have recently downloaded the add on to Eclipse for the 2.3 SDK. My minSDK is 2.1update-1. Previously I only had up to the 2.2 SDK and I could change my XML files and drawables without hassle and the generated R.java file would regenerate properly. The same if I changed my aidl files, the stubs would regenerate properly. However since the upgrade to 2.3 SDK I cant change or add any XML files or drawables or aidl files as they wont regenerate causing all sorts of issues. I have googled and tried all sorts of suggestions such as: Using clean. Deleting the gen files and rebuilding (Just leaves an empty Gen folder) Using non automatic build Using the new Formating parameter in Strings.xml However none of them work. Is there something I've missed that I have to do to get the regeneration working for 2.3 SDK? -- Kostya Vasilyev --http://kmansoft.wordpress.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 -- 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 -- 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] java.net.UnknownHostException: android.clients.google.com
Why do I keep seeing this error E/CheckinTask( 243): Checkin failed: https://android.clients.google.com/checkin (request #0) E/CheckinTask( 243): java.net.UnknownHostException: android.clients.google.com E/CheckinTask( 243): at java.net.InetAddress.lookupHostByName(InetAddress.java:506) E/CheckinTask( 243): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:294) E/CheckinTask( 243): at java.net.InetAddress.getAllByName(InetAddress.java:256) E/CheckinTask( 243): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:136) E/CheckinTask( 243): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164) E/CheckinTask( 243): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119) E/CheckinTask( 243): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:359) E/CheckinTask( 243): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555) E/CheckinTask( 243): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487) E/CheckinTask( 243): at android.net.http.AndroidHttpClient.execute(AndroidHttpClient.java:248) E/CheckinTask( 243): at com.google.android.common.http.GoogleHttpClient.executeWithoutRewriting(GoogleHttpClient.java:203) E/CheckinTask( 243): at com.google.android.common.http.GoogleHttpClient.execute(GoogleHttpClient.java:245) E/CheckinTask( 243): at com.google.android.common.http.GoogleHttpClient.execute(GoogleHttpClient.java:313) E/CheckinTask( 243): at com.google.android.gsf.checkin.CheckinTask.sendRequest(CheckinTask.java:254) E/CheckinTask( 243): at com.google.android.gsf.checkin.CheckinTask.doInBackground(CheckinTask.java:150) E/CheckinTask( 243): at com.google.android.gsf.checkin.CheckinService$1.doInBackground(CheckinService.java:221) E/CheckinTask( 243): at com.google.android.gsf.checkin.CheckinService$1.doInBackground(CheckinService.java:214) E/CheckinTask( 243): at android.os.AsyncTask$2.call(AsyncTask.java:185) E/CheckinTask( 243): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306) E/CheckinTask( 243): at java.util.concurrent.FutureTask.run(FutureTask.java:138) E/CheckinTask( 243): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088) E/CheckinTask( 243): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581) E/CheckinTask( 243): at java.lang.Thread.run(Thread.java:1019) How can I fix it? Youtube won't work. Markey won't work. gmail won't work. Then suddenly they work. I don't get it. It's just too dodgy. Shawn NexusOne 2.3.3 using wifi -- 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] Android-voice chat
Yes i am sure it must be by some way or other On Thu, Mar 10, 2011 at 2:40 PM, Jayanthi jaia...@gmail.com wrote: Hi, can anyine tell me Whether voice chat and video conference is possible in android -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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] To add an footer ImageView on a layout having ScrollView and relative layout
Hi every one, I have an query that, if I add an image view by align parent then it sticks to ScrollView not to relative layout. My layout xml is as follow ScrollView xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=fill_parent android:id=@+id/dealScroll android:background=@drawable/ whiteBackground android:scrollbarFadeDuration=3000 android:scrollbarDefaultDelayBeforeFade=2000 android:fadeScrollbars=true RelativeLayout android:layout_width=fill_parent android:layout_height=fill_parent android:id=@+id/dealRelative Button android:layout_alignParentLeft=true android:id=@+id/merchantLocationButton android:layout_width=wrap_content android:layout_height=wrap_content android:layout_margin=5dp android:background=@drawable/ merchant_loc_button/Button Button android:layout_alignParentRight=true android:id=@+id/descriptionButton android:layout_width=wrap_content android:layout_height=wrap_content android:layout_margin=5dp android:background=@drawable/ description_button/Button ImageView android:src=@drawable/footer android:scaleType=fitXY android:layout_alignParentBottom=true android:layout_width=fill_parent android:layout_height=wrap_content/ImageView /RelativeLayout /ScrollView What I am missing? plz help. Thanks in adv Sapna -- 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: Android-voice chat
Fine, Do google provide any Library for video conference On Mar 10, 4:18 pm, Robin Talwar r.o.b.i.n.abhis...@gmail.com wrote: Yes i am sure it must be by some way or other On Thu, Mar 10, 2011 at 2:40 PM, Jayanthi jaia...@gmail.com wrote: Hi, can anyine tell me Whether voice chat and video conference is possible in android -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Android-voice chat
Ya sure... just wait i will provide you the complete source code On Thu, Mar 10, 2011 at 5:30 PM, Jayanthi jaia...@gmail.com wrote: Fine, Do google provide any Library for video conference On Mar 10, 4:18 pm, Robin Talwar r.o.b.i.n.abhis...@gmail.com wrote: Yes i am sure it must be by some way or other On Thu, Mar 10, 2011 at 2:40 PM, Jayanthi jaia...@gmail.com wrote: Hi, can anyine tell me Whether voice chat and video conference is possible in android -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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] Re: How to keep the code base same for Lower and Higher API levels
Like this, for the audio manager (older API versions do not support audio fading) public static CustomAudioManager newInstance(Context context) { final int sdkVersion = Integer.parseInt(Build.VERSION.SDK); CustomAudioManager cam = null; if (sdkVersion 8) return cam; cam = new FroyoAudioManager(context.getApplicationContext()); return cam; } On Mar 10, 1:42 am, Kostya Vasilyev kmans...@gmail.com wrote: If it's just a few 3.0 methods, you can use Java reflection or API-specific encapsulation classes. -- Kostya 10.03.2011 8:11, Jacob пишет: Hi all I am developing a project for OS version 2.2 (API level 8). I have an issue now. With the release of OS 3.0 (Honeycomb - API 11), I have to use some calls from this new OS. Well, How do I keep my code base same? I an unable to include the 3.0 speicific APIs in 2.2 project. If I created a 3.0 project, I can't run that on 2.2 OS :) 1) Is there any way to solve this issue? Its very difficult to keep different project/code base for every new release. 2) Is there a way to have one package contian 2 apps? Any help is much appreciated. Thank you Jacob -- Kostya Vasilyev --http://kmansoft.wordpress.com- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Eclipse wont regenerate files since downloading the 2.3 SDK
Ok, I've tried everything and this is eating up far too much development time, Is there anyone with a proper solution to this? I have SDK 2.3 and the latest ADT on 3 different machines now and R.java wont rengenrate on any of them so someone else has to have the exact same problem and a solution? If not is there a way to go back to the 2.2 SDK and previous ADT? On Thu, Mar 10, 2011 at 10:35 AM, Donal Rafferty draf...@gmail.com wrote: Yep, tried all those and nothing happens when I try to use the fix project propeties. On Wed, Mar 9, 2011 at 3:13 PM, gary lucas lucas.g...@gmail.com wrote: Something similar to this happened to me. Have you tried using the 'android' -- Fix this application from the eclipse project manager view? Also, I had R.Id.buttonX returning a TextEdit for awhile... I solved that by deleting the elements from the UI file and then saving and re- adding... I'm assuming you've cleaned, closed and reopened eclipse and all the usual suspects. On Mar 9, 6:34 am, Donal Rafferty draf...@gmail.com wrote: No, the console is blank and there are no problems reported in the problems tab On Wed, Mar 9, 2011 at 2:27 PM, C. Plantier clemplant...@gmail.com wrote: Does the console show any error? On Mar 9, 3:04 pm, Donal Rafferty draf...@gmail.com wrote: Just to add to this I have now also deleted every single XML file under my res folder and the R.java file still did not rebuild, what is going on!?? On Wed, Mar 9, 2011 at 1:07 PM, Donal Rafferty draf...@gmail.com wrote: Clean is of no benefit to me in my case I'm afraid, does nothing. Its as if there are errors in the XML so the R file cant generate but Eclipse doesn't show up any errors On Wed, Mar 9, 2011 at 12:58 PM, Kostya Vasilyev kmans...@gmail.com wrote: I'm occasionally seeing this with ADT 10, SDK 2.2 (API 10), Eclipse 3.6.2. For now, I just clean my project when this happens (usually my code blows up in the main activity's setContent because of shifting resource IDs). -- Kostya 09.03.2011 15:52, draf...@gmail.com пишет: I have recently downloaded the add on to Eclipse for the 2.3 SDK. My minSDK is 2.1update-1. Previously I only had up to the 2.2 SDK and I could change my XML files and drawables without hassle and the generated R.java file would regenerate properly. The same if I changed my aidl files, the stubs would regenerate properly. However since the upgrade to 2.3 SDK I cant change or add any XML files or drawables or aidl files as they wont regenerate causing all sorts of issues. I have googled and tried all sorts of suggestions such as: Using clean. Deleting the gen files and rebuilding (Just leaves an empty Gen folder) Using non automatic build Using the new Formating parameter in Strings.xml However none of them work. Is there something I've missed that I have to do to get the regeneration working for 2.3 SDK? -- Kostya Vasilyev --http://kmansoft.wordpress.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 -- 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Eclipse wont regenerate files since downloading the 2.3 SDK
Are you also seeing Project cannot be built until path dependencies are fixed (or something like that) in the Problems view? Is the gen folder missing entirely? When this happened to me, I was able to fix it by repeatedly doing Refresh in the Package Explorer view (Right mouse - Refresh, or F5) and Project - Clean. After two or three cycles it finally worked. I'm using SDK 2.2, though - still with Tools 10, and Eclipse 3.6.2 -- Kostya 10.03.2011 15:16, Donal Rafferty пишет: Ok, I've tried everything and this is eating up far too much development time, Is there anyone with a proper solution to this? I have SDK 2.3 and the latest ADT on 3 different machines now and R.java wont rengenrate on any of them so someone else has to have the exact same problem and a solution? If not is there a way to go back to the 2.2 SDK and previous ADT? On Thu, Mar 10, 2011 at 10:35 AM, Donal Rafferty draf...@gmail.com mailto:draf...@gmail.com wrote: Yep, tried all those and nothing happens when I try to use the fix project propeties. On Wed, Mar 9, 2011 at 3:13 PM, gary lucas lucas.g...@gmail.com mailto:lucas.g...@gmail.com wrote: Something similar to this happened to me. Have you tried using the 'android' -- Fix this application from the eclipse project manager view? Also, I had R.Id.buttonX returning a TextEdit for awhile... I solved that by deleting the elements from the UI file and then saving and re- adding... I'm assuming you've cleaned, closed and reopened eclipse and all the usual suspects. On Mar 9, 6:34 am, Donal Rafferty draf...@gmail.com mailto:draf...@gmail.com wrote: No, the console is blank and there are no problems reported in the problems tab On Wed, Mar 9, 2011 at 2:27 PM, C. Plantier clemplant...@gmail.com mailto:clemplant...@gmail.com wrote: Does the console show any error? On Mar 9, 3:04 pm, Donal Rafferty draf...@gmail.com mailto:draf...@gmail.com wrote: Just to add to this I have now also deleted every single XML file under my res folder and the R.java file still did not rebuild, what is going on!?? On Wed, Mar 9, 2011 at 1:07 PM, Donal Rafferty draf...@gmail.com mailto:draf...@gmail.com wrote: Clean is of no benefit to me in my case I'm afraid, does nothing. Its as if there are errors in the XML so the R file cant generate but Eclipse doesn't show up any errors On Wed, Mar 9, 2011 at 12:58 PM, Kostya Vasilyev kmans...@gmail.com mailto:kmans...@gmail.com wrote: I'm occasionally seeing this with ADT 10, SDK 2.2 (API 10), Eclipse 3.6.2. For now, I just clean my project when this happens (usually my code blows up in the main activity's setContent because of shifting resource IDs). -- Kostya 09.03.2011 15:52, draf...@gmail.com mailto:draf...@gmail.com пишет: I have recently downloaded the add on to Eclipse for the 2.3 SDK. My minSDK is 2.1update-1. Previously I only had up to the 2.2 SDK and I could change my XML files and drawables without hassle and the generated R.java file would regenerate properly. The same if I changed my aidl files, the stubs would regenerate properly. However since the upgrade to 2.3 SDK I cant change or add any XML files or drawables or aidl files as they wont regenerate causing all sorts of issues. I have googled and tried all sorts of suggestions such as: Using clean. Deleting the gen files and rebuilding (Just leaves an empty Gen folder) Using non automatic build Using the new Formating parameter in Strings.xml However none of them work. Is there something I've missed that I have to do to get the regeneration working for 2.3 SDK? -- Kostya Vasilyev --http://kmansoft.wordpress.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 mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to
[android-developers] Problem about using resource in jar file
I have use an external jar in my application. I add the jar by adding LOCAL_STATIC_JAVA_LIBRARIES := my-jar in Android.mk. However, I found that the resource files of the jar are not included into my apk. I have compile the problem in eclipse but the resource can be included in the apk build by eclipse. I used aapt list my-prj.apk to list out the resources in the apks. Do anyone know how can I add the resource into the apk if I compile with Android.mk? Thank you very much. -- 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: May i join the group?
I think you already have. On Mar 9, 5:37 am, yy xuye xueyy2...@gmail.com wrote: Dear sir, I'm a developer from China. For the current, i have some problem about android development. So i hope to get some help. May i join the group? Tks. Best regards. -- 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: class cast exception
You know, indicating which line the error occurred on would make it likely that someone would actually look at your problem, rather than just ignoring you. On Mar 8, 12:29 am, Sarath Krishna sarathkrishn...@gmail.com wrote: I am getting class cat exception while running the following code. I checked the code but everything was fine . Can any one please help me out public class GPSsens extends Service { /** Name of the service used for logging */ private static final String TAG = SystemSensService; /** Version of the JSON records */ private static final String VER = 1.4; /** Types of messages used by this service */ private static final int USAGESTAT_MSG = 1; private static final int UPLOAD_START_MSG = 2; private static final int UPLOAD_END_MSG = 3; private static final int BATHIST_MSG = 4; private static final int PROC_MSG = 5; /** String names of JSON records */ private static final String USAGESTAT_TYPE = usage; private static final String NETTRANS_TYPE = transmission; private static final String NETRECV_TYPE = receive; private static final String CPUSTAT_TYPE = cpu; private static final String GPSSTAT_TYPE = gps; private static final String SENSORSTAT_TYPE = sensor; private static final String BATTERY_TYPE = battery; private static final String SCREEN_TYPE = screen; private static final String NET_TYPE = network; private static final String CALL_TYPE = call; private static final String SYSTEMSENS_TYPE = systemsens; private static final String NETDEV_TYPE = netdev; /** Intervals used for timers in seconds */ private long USAGESTAT_INTERVAL; private long BATHIST_INTERVAL; private long PROC_INTERVAL; /** Default values for timers in seconds */ private static final long DEFAULT_USAGESTAT_INTERVAL = 12; private static final long DEFAULT_BATHIST_INTERVAL = 12; private static final long DEFAULT_PROC_INTERVAL = 12; /** Power manager object used to acquire a partial wakeLock */ private PowerManager m_PM; /** WakeLock object */ private PowerManager.WakeLock m_WL; /** State variable set when a worker thread starts uploading */ private boolean mIsUploading; /** Usage statistics object */ private Usage mUsageStat; /** Battery History object */ private History mHistoryStat; /** Proc object */ private Proc mProc; /** Uploader Object */ //private SystemSensUploader mUploader; /** Dumper Object -- used for debugging */ private SystemSensDumper mDumper; /** Database adaptor object */ private SystemSensDbAdaptor mDbAdaptor; /** Holds the IMEI of the device */ private String IMEI; /** telephonyManager object */ private TelephonyManager telManager; //private SystemSensLogger logger; /** Battery information record for reporting to the activity */ private JSONObject batteryJson; /** * Class for clients to access. Because we know this service always * runs in the same process as its clients, we don't need to deal with * IPC. */ public class LocalBinder extends Binder { GPSsens getService() { return GPSsens.this; } } @Override public void onStart(Intent intent, int startId) { super.onStart(intent, startId); Log.i(TAG, onStart); } @Override public void onCreate() { super.onCreate(); Log.i(TAG, onCreate); // Set the default intervals for USAGE and BATHIST counters USAGESTAT_INTERVAL = DEFAULT_USAGESTAT_INTERVAL; BATHIST_INTERVAL = DEFAULT_BATHIST_INTERVAL; PROC_INTERVAL = DEFAULT_PROC_INTERVAL; /* This object is used to log call durations */ /* telManager = (TelephonyManager)this.getSystemService(Context.TELEPHONY_SERVICE); this.IMEI = telManager.getDeviceId(); */ mIsUploading = false; mDbAdaptor = new SystemSensDbAdaptor(this); //mUploader = new SystemSensUploader(mDbAdaptor); mDumper = new SystemSensDumper(mDbAdaptor, this); mUsageStat = new Usage(); mHistoryStat = new History(this); mProc = new Proc(); try { mDbAdaptor.open(); } catch (SQLException e) { Log.e(TAG, Exception, e); } // Register for battery updates // registerReceiver(mBatteryInfoReceiver, new IntentFilter( // Intent.ACTION_BATTERY_CHANGED)); // Register for screen updates // Start getting process information /*Message msg1 = mHandler.obtainMessage(USAGESTAT_MSG); long nextTime = SystemClock.uptimeMillis() + USAGESTAT_INTERVAL; mHandler.sendMessageAtTime(msg1, nextTime);*/
[android-developers] Re: Managing Out of memory
Of course, the Runtime values are reporting on the garbage-collected heap, and are only really valid immediately after a GC has been performed. Plus, images are stored in a DIFFERENT heap that is harder (if even possible) to query. On Mar 9, 1:42 am, Thomas thomasjakw...@gmail.com wrote: you could model this in an algorithmic fashion: check memory if memory is sufficient fetch images if low memory (after image fetch), release previously fetched image(s) check out the java.lang.Runtime class, it has exactly the functions you're looking for (specifically totalMemory() for the device's total memory, and freeMemory() for how much free memory is left) Here it is on the android developer website:http://developer.android.com/reference/java/lang/Runtime.html On Mar 9, 1:06 am, Manish Garg mannishga...@gmail.com wrote: Hi All, I want to check low memory state in my application. In my application i am fetching some iamges from the server and displaying them in the gallery. I am fetching images in batch, not at single time. At the time of low memory, i want to release previously fetched image so that i can store newly fetched images. my approach is to find out available memory, compare it with the threshold memory. If both are equal then release previously fetched images. but size of the threshold is in MB, while i would require only 500kb to 1 MB for new images. Please give me some 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: Small game develop
After update the changes of the position, call the invalidate() method. This method redraw the canvas. Regards, Felix On Mar 8, 10:11 am, JackeyChan a397420...@gmail.com wrote: I only want the ball can move with user input: up , down, left, right. now , the ball is created by extend the View class and draw it on the canvas, then set this to be default activity view. but i don't know how to handle user input for re-draw it. can anyone give me suggestion ?? -- 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] Parsing a JSON response
On Wed, Mar 9, 2011 at 11:20 PM, David Williams dwilli...@dtw-consulting.com wrote: Thanks for the reply. Perhaps I need to revisit PhoneGap. I did take a quick look but didn't get very far with it. It certainly seems to be a closer match to WebOS development than is standard Android SDK stuff. Both PhoneGap and WebOS: -- have all your application logic in HTML, CSS, and JS -- expose platform capabilities via objects injected into the JS namespace Now, I haven't looked at Mojo in a while, so it may be my recollection of the skill sets it uses is fuzzy. In that case, I apologize. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training Worldwide: 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] Fwd: get contacts with email id
hi all, i've got problem with cursor joiner i am trying to fetch contacts with email id.but stuck in strange problem i want to fetch rows who are in both so i am doing it when cursorjoinerresult returns BOTH but i got this output see this log after 9th row id it directly jumps to other row ids starting with 9 here it is _id | display_name | data1(email id) format i replaced them due to privacy issues 1|[contact name]|[email id] 4|[contact name]|[email id] 5|[contact name]|[email id] 6|[contact name]|[email id] 7| 8| 9| 90| 91| 92| 93| 94| 95| 96| 97| 98| 99| here is my questionhttp://stackoverflow.com/questions/5258984/get-contacts-with-email-id -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: May i join the group?
I think you already have. 2011/3/10 DanH danhi...@ieee.org I think you already have. On Mar 9, 5:37 am, yy xuye xueyy2...@gmail.com wrote: Dear sir, I'm a developer from China. For the current, i have some problem about android development. So i hope to get some help. May i join the group? Tks. Best regards. -- 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
Re: [android-developers] Re: Status Bar Notifications
How to get time from database n trigger notification on that time? On Thu, Mar 10, 2011 at 4:45 AM, roberto roberto.fo...@gmail.com wrote: On Mar 9, 11:41 am, Marcin Orlowski webnet.andr...@gmail.com wrote: On 9 March 2011 19:59, roberto roberto.fo...@gmail.com wrote: http://hub.buzzbox.com/android-sdk/ Looks interesting but I personally am not happy with it being closed source (which I could stand) but integration with their analics. Who knows what it analites when your app got internet permission. But can be I am simply exaggerating :) the buzzbox sdk actually does not require internet permission if you don't want to use the analytics. you can use the scheduler without analytics. Roberto -- Regards, Marcin Orlowski -- 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
Re: [android-developers] Re: Status Bar Notifications
From a database? Same as anything else, by using a query. Probably easiest to keep date/time values as a long integer (standard Unix representation). Once you have the time value, use AlarmManager and NotificationManager classes in Android. 10.03.2011 16:47 пользователь Brad Stintson geek.bin...@gmail.com написал: How to get time from database n trigger notification on that time? On Thu, Mar 10, 2011 at 4:45 AM, roberto roberto.fo...@gmail.com wrote: On Mar 9, 11:41 am, Marcin Orlowski webnet.andr...@gmail.com wrote: On 9 March 2011 19:59, roberto roberto.fo...@gmail.com wrote: http://hub.buzzbox.com/android-sdk/ Looks interesting but I personally am not happy with it being closed source (which I could stand) but integration with their analics. Who knows what it analites when your app got internet permission. But can be I am simply exaggerating :) the buzzbox sdk actually does not require internet permission if you don't want to use the analytics. you can use the scheduler without analytics. Roberto -- Regards, Marcin Orlowski -- 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 -- 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] Publishing App to Android Market
Hi All I need to publish my android app to android market,Could anyone please let me know the procedure?, Is there any specific guidelines from android market to do publish the app,Like UI guideline or Does the Android market guys check the app before putting it in Android market. -- Thanks and Regards Ajmer 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
Re: [android-developers] Publishing App to Android Market
On 10 March 2011 14:51, Ajmer singh ajmer.si...@evontech.com wrote: Hi All I need to publish my android app to android market,Could anyone please let me know the procedure?, Is there any specific guidelines from android market to do publish the app,Like UI guideline or Does the Android market guys check the app before putting it in Android market. Log in to your publisher account. Upload your APK and fill all the mandatory fields. Click Publish. Done -- Regards, Marcin Orlowski -- 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 tiles unnecessarily reloading when panning
Having the same issue and could not find anything about it until someone directed me here. I posted an example video on youtube that shows the problem - especially around 0:40 second mark: http://www.youtube.com/watch?v=bBnzB5s1I5c -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: 2.2.1 FRG83D: Existing map tiles are unnecessarily reloaded when panning, is it just me?
Having the same issue and could not find anything about it until someone directed me here. I posted an example video on youtube that shows the problem - especially around 0:40 second mark: http://www.youtube.com/watch?v=bBnzB5s1I5c -- 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] C2DM for production. Please sort this out Google!
On Thu, Mar 10, 2011 at 3:12 AM, Eurig Jones eurigjo...@gmail.com wrote: What is the hold-up? It's Google. Customer service is not something they're exactly known for. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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 AVD 3.0 Problem
Hi All I have just installed the Android 3.0. I am facing a problem. I am using Window XP, I have installed the .NET 4.0 version also. As i started the AVD 3.0, The visual studio gives me debugging problem of Emulator. Any body now, how to do 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: Using a Freemium Model
Justin, So the donate key app doesn't actually implement any logic? The mere fact that it is an available package on the phone (means that the user paid money for the download) is the flag that tells the main app to unlock code features? Nice. ...Jake JA == Justin Anderson magouyaw...@gmail.com writes: JA I do this with AppSwipe! on the Market. The main app is free and JA there is also a donate key app. The package names are as JA follows: JA AppSwipe!: com.magouyaware.appswipe JA Donate Key: com.magouyaware.appswipe2 JA To determine if the user has paid for additional features I have this class: JA public class AppMode JA { JA public static boolean isDonateMode(Context context) JA { JA PackageManager mgr = context.getPackageManager(); JA int sigMatch = mgr.checkSignatures(context.getPackageName(), JA com.magouyaware.appswipe2); JA return sigMatch == PackageManager.SIGNATURE_MATCH; JA } JA } JA And I can do things like this: JA if (AppMode.isDonateMode(myContext) JA { JA //Unlock features here JA } JA It works quite nicely... JA Thanks, JA Justin Anderson JA MagouyaWare Developer JA http://sites.google.com/site/magouyaware JA On Wed, Mar 9, 2011 at 8:40 PM, PatternMusic richardlw...@gmail.com wrote: Kindle is allowed to circumvent the Market because Amazon is selling digital content or goods that may be consumed outside of the application itself. This is not the same as unlocking a feature (e.g. the removal of ads) in ones app. See *Paid and Free Applications *in* * http://www.android.com/us/developer-content-policy.html There are many apps on the Market that are free but unlock additional features through additional APK downloads from the Market. I don't know the best practice for an IPC unlock mechanism, but it wouldn't be hard to do, and that would seem to comply with Google's requirement of using the Market's Payment Processor. The imminent in-app payment system will no doubt be prettier. Disclaimer: IANAL. - Richard Lawler -- 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 JA -- JA You received this message because you are subscribed to the Google JA Groups Android Developers group. JA To post to this group, send email to android-developers@googlegroups.com JA To unsubscribe from this group, send email to JA android-developers+unsubscr...@googlegroups.com JA For more options, visit this group at JA http://groups.google.com/group/android-developers?hl=en -- Jake Colman -- Android Tinkerer -- 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] Request a webpage and display in app
Hi everyone, I am trying to create an app that take an URl as a user input and displays the webpage below the textbox. I would like to know how to get and dipslay the webpage and how to pass the URL to the webpage method. Thanks -- Raghav Sood http://www.raghavsood.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] achartengine size problem.
Hi, first I know that there is a group for achartengine but it's rather slowly one so sorry for trying to solve it here. I am trying to display BarChart with ChartFactory.getBarChartView. I have created xml file that's like this: ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent LinearLayout android:layout_width=fill_parent android:layout_height=wrap_content xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=horizontal android:layout_weight=1 TextView android:layout_width=fill_parent android:layout_height=fill_parent android:text=bla3 android:layout_weight=1 android:gravity=center_horizontal / TextView android:layout_width=fill_parent android:layout_height=fill_parent android:text=bla2 android:layout_weight=1 android:gravity=center_horizontal / TextView android:layout_width=fill_parent android:layout_height=fill_parent android:text=bla1 android:layout_weight=1 android:gravity=center_horizontal / /LinearLayout LinearLayout xmlns:android=http://schemas.android.com/apk/ res/ android android:id=@+id/chart android:orientation=horizontal android:layout_width=fill_parent android:layout_height=wrap_content android:layout_weight=1 / /LinearLayout and I am adding chart like this: layout = (LinearLayout) findViewById(R.id.chart); mChartView = ChartFactory.getBarChartView(this, buildBarDataset(titles, values), renderer, Type.DEFAULT); layout.addView(mChartView, new LayoutParams (LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); Why does chart expands and doesn't leave any room for first linear layout? is this bug or what. How can you make it wrap or get smaller in proportion to other stuff in xml layout file. Tnx 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
Re: [android-developers] Request a webpage and display in app
Use a WebView. Here is a sample application: https://github.com/commonsguy/cw-android/tree/master/WebKit/Browser1 You may also wish to read the Basic Usage section of the WebView documentation: http://developer.android.com/reference/android/webkit/WebView.html On Thu, Mar 10, 2011 at 9:24 AM, Raghav Sood raghavs...@gmail.com wrote: Hi everyone, I am trying to create an app that take an URl as a user input and displays the webpage below the textbox. I would like to know how to get and dipslay the webpage and how to pass the URL to the webpage method. Thanks -- Raghav Sood http://www.raghavsood.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 -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training Worldwide: 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: TranslateAnimation and scaleAnimation run at a time.
On Mar 10, 5:21 am, leela morampudile...@gmail.com wrote: i am able to run Scale adn Translate animations one after another is it possible to run both at a time.. Read the documentation for AnimationSet. -- 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: Request a webpage and display in app
On Mar 10, 3:24 pm, Raghav Sood raghavs...@gmail.com wrote: Hi everyone, Hi to you also! I am trying to create an app that take an URl as a user input This is first part. http://developer.android.com/guide/tutorials/hello-world.html Learn how to use components and take input from views like textbox. and displays the webpage below the textbox. Second part. http://mobile.tutsplus.com/tutorials/android/android-sdk-embed-a-webview-with-the-webkit-engine/ Take tutorial in using webview, that will be used to show you page. There is event google webview example: http://developer.android.com/guide/tutorials/views/hello-webview.html Thanks No problem, happy coding! -- Raghav Soodhttp://www.raghavsood.com/ Nikola. -- 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] Geocoder IOException
At random times my production app will get GeoCoder error: java.io.IOException: Unable to parse response from server When I try to get the location name corresponding to a given latitude/longitude taken from a Location object. Is there anything I should be doing differently so that this doesn't happen? It's random and usually clears itself up next time I try to update the information. But it's annoying. Is it just that Google's sever may have been unavailable at the time of the request or that my phone's internet connection was temporarily flaky? Thanks. ...Jake -- Jake Colman -- Android Tinkerer -- 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] Assets in the assets folder
Some of my users are running across a very peculiar bug in the most recent update to one of my apps. I released an update to my app a few days ago. In this update, I placed some files in the apps assets folder. One of the activities needs to read a couple of these files when it starts. Through all my testing, everything worked fine. However, now that it is out in the wild, for some users who updated, the app is seemingly not reading these files correctly...almost as if they don't exist. So, my question is: Is there ever an instance where an update to an app that adds some files to the assets folder will not actually update the app with those files in place? Are there potentially device specific issues at hand here? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Using a Freemium Model
Couldn't a user just create their own dummy APK with the same package and install it to circumvent 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
Re: [android-developers] Publishing App to Android Market
On Thu, Mar 10, 2011 at 7:51 AM, Ajmer singh ajmer.si...@evontech.comwrote: Could anyone please let me know the procedure? Read the official documentation. Is there any specific guidelines from android market to do publish the app,Like UI guideline or Does the Android market guys check the app before putting it in Android market. No there are no guidelines or moderation. All manners of crap is allowed. However, at any point after the fact someone from Google can decide they don't like your app and can pull it without explanation. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Request a webpage and display in app
Thanks Mark and Nikola, You have solved my problem. I have one more question. How do I restrict the WebView Browsing to only 1 domain i.e. users can only browse .com sites. P.S. Mark your commonsware site copyright reads 2009 Thanks -- Raghav Sood http://www.raghavsood.com/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Request a webpage and display in app
On Thu, Mar 10, 2011 at 9:57 AM, Raghav Sood raghavs...@gmail.com wrote: I have one more question. How do I restrict the WebView Browsing to only 1 domain i.e. users can only browse .com sites. Use a WebViewClient and shouldOverrideUrlLoading(). P.S. Mark your commonsware site copyright reads 2009 That would be because that code was written in 2009. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training Worldwide: 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
Re: [android-developers] Re: Request a webpage and display in app
Thanks Mark, I'll see how this goes. -- Raghav Sood http://www.raghavsood.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: Global Variables
On 3/9/2011 7:35 PM, TreKing wrote: On Wed, Mar 9, 2011 at 4:30 PM, Kenny Riddile kfridd...@gmail.com mailto:kfridd...@gmail.com wrote: Assuming the singleton is modifiable via its interface, then for all intents and purposes, yes, they are. Again, no. Singleton is a design pattern whose purpose is to simplify and control access to a an object for which there is and will only be one instance of. This instance is set once and used throughout. It does not vary or change. It is not variable. Of course you can change the *state* of the singleton object, if that's what you mean by modifiable, but if you change the *value* of the object itself, as one would do with global *variables*, it is no longer a singleton. Even in the sense that the singleton state is modifiable, the whole point of the singleton is to provide an interface through which this globally accessible object, and its state, is manipulated. There is controlled access. This is not the case with your run-of-mill, freely accessible global variable. On Wed, Mar 9, 2011 at 6:11 PM, David Williams dwilli...@dtw-consulting.com mailto:dwilli...@dtw-consulting.com wrote: Ok, trying to do this but struggling. I created a class as follows: If all you're doing is defining some *constants* that are not going to change, extending Application is way overkill. Especially since casting up to your Application type every time you need something makes your code horrendous to look at. You can just do this: class Constants { public static final String KEY = MyKey; } Then do Constants.Key where you need it. Done. On Wed, Mar 9, 2011 at 6:11 PM, David Williams dwilli...@dtw-consulting.com mailto:dwilli...@dtw-consulting.com wrote: Sorry, this is just my lack of knowledge on Java here. I was hoping it was something like globalVars.getApiKey(), but that doesn't seem to work. I highly recommend you brush up on Java, reviewing static and instance level access of functions and data in particular. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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 Perhaps my blanket statement was to simplistic. Not ALL singletons are global variables. Also, not all globals are variables (globally accessible static constants for example). However, all STATEFUL singletons are globals, and all stateful singletons with mutable state (via methods or whatever) are essentially global variables as they create the same architectural issues. Limiting my statement to stateful singletons is kind of irrelevant though, since there's no point in limiting a stateless type to one instantiation. Just because a singleton's state is only mutable by using its interface doesn't change the fact that you are varying globally accessible state. When I was first starting my career, I thought singletons were great (after all, I read about them in a book!), but experience has taught me that there is almost always a better way than using mutable global state. Singletons essentially get you two things: - the guarantee that only one instance can exist - global access to that single instance The second is bad for all the reasons that global variables are considered bad, and the first is unnecessary. If you only need one instance of a class, then just make one. It really is that simple. Then give that instance to whomever needs it, instead of letting them magically pull it from the ether. -- 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] lost the password of the keystore
* Just another proof that the current scheme is broken.* The current scheme is not broken. It was intentionally designed the way it is for security purposes. Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Wed, Mar 9, 2011 at 11:48 PM, Nikolay Elenkov nikolay.elen...@gmail.comwrote: On Wed, Mar 9, 2011 at 11:32 AM, Pure J purej1...@gmail.com wrote: I am doing an update on my application. I would like to sign it and publish However, when doing the process of jarsigner. It prompt me for the passphrase, unluckily , I forgot the passphrase. So, I would like to have some advice on it. 1) Is it possible to recovery/reset the passpharse of the keystore. Write a program to brute force it, start it and keep your fingers crossed :) Someone already reverse-engineered it for your convenience: http://metastatic.org/source/JKS.html Might take some time, depending on how long your password was. If you remember *exactly* how long it was, that would make things easier. Just another proof that the current scheme is broken. (see the 'A Cautionary Tale: Backup your Keystore' 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 -- 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: Fragment.onActivityResult is not called
I think Peter's response is accurate. There seems to be a bug in the FragmentActivity.startActivityFromFragment method. I went back and looked at the ApiDemos code and it does work as long as requestCode = 0. However, if you change the request code to anything other than zero, the ApiDemos will fail. I reported the issue here: http://code.google.com/p/android/issues/detail?id=15394 -- 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: Android AVD 3.0 Problem
I don't quite understand your problem, are you trying to do Android development using Visual Studio?? On Mar 10, 8:16 am, Ali Murtaza mralimurt...@gmail.com wrote: Hi All I have just installed the Android 3.0. I am facing a problem. I am using Window XP, I have installed the .NET 4.0 version also. As i started the AVD 3.0, The visual studio gives me debugging problem of Emulator. Any body now, how to do 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
Re: [android-developers] Re: Using a Freemium Model
No, because of the signature check. Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Thu, Mar 10, 2011 at 7:48 AM, Jake Wharton jakewhar...@gmail.com wrote: Couldn't a user just create their own dummy APK with the same package and install it to circumvent 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How to navigate to nested PreferencesScreen
* Probably I was misunderstooded. * Ahhh... Indeed I did misunderstand * My problem is not how to navigate from a parent preference screen to child preference screen (this is done by framework), but how to navigate from another activity in my application to child preference screen. How can Preference. * * **setOnPreferenceClickListener() help me with this task?* What I did to be able to handle this (it may have been overkill, but it works) is to have each child screen defined in a separate xml file and PreferenceActivity subclass... So the steps I take are as follows: - Create a main preference xml file that contains declarations for preference screens (but no contents) - Create a separate xml file for the contents of each preference screen - Create a Preference subclass for each preference xml file and inflate the appropriate layout - Set click listeners on all of the preference screens to launch the given preference when clicked (this won't happen automatically when doing it this way) - Then, anywhere in my code I can launch the child preference screen just like I would any other activity in my app Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Thu, Mar 10, 2011 at 2:06 AM, Zsolt Vasvari zvasv...@gmail.com wrote: setPreferenceScreen(PreferenceScreen) On Mar 10, 4:52 pm, Witold Szymaniak [gmail] witold.szyman...@gmail.com wrote: Probably I was misunderstooded. My problem is not how to navigate from a parent preference screen to child preference screen (this is done by framework), but how to navigate from another activity in my application to child preference screen. How can Preference.setOnPreferenceClickListener() help me with this task? W dniu 2011-03-10 07:43, Justin Anderson pisze: I Use Preference.setOnPreferenceClickListener() when I want to do something like this... Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Tue, Mar 8, 2011 at 1:20 AM, Witold Szymaniak [gmail] witold.szyman...@gmail.com wrote: Hi, in my app I have nested PreferencesScreen's PreferencesScreen PreferencesScreen android:key=application /PreferencesScreen/PreferencesScreen Now I want to fire Intent to take me from currrent Activity directly to application preferences subscreen. How can I do 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- 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 -- 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] lost the password of the keystore
On Tue, Mar 8, 2011 at 8:32 PM, Pure J purej1...@gmail.com wrote: However, when doing the process of jarsigner. It prompt me for the passphrase, unluckily , I forgot the passphrase. So, I would like to have some advice on it. http://groups.google.com/group/android-developers/search?group=android-developersq=lost+keystoreqt_g=Search+this+group https://market.android.com/support/bin/search.py?ctx=en%3Asearchboxquery=lost+keystore - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Using a Freemium Model
* So the donate key app doesn't actually implement any logic? * I actually have mine set up so that if they try to launch the donate key it will just launch the full version of the app. If the full version of the app doesn't exist then I display a dialog giving them the option to go the market and download it... That way users don't get confused if they just purchase the key. The mere fact that it is an available package on the phone (means that the user paid money for the download) is the flag that tells the main app to unlock code features? That is the beauty of the solution. My motto is Do the simplest thing that could possibly work... Now, I should point out that AppSwipe! has not yet been updated to use the LVL... The donate key is still using the old copyright protection that has been deprecated. I'm working on a major upgrade of AppSwipe! and after that I'm going to update it to use the LVL. I haven't tested it yet but what I plan on doing is having AppSwipe! implement the LVL but do the license check on my donate key app. When I do this the user won't even need to have the donate key installed on the phone... it will just need to be recorded that they purchased it. Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Thu, Mar 10, 2011 at 8:33 AM, Justin Anderson magouyaw...@gmail.comwrote: No, because of the signature check. Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Thu, Mar 10, 2011 at 7:48 AM, Jake Wharton jakewhar...@gmail.comwrote: Couldn't a user just create their own dummy APK with the same package and install it to circumvent 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Global Variables
On Thu, Mar 10, 2011 at 9:11 AM, Kenny Riddile kfridd...@gmail.com wrote: Perhaps my blanket statement was to simplistic. Not ALL singletons are global variables. Also, not all globals are variables (globally accessible static constants for example). However, all STATEFUL singletons are globals, and all stateful singletons with mutable state (via methods or whatever) are essentially global variables as they create the same architectural issues. Hmm, perhaps this is semantics at this point. I don't think a singleton is a global, as it's usually a private member that is statically accessible. However, there is global access, of course. Just because a singleton's state is only mutable by using its interface doesn't change the fact that you are varying globally accessible state. No, but in terms of clarity, readability, and ease of debugging, there is a *huge* difference in using a singleton to modify some globally accessible object versus a classic global. If you only need one instance of a class, then just make one. It really is that simple. Then give that instance to whomever needs it, instead of letting them magically pull it from the ether. Normally, I wholeheartedly agree. However, the Android model and intricacies of the lifecycle of an Android app present some unique challenges with regard to managing and passing around objects that are needed across multiple Activities. So it's not always that simple. Sometimes, when considering ease and speed of implementation, readability, and maintainability, a Singleton really is the best option. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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: Global Variables
On 3/10/2011 10:41 AM, TreKing wrote: Hmm, perhaps this is semantics at this point. I don't think a singleton is a global, as it's usually a private member that is statically accessible. However, there is global access, of course. If it's a single piece of state that's accessible globally, then to me, it's a global, regardless of the particular syntax or representation. No, but in terms of clarity, readability, and ease of debugging, there is a *huge* difference in using a singleton to modify some globally accessible object versus a classic global. To me, the third option of don't use either one is almost always better in terms of clarity, readability, and ease of debugging. Normally, I wholeheartedly agree. However, the Android model and intricacies of the lifecycle of an Android app present some unique challenges with regard to managing and passing around objects that are needed across multiple Activities. So it's not always that simple. Sometimes, when considering ease and speed of implementation, readability, and maintainability, a Singleton really is the best option. I admit, I've only released one Android app of intermediate complexity. It's been my experience on other platforms and languages, that any framework that encourages sections of your code to communicate via mutable global state is fundamentally flawed. I haven't felt encouraged in that manner by Android thus far. Anyways, this has gotten a bit off-topic from the OP's original question, and for that, I apologize :) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Global Variables
On Thu, Mar 10, 2011 at 10:03 AM, Kenny Riddile kfridd...@gmail.com wrote: Anyways, this has gotten a bit off-topic from the OP's original question, and for that, I apologize :) Thread title: Global Variables - seems quite on topic. It's not like we're exchanging cookie recipes =P - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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] Notification
On Thu, Mar 10, 2011 at 12:17 AM, Chirayu Dalwadi chirayu.dalw...@gmail.com wrote: How to notify using status bar notifications at user specified time? AlarmManager - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Global Variables
10.03.2011 19:03, Kenny Riddile ?: No, but in terms of clarity, readability, and ease of debugging, there is a *huge* difference in using a singleton to modify some globally accessible object versus a classic global. To me, the third option of don't use either one is almost always better in terms of clarity, readability, and ease of debugging. What this completely overlooks is that sometimes a globally accessible, mutable, possibly resource-managing, object is the desired semantics. -- Kostya Vasilyev -- http://kmansoft.wordpress.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] ActionBarSherlock: Action Bar Helper for All Android Versions.
Good morning developers, I wanted to let everyone know that I have released version 2.0 of my library, ActionBarSherlockhttps://github.com/JakeWharton/ActionBarSherlock/, which facilitates the use of the action bar design pattern on all version of Android. The library will automatically use the native ActionBar if it is available (currently only Android 3.0) or fall back to a custom third-party implementation of your choice (e.g., GreenDroidhttps://github.com/hameno/GreenDroid, Android-ActionBar https://github.com/johannilsson/android-actionbar, etc.). This should allow you to only have to maintain a single set of activities and layouts in most cases. There are sample implementations, example APKs, and of course the library source code available on its GitHub project pagehttps://github.com/JakeWharton/ActionBarSherlock/ . I welcome all comments, suggestions, and criticism via reply to this thread, directly via email jakewhar...@gmail.com, using GitHub messages, issueshttps://github.com/JakeWharton/ActionBarSherlock/issues, or pull requests, or on Twitter http://twitter.com/JakeWharton. Large lump sums of money are also accepted. -- 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] Action Bar
how to create action bar in Android 2.2.it is possible ? if it is possible plz suggest me which theme or style i will use for better action bar. -- 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: Action Bar
Try a third https://github.com/johannilsson/android-actionbar partyhttps://github.com/cyrilmottier/GreenDroid library http://code.google.com/p/iosched/. -- 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] Notification bar size
It's just the right size to accommodate status icons that follow the official status icon guidelines: http://developer.android.com/guide/practices/ui_guidelines/icon_design_status_bar.html And that's 38px for HDPI devices, 25px for MDPI and so on (following standard DPI scaling). -- Kostya 10.03.2011 19:23, Laurent Lugon ?: Hi all, Just one question : what's the height of the notification bar under android 2.x ? * Galaxy tab : 38px * Xperia X10 : 38px * Desire HD : 38px Is the size always the same for all the android 2.x devices ? (that would be great !) Thank you for your help ! Best regards SECU4 SA Laurent Lugon Moulin Technical Development Assistant Technopôle 5 3960 Sierre – Switzerland Office : +4127 4567 931 Fax : +4127 4567 935 Mobile : +4179 4509 566 Skype : laurent.lugon.moulin www.secu4.com http://www.secu4.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 -- Kostya Vasilyev -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How to navigate to nested PreferencesScreen
On Thu, Mar 10, 2011 at 10:29 AM, Justin Anderson magouyaw...@gmail.com wrote: Create a Preference subclass for each preference xml file and inflate the appropriate layout Couldn't you have done just one Preference subclass, with the child XML file as a custom attribute? I ask in part because I think your approach may become more necessary. Right now, a legacy PreferenceActivity with nested PreferenceScreen elements looks bad on Android 3.0: http://commonsware.com/blog/2011/02/25/nested-preferencescreens-honeycomb-ugly.html And PreferenceFragment is not in the Android compatibility library. Off the cuff, that means the way to get single-source cross-version decent-looking nested preference screens may be via your approach. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training Worldwide: 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] Change the text style according to state, in XML
Does someone know if it's possible to change a text view style (bold, italic...) according to its state (pressed, selected...), the same way a drawable can depend on the state using a selector? I don't want to do that in Java, only with XML styles, but it seems that's not possible. -- 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] Dynamically including a custom view defined in another app
Suppose I have one app who's functionality can be accessed entirely through a single custom view (which does not take up the whole screen, because it needs to be displayed with something else). Now suppose I have another app which wants to be able to show that custom view within one of its own activities. Both apps are mine. What is the best way to do this? Would Fragments be a possibility for this? Note - I don't want to statically include all the code/resources from the other app. -- 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: Request a webpage and display in app
On Mar 10, 4:06 pm, Raghav Sood raghavs...@gmail.com wrote: Thanks Mark, I'll see how this goes. -- Raghav Soodhttp://www.raghavsood.com/ Here is tutorial ! http://www.firstdroid.com/2010/08/05/override-url-loading-in-webview-android-tutorial/ Nikola. -- 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: Action Bar
THANKS SIR... On Mar 10, 9:27 pm, Jake Wharton jakewhar...@gmail.com wrote: Try a third https://github.com/johannilsson/android-actionbar partyhttps://github.com/cyrilmottier/GreenDroid library http://code.google.com/p/iosched/. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How to navigate to nested PreferencesScreen
Hi Mark, Now that you mention it I probably could have for some of the more generic screens. However I do have some child screens that are a bit more complex and would need its own subclass. Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Thu, Mar 10, 2011 at 8:54 AM, Mark Murphy mmur...@commonsware.comwrote: On Thu, Mar 10, 2011 at 10:29 AM, Justin Anderson magouyaw...@gmail.com wrote: Create a Preference subclass for each preference xml file and inflate the appropriate layout Couldn't you have done just one Preference subclass, with the child XML file as a custom attribute? I ask in part because I think your approach may become more necessary. Right now, a legacy PreferenceActivity with nested PreferenceScreen elements looks bad on Android 3.0: http://commonsware.com/blog/2011/02/25/nested-preferencescreens-honeycomb-ugly.html And PreferenceFragment is not in the Android compatibility library. Off the cuff, that means the way to get single-source cross-version decent-looking nested preference screens may be via your approach. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training Worldwide: 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 -- 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] Action Bar
Action Bar develop in android2.3 or not???plz help.or it developed only Android 3.0 ??? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Change the text style according to state, in XML
* Does someone know if it's possible to change a text view style (bold, italic...) according to its state (pressed, selected...), the same way a drawable can depend on the state using a selector?* Yes, it is possible. Set the textColor attribute to something like this: android:textColor=@drawable/my_text_color_selector I have done this on several occasions. Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware 2011/3/10 Clément Plantier clemplant...@gmail.com Does someone know if it's possible to change a text view style (bold, italic...) according to its state (pressed, selected...), the same way a drawable can depend on the state using a selector? I don't want to do that in Java, only with XML styles, but it seems that's not possible. -- 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] Re: How to share data among different devices
Thanks for replying. We don't have a remote server and are looking for Google Cloud solution. Any ideas? Thanks On Mar 9, 11:52 pm, Stephan Wiesner testexpe...@googlemail.com wrote: Well, you can always implement a sync service on a remote server. Using JSON objects this is surprisingly easy Sunny greetings from Zurich, Stephan On Mar 8, 12:34 am, ez qzh...@gmail.com wrote: If a user has a Android phone and Android tablet, how to share the preference data and database data among different devices for this user. We are looking a way to sync the user's data among different devices. Any suggestions and ideas are appreciated. -- 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] Dynamically including a custom view defined in another app
On Thu, Mar 10, 2011 at 11:44 AM, Mark Carter mjc1...@googlemail.com wrote: Suppose I have one app who's functionality can be accessed entirely through a single custom view (which does not take up the whole screen, because it needs to be displayed with something else). Now suppose I have another app which wants to be able to show that custom view within one of its own activities. Both apps are mine. What is the best way to do this? You can't. At best, you can load resources from the other app, but not Java code. Would Fragments be a possibility for this? No, sorry. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training Worldwide: 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
Re: [android-developers] Re: How to share data among different devices
On Thu, Mar 10, 2011 at 11:11 AM, ez qzh...@gmail.com wrote: We don't have a remote server and are looking for Google Cloud solution. Any ideas? Do you just not know the URL? http://code.google.com/appengine/ -- Greg Donald destiney.com | gregdonald.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] Toggle button with more states that two
I am trying to find if there is a possibility to use togglebutton in such a way to have more states that two? So I want a single button to change appearance (background image) depending on what state it is in. So if I have states 1, 2, 3, 4, 5 and off to be able to change between all those states and display a new image for every state. Thanks! D. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Dynamically including a custom view defined in another app
How about TabActivity? Doesn't that do something similar to what I'm talking about (i.e. using a portion of the screen to show something created/controlled by (potentially) another app)? On 11 March 2011 00:25, Mark Murphy mmur...@commonsware.com wrote: On Thu, Mar 10, 2011 at 11:44 AM, Mark Carter mjc1...@googlemail.com wrote: Suppose I have one app who's functionality can be accessed entirely through a single custom view (which does not take up the whole screen, because it needs to be displayed with something else). Now suppose I have another app which wants to be able to show that custom view within one of its own activities. Both apps are mine. What is the best way to do this? You can't. At best, you can load resources from the other app, but not Java code. Would Fragments be a possibility for this? No, sorry. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training Worldwide: 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 -- 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] Dynamically including a custom view defined in another app
On Thu, Mar 10, 2011 at 12:54 PM, Mark Carter mjc1...@googlemail.com wrote: How about TabActivity? Doesn't that do something similar to what I'm talking about (i.e. using a portion of the screen to show something created/controlled by (potentially) another app)? TabActivity cannot display something from another app. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training Worldwide: 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: May i join the group?
For which he has my condolences;) But seriously now: we should welcome newcomers to the group with a generous invitation to become familiar with http://www.catb.org/~esr/faqs/smart-questions.html as a most excellent guide to how to actually get real help from the group. On Mar 10, 4:53 am, DanH danhi...@ieee.org wrote: I think you already have. On Mar 9, 5:37 am, yy xuye xueyy2...@gmail.com wrote: Dear sir, I'm a developer from China. For the current, i have some problem about android development. So i hope to get some help. May i join the group? Tks. Best regards. -- 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] Toggle button with more states that two
I don't think so, but it shouldn't be too hard to just subclass the Button class and implement this behavior yourself. Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Thu, Mar 10, 2011 at 10:51 AM, Duskox dus...@gmail.com wrote: I am trying to find if there is a possibility to use togglebutton in such a way to have more states that two? So I want a single button to change appearance (background image) depending on what state it is in. So if I have states 1, 2, 3, 4, 5 and off to be able to change between all those states and display a new image for every state. Thanks! D. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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: Which Mobile Advertising Site?
It is a little more than just clicking but to simply answer your question is it is pay per click. In keeping it simple, each click is valued at $0.20 - $1 in my experience and you can give higher valued ads more priority. -- 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 keep the code base same for Lower and Higher API levels
Thank you; appreciate the input. I will try to use Java reflection. On Mar 10, 5:48 am, lbendlin l...@bendlin.us wrote: Like this, for the audio manager (older API versions do not support audio fading) public static CustomAudioManager newInstance(Context context) { final int sdkVersion = Integer.parseInt(Build.VERSION.SDK); CustomAudioManager cam = null; if (sdkVersion 8) return cam; cam = new FroyoAudioManager(context.getApplicationContext()); return cam; } On Mar 10, 1:42 am, Kostya Vasilyev kmans...@gmail.com wrote: If it's just a few 3.0 methods, you can use Java reflection or API-specific encapsulation classes. -- Kostya 10.03.2011 8:11, Jacob пишет: Hi all I am developing a project for OS version 2.2 (API level 8). I have an issue now. With the release of OS 3.0 (Honeycomb - API 11), I have to use some calls from this new OS. Well, How do I keep my code base same? I an unable to include the 3.0 speicific APIs in 2.2 project. If I created a 3.0 project, I can't run that on 2.2 OS :) 1) Is there any way to solve this issue? Its very difficult to keep different project/code base for every new release. 2) Is there a way to have one package contian 2 apps? Any help is much appreciated. Thank you Jacob -- Kostya Vasilyev --http://kmansoft.wordpress.com-Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Dynamically including a custom view defined in another app
And TabActivity doesn't fully support displaying activities... That functionality is left over from very early Android development days and there are all sorts of little gotchas and subtleties when using them to display activities. Really, each tab in a TabActivity should be a View and then it works much more nicely. Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Thu, Mar 10, 2011 at 10:58 AM, Mark Murphy mmur...@commonsware.comwrote: On Thu, Mar 10, 2011 at 12:54 PM, Mark Carter mjc1...@googlemail.com wrote: How about TabActivity? Doesn't that do something similar to what I'm talking about (i.e. using a portion of the screen to show something created/controlled by (potentially) another app)? TabActivity cannot display something from another app. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training Worldwide: 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 -- 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] Fragment.onActivityResult is not called
Whoops, yeah that is a bug. Thanks for finding it. I'll fix it in the next update. On Thu, Mar 10, 2011 at 1:55 AM, Pete Doyle petedo...@gmail.com wrote: Ran into this issue tonight on my Droid (2.2). I think there's an issue in FragmentActivity.startActivityFromFragment(...). YMMV, but this seems to fix it for me: https://github.com/petedoyle/android-support-v4-googlemaps/commit/06307de35a9de0a89ff52bb42a358ba6740e542c Basically there are two issues: 1) (fragment.mIndex+1)16 should be in parentheses since + has precedence over in Java 2) requestCode*0x should be requestCode0x. (I think the goal is to strip all but the first 16 bits of the request code). To understand the fix, assume you have a fragment index of 0 and a requestCode of 1. With the current code: (fragment.mIndex+1)16 + (requestCode*0x) = (0+1)16 + (1*0x) = (1) (16 + 0x) // since + has precedence over = 165551 = 32768 // according to my debugger = 1000 // fragment index is lost, request code changes from 1 to 32768 With this change: ((fragment.mIndex+1)16) + (requestCode0x) = ((0+1)16) + (10x) = (116) + 1 = 65536 + 1 = 65537 = 1 0001 Thanks, Pete On Wed, Mar 9, 2011 at 9:20 AM, Dianne Hackborn hack...@android.comwrote: Does the API demo for this work wherever you are running it? I have tested it on 3.0, 2.3, and 1.6, and it works in those places, not would I expect it to have any trouble elsewhere. (How this works is very simple, it just masks out the top X bits of the request code to determine which fragment to deliver the result to.) Also of course if you are overriding FragmentActivity.onActivityResult(), you *do* need to be sure to call the inherited version. The behavior here is slightly different than the HC implementation; the activity method will always be called first. On Wed, Mar 9, 2011 at 8:14 AM, drasticp drast...@gmail.com wrote: I have an application that targets 2.1. I'm using the Android Compatibility Package to migrate the code in my Activities to Fragments. I had an Activity which was launching a contact picker as follows: Intent contactPickerIntent = new Intent(Intent.ACTION_PICK, Contacts.CONTENT_URI); startActivityForResult(contactPickerIntent, CONTACT_PICKER_RESULT); The result was appropriately handled in the onActivityResult for the Activity: @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { if (resultCode != Activity.RESULT_OK) return; switch (requestCode) { case CONTACT_PICKER_RESULT: handleResult(data); break; } } Now, I've migrated both the startActivityForResult call and the onActivityResult into a Fragment. I have also extended FragmentActivity in the hosting Activity. The contact picker still launches correctly, but onActivityResult in the fragment is never called. If I override onActivityResult in the FragmentActivity, it *IS* called. However, I don't want to handle the result there because it breaks the encapsulation philosophy of the new fragments. Shouldn't onActivityResult in the fragment be called? Am I missing something? Thanks for your assistance! -- 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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You
[android-developers] Re: Notification
you can use the buzzbox sdk here: http://hub.buzzbox.com/android-sdk/ it uses the Alarm Manager and the standard notifications system it also include the settings UI to choose days of the week, frequency and hours... On Mar 10, 8:01 am, TreKing treking...@gmail.com wrote: On Thu, Mar 10, 2011 at 12:17 AM, Chirayu Dalwadi chirayu.dalw...@gmail.com wrote: How to notify using status bar notifications at user specified time? AlarmManager - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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] Alarm Issue
Hii, I am using following code for setting alarm at specified time but I'm not able to receive alarm at specified time. Please tell me where is the problem Calendar cal = Calendar.getInstance(); cal.setTimeInMillis(System.currentTimeMillis()); cal.clear(); cal.set(Calendar.YEAR, mYear); cal.set(Calendar.MONTH, mMonth); cal.set(Calendar.DAY_OF_MONTH, mDay); cal.set(Calendar.HOUR, mHour); cal.set(Calendar.MINUTE,mMinutes); Intent activate = new Intent(this, TimeAlarm.class); PendingIntent alarmIntent = PendingIntent.getBroadcast(this, 0, activate, 0); alarms = (AlarmManager)getSystemService(Context.ALARM_SERVICE); alarms.set(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(), alarmIntent); -- 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] DTD Handlers aren't supported.
Requirement: I'm trying to parse an XML doc from a url (Rest API) using org.jdom.Document Document = new SAXBuilder().parse(url.OpenStream()); such that I can perform some xpath queries and processing later on. I'm getting the error: DTD Handlers aren't supported when I try to parse the file. I can't use the in-built java API as I am trying to develop my app on Andoid on 1.5 so I'm using JDOM. Anyone know how I can parse the XML for m android app? -- 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] Alarm Issue
On 10 March 2011 19:27, Brad Stintson geek.bin...@gmail.com wrote: cal.setTimeInMillis(System.currentTimeMillis()); cal.clear(); These two does not make much sense in that order. -- Regards, Marcin Orlowski -- 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