[android-developers] Re: Unit Testing - Activity shutdown
Got this all working and reliably. I still use a state variable to tell me where I am in the state machine - not ideal. My reliability problems seem to have been down to using SharedPreferences to hold state between tests. Thanks for the responses. Ian Hunter On Nov 29, 8:10 pm, Ian ian.fawcett.hun...@gmail.com wrote: Thanks for your response - I think this could be enlightening However, a few questions... On Nov 29, 7:30 pm, A. Elk lancaster.dambust...@gmail.com wrote: Can I get clarification here? Does your application call finish() at some point? If so, at what point? The Android design guidelines strongly discourage the use of an exit button. You should see that most apps don't have one. The way to exit an application is to switch to another one (including a phone call) or go to the Launcher/Home. Whenever you switch, the onPause() method for the foreground Activity of your app should be called. Whenever you switch back, the onResume() method should be called. Can you please point me at the guidelines you are referring to? I have seen many references to the finish() method, but nothing discouraging its use. In the API it states... void finish() - Call this when your activity is done and should be closed. In my scenario, the user rejects the Terms Conditions in a dialog - and this seems the ideal thing to do, No? I acknowledge that sometimes you may want to start a child *Activity* and then kill it when you're done with it. To do this, use finishActivity() with a result code. You may also want to start a service when your app starts, but give the user the option to stop the service if it's not being used. That's OK too, but you shouldn't shut down the app itself. In short, the Android model is that you leave the application paused, and let Android destroy it to free up resources. If Android does this, it should always call the onPause() method of any Activities that are still running. Can you describe your test harness in more detail? To unit test an Activity, you shouldn't need anything more than InstrumentationTestRunner and ActivityInstrumentationTestCase2. This is documented under Testing and Instrumentation in the Android 2.2 Developer's Guide. I am using the ActivityInstrumentationTestCase2 as you suggest and calling getActivity() to start the Activity. I then do button.performClick() which causes 'finish()'. I am hoping to reliably test that the Activity has paused, stopped or whatever happens. I have refactored and now have a unit test which (via a state variable) does work, but not reliably - this may be another story :-) Thanks Ian Hunter -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Market expanding to technically non-compliant devices?
Yes, things are getting confusing if not messy. The Logitech TV Cam accessory for the Logitech Revue Google TV adds a camera to Google TV http://www.logitech.com/en-us/smartTV/accessories/devices/tv-cam but it can reportedly not be used by Android apps: The TV Cam cannot be accessed from other applications at this time http://forums.adobe.com/message/3256491#3256491 Great, so there *is* a camera for this Android device (Google TV) but it cannot be used by regular Android apps. Now this probably means that Android camera apps will simply remain invisible on the Android Market for this Google TV, but for developers it is just as important to know if a device is compatible with their app or not - to be able to tell their customers. One should not have to scour web forums in the hope of getting an indication of that. In other words, should it not be *required* that Logitech clearly indicates on their website that Logitech TV Cam does not work with third-party (and Google's!) Android camera apps, and *only* works with their own proprietary video call app? I currently cannot find this on the Logitech TV Cam product page http://www.logitech.com/en-us/smartTV/accessories/devices/tv-cam and even if it is hidden somewhere in the small print that is hardly practical for developers who need to be able to quickly tell compatibility for a range of new devices to answer customer inquiries. Looks like there should be some additional requirements for manufacturers here in order to be allowed to use the Google TV brand, because everybody already knows that Google TV runs Android http://www.google.com/tv/developers.html and if there is a camera accessory everybody would assume that Android camera apps would run fine and not be in for an unpleasant surprise or a heap of uncertainty. Thanks! On Nov 30, 8:20 am, Spiral123 cumis...@gmail.com wrote: GoogleTV. My Logitech Revue has no touch screen - assuming the market gets expanded to this device (yes please!) then I won't want to see any apps where I need to touch the screen. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Please help with an ideea
Hi, does anyone has an idea how to implement an Brightness Screen Filter like the one here : http://www.appbrain.com/app/screen-filter/com.haxor I need a starting point and I can't figure out how to do it. I have tried with an always on top transparent activity but I don't think this is the solution. Thank you -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] problem with map overlays
i have taken the code for drawing the oath on the google map, from the google git.. but i m now stuck in some diff issue. i m unable to put a marker on the start and end point of the path drawn. pls suggest me.. actually in map activity in my project class is created by extending com.google.android.maps.Overlay but this class is used to draw the path on the map. so please suggest me what should i need to do if i want to put marker on start and end point of the map. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: what is problem in this where clause?
Here each time suf = c4.getInt(c4.getColumnIndex(MAX_SUFFIX)); gives me '0'. But how is this possible because each time I am saving next suffix. On Nov 30, 12:40 pm, pramod.deore deore.pramo...@gmail.com wrote: Anyone know what is wrong here? On Nov 30, 11:00 am, pramod.deore deore.pramo...@gmail.com wrote: Hi, I have a table RoomTable which have 3 columns as 1.RoomID (primary key),2. RoomName 3. RoomSuffix public void insertToRoomTable(String rName) { try { sampleDB.execSQL(CREATE TABLE IF NOT EXISTS + ROOM_TABLE_NAME + (RoomID integer primary key autoincrement,RoomName VARCHAR,RoomSuffix integer);); boolean roomExist = checkRoomExist(roomName); System.out.println (RoomExist is+roomExist); if (roomExist) { Cursor c4 = sampleDB.rawQuery(SELECT MAX(RoomSuffix) AS MAX_SUFFIX FROM RoomTable WHERE RoomName = '+roomName+',null); if (c4 != null ) { if (c4.moveToFirst()) { System.out.println (??+c4.getCount()); do { System.out.println (c4.getInt(c4.getColumnIndex(MAX_SUFFIX))); suf = c4.getInt(c4.getColumnIndex(MAX_SUFFIX)); suf++; System.out.println (+suf); } while (c4.moveToNext()); } } roomName = roomName+suf; c4.close(); } sampleDB.execSQL(INSERT INTO + ROOM_TABLE_NAME + Values (null,'+roomName+','+suf+');); System.out.println (Inserted values into RoomTable are+roomName+:+suf); } catch (Exception e) { e.printStackTrace(); } } public boolean checkRoomExist(String name) { c = sampleDB.rawQuery(SELECT RoomName FROM +ROOM_TABLE_NAME , null); if (c != null ) { System.out.println (%%%+c.getCount()); if (c.moveToFirst()) { do { rname = c.getString(c.getColumnIndex(RoomName)); System.out.println (RoomName is+rname); if (rname.equalsIgnoreCase(name)) { System.out.println (Room Exist); return true; } } while (c.moveToNext()); } } c.close(); return false; } Here what I want is - If suppose user insert first record as 1 Hall 0 and again if he insert record with same RoomName i.e Hall then RoomName must be Hall1(i.e. RoomName+suffix) 2 Hall1 1 Third record must be 3 Hall2 2 If user enter other roomname thenit must be 4 Kitchen 0 again insert suppose Hall then 5 Hall 3 (Because last Hall suffix is 2) Means I want different suffix for different RoomName. But using above code I get output as 1 Hall 0 2 Hall 1 1 3 Hall1 1 4 Hall1 1 Each time I get Suffix as 1. What is wrong in this code? And if I remove where clause and write it as if (roomExist) { Cursor c4 = sampleDB.rawQuery(SELECT MAX(RoomSuffix) AS MAX_SUFFIX FROM RoomTable ,null); . } Then here it is not maintaining different suffix for different RoomName and I get output as 1 Hall 0 2 Hall1 1 3 Hall 2 2 4 Kitchen3 3 And what I want is 1 Hall 0 2 Hall1 1 3 Hall2 2 4 Kitchen 0 How to get This? 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] App rotation problem
Hi, I have developed app but its not rotating at all when i rotate my HTC Wildfire. My other apps roatate but not only app developed by me. Is there anything I need to manifest.xml for allowing this. My current manifest.xml is as follows: ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=org.dummy.android android:versionCode=1 android:versionName=1.0 application android:icon=@drawable/app_icon android:label=@string/app_name activity android:name=jp.dummu.AndroidSDK android:label=X Mobile android:screenOrientation=nosensor intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity activity android:name=.Search android:label=Search android:theme=@android:style/Theme.NoTitleBar intent-filter action android:name=android.intent.action.VIEW/ category android:name=android.intent.action.SEND/ category android:name=android.intent.category.BROWSABLE/ data android:scheme=myapp android:host=oauth/ /intent-filter /activity activity android:name=.Articles android:label=Articles android:theme=@android:style/Theme.NoTitleBar intent-filter action android:name=android.intent.action.VIEW/ category android:name=android.intent.action.SEND/ category android:name=android.intent.category.DEFAULT/ category android:name=android.intent.category.BROWSABLE/ data android:scheme=myapp android:host=oauth/ /intent-filter /activity activity android:name=.xmobile android:label=@string/app_name android:theme=@android:style/Theme.NoTitleBar intent-filter action android:name=android.intent.action.MAIN / /intent-filter /activity /application uses-sdk android:minSdkVersion=3 / /manifest -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] App rotation problem
You need to remove *android:screenOrientation=nosensor* from activity. On Tue, Nov 30, 2010 at 2:28 PM, umakantpatil umakantpat...@gmail.comwrote: Hi, I have developed app but its not rotating at all when i rotate my HTC Wildfire. My other apps roatate but not only app developed by me. Is there anything I need to manifest.xml for allowing this. My current manifest.xml is as follows: ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=org.dummy.android android:versionCode=1 android:versionName=1.0 application android:icon=@drawable/app_icon android:label=@string/app_name activity android:name=jp.dummu.AndroidSDK android:label=X Mobile android:screenOrientation=nosensor intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity activity android:name=.Search android:label=Search android:theme=@android:style/Theme.NoTitleBar intent-filter action android:name=android.intent.action.VIEW/ category android:name=android.intent.action.SEND/ category android:name=android.intent.category.BROWSABLE/ data android:scheme=myapp android:host=oauth/ /intent-filter /activity activity android:name=.Articles android:label=Articles android:theme=@android:style/Theme.NoTitleBar intent-filter action android:name=android.intent.action.VIEW/ category android:name=android.intent.action.SEND/ category android:name=android.intent.category.DEFAULT/ category android:name=android.intent.category.BROWSABLE/ data android:scheme=myapp android:host=oauth/ /intent-filter /activity activity android:name=.xmobile android:label=@string/app_name android:theme=@android:style/Theme.NoTitleBar intent-filter action android:name=android.intent.action.MAIN / /intent-filter /activity /application uses-sdk android:minSdkVersion=3 / /manifest -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- *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
[android-developers] Re: problem with map overlays
See the map tutorial, If I understand correct you have to put your overlay in all point of your path. Each Overlay is draw on the map using the latitude and longitude coordinated, this assumes that you know the coordinates of the point of your path. http://developer.android.com/resources/tutorials/views/hello-mapview.html Do I help you? On 30 Nov, 09:29, Atik atik0...@gmail.com wrote: i have taken the code for drawing the oath on the google map, from the google git.. but i m now stuck in some diff issue. i m unable to put a marker on the start and end point of the path drawn. pls suggest me.. actually in map activity in my project class is created by extending com.google.android.maps.Overlay but this class is used to draw the path on the map. so please suggest me what should i need to do if i want to put marker on start and end point of the map. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: App rotation problem
I would remove that. Only activity jp.dummu.AndroidSDK should not rotate. But how about other activities ? Other activities should rotate.. right ? But even others are not rotating.. jp.dummu.AndroidSDK On Nov 30, 2:04 pm, Ajmer singh ajmer.si...@evontech.com wrote: You need to remove *android:screenOrientation=nosensor* from activity. On Tue, Nov 30, 2010 at 2:28 PM, umakantpatil umakantpat...@gmail.comwrote: Hi, I have developed app but its not rotating at all when i rotate my HTC Wildfire. My other apps roatate but not only app developed by me. Is there anything I need to manifest.xml for allowing this. My current manifest.xml is as follows: ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=org.dummy.android android:versionCode=1 android:versionName=1.0 application android:icon=@drawable/app_icon android:label=@string/app_name activity android:name=jp.dummu.AndroidSDK android:label=X Mobile android:screenOrientation=nosensor intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity activity android:name=.Search android:label=Search android:theme=@android:style/Theme.NoTitleBar intent-filter action android:name=android.intent.action.VIEW/ category android:name=android.intent.action.SEND/ category android:name=android.intent.category.BROWSABLE/ data android:scheme=myapp android:host=oauth/ /intent-filter /activity activity android:name=.Articles android:label=Articles android:theme=@android:style/Theme.NoTitleBar intent-filter action android:name=android.intent.action.VIEW/ category android:name=android.intent.action.SEND/ category android:name=android.intent.category.DEFAULT/ category android:name=android.intent.category.BROWSABLE/ data android:scheme=myapp android:host=oauth/ /intent-filter /activity activity android:name=.xmobile android:label=@string/app_name android:theme=@android:style/Theme.NoTitleBar intent-filter action android:name=android.intent.action.MAIN / /intent-filter /activity /application uses-sdk android:minSdkVersion=3 / /manifest -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- *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
[android-developers] Geocoder throwing exception
Hi, I am doing some application to check Geocoder functionality I am executing the following code snippet Geocoder fwdGeocoder = new Geocoder(this, Locale.US); String streetAddress = 160 Riverside Drive, New York, New York; ListAddress locations = null; try { locations = fwdGeocoder.getFromLocationName(streetAddress, 10); } catch (IOException e) { e.printStackTrace(); Log.e(TAG, error occured); } I am testing this app in real device and my apk is build for Google api 2.2 It is throwing excepion as follows 01-01 02:27:17.781: WARN/System.err(3186): java.io.IOException: Service not Available 01-01 02:27:17.785: WARN/System.err(3186): at android.location.Geocoder.getFromLocationName(Geocoder.java:159) 01-01 02:27:17.785: WARN/System.err(3186): at sct.android.geocodertest.TestActivity.onCreate(TestActivity.java:44) 01-01 02:27:17.785: WARN/System.err(3186): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 01-01 02:27:17.785: WARN/System.err(3186): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627) 01-01 02:27:17.785: WARN/System.err(3186): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) 01-01 02:27:17.785: WARN/System.err(3186): at android.app.ActivityThread.access$2300(ActivityThread.java:125) 01-01 02:27:17.785: WARN/System.err(3186): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) 01-01 02:27:17.785: WARN/System.err(3186): at android.os.Handler.dispatchMessage(Handler.java:99) 01-01 02:27:17.785: WARN/System.err(3186): at android.os.Looper.loop(Looper.java:123) 01-01 02:27:17.789: WARN/System.err(3186): at android.app.ActivityThread.main(ActivityThread.java:4627) 01-01 02:27:17.789: WARN/System.err(3186): at java.lang.reflect.Method.invokeNative(Native Method) 01-01 02:27:17.789: WARN/System.err(3186): at java.lang.reflect.Method.invoke(Method.java:521) 01-01 02:27:17.793: WARN/System.err(3186): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 01-01 02:27:17.793: WARN/System.err(3186): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 01-01 02:27:17.793: WARN/System.err(3186): at dalvik.system.NativeStart.main(Native Method) I included the following permissions in manifest file uses-permission android:name=android.permission.INTERNET/uses-permission uses-permission android:name=android.permission.ACCESS_FINE_LOCATION/uses-permission uses-permission android:name=android.permission.ACCESS_COARSE_LOCATION/uses-permission My device GPS is turned on Any help -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] addView in layout at run time
Hi at all, I have to put some ImageButton inside an LinearLayout, but I don't know the number of this statically, so because I keep the data through internet at run-time. I solved this problem adding new child at the layout at run time after the oncreate() functions is called in this way: ImageButton b; LinearLayout contanier = (LinearLayout) findViewById(R.id.card_images_layout); for (int i = 0; i this.card.images.size(); i++) { b = (ImageButton) findViewById(R.id.card_image); b.setImageBitmap((this.card.images.get(i).getImage_data())); contanier.addView(b); } But I take this error java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first Is my solution which is incorrect or I make wrong something? Thanks a lot pedr0 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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.permission.ACCESS_SURFACE_FLINGER
Hi all, I am using *uses-permission android:name=android.permission.ACCESS_SURFACE_FLINGER / * *uses-permission android:name=android.permission.ACCESS_SURFACE_FLINGER / *to access the SurfaceFlinger. But I am getting the error *W/ServiceManager( 59): Permission failure: android.permission.HARDWARE_TEST fr om uid=10036 pid=325 E/SurfaceFlinger( 59): Permission Denial: can't access SurfaceFlinger pid=325, uid=10036* How to Rectify the above error? With Regards, Prabagaran. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] lock sqlite file
Hi all, I have the following problem i have to transfer my db file over internet. How can i lock the file to ensure that nobody will write in the sqlite db file while i am transferring it. I need to get READ LOCK on the file to prevent blocking on read operations. Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: addView in layout at run time
Hi, You are adding the same ImageButton again and again. You are getting reference of some existing button: b = (ImageButton) findViewById(R.id.card_image); and adding that button to the view again and again! So, you are getting the runtime error. Hint: You need to create NEW ImageButtons if you want multiple image buttons. b = new ImageButton(); Regards Sarwar Erfan On Nov 30, 3:18 pm, pedr0 pulsarpie...@gmail.com wrote: Hi at all, I have to put some ImageButton inside an LinearLayout, but I don't know the number of this statically, so because I keep the data through internet at run-time. I solved this problem adding new child at the layout at run time after the oncreate() functions is called in this way: ImageButton b; LinearLayout contanier = (LinearLayout) findViewById(R.id.card_images_layout); for (int i = 0; i this.card.images.size(); i++) { b = (ImageButton) findViewById(R.id.card_image); b.setImageBitmap((this.card.images.get(i).getImage_data())); contanier.addView(b); } But I take this error java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first Is my solution which is incorrect or I make wrong something? Thanks a lot pedr0 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Back key behaviour between Activity Groups.
Yes, I have done that. The problem is that I will have to add manually add this PlayBack custom layout to each of the view. Now more over, even if I do that, For each new instantiation of view, I have to do bunch of instiations. Like connecting to background service. Which is costly. So I was wondering, If I could have to inflate it only once. On Nov 30, 11:57 am, akkilis deepakverma.u...@gmail.com wrote: To add on, dont forget to add the constructor to the PlayBackView with context and AttributeSet i.e. public PlayBackrView(Context context, AttributeSet attrs) { super(context, attrs); .. .. } On Nov 30, 11:52 am, akkilis deepakverma.u...@gmail.com wrote: Mahesh, Why dont you make a different class, say PlayBackView, extending LinearLayout and place the layout of the common component Playback bar in a different layout xml, say playback.xml. Now inflate the playback.xml in the PlayBackView. Now you can add this your custom view in any of the layout xml (home, A, B, C) as: ?xml version=1.0 encoding=utf-8? FrameLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent com.packagename.PlayBackView android:id=@+id/playbackview android:layout_width=match_parent android:layout_height=wrap_contentt / ImageView --- etc etc/ /FrameLayout In the PlayBackView class, you can define the onClick handlers or any other event handler as you want. Hope this will help you. On Nov 30, 7:59 am, MaheshSharma maheshsharmasuco2...@gmail.com wrote: Hello All, My app is kind of a music app and I have a playback bar that I need to be visible across all the views. I had three activities, A/B/C. Instead of adding the playback bar explicitly to all A,B,C. I added the Playback Bar to A and made A,B,C as ActivityGroups. Since, A has the playback bar, now I when I start B from A, I call setContentView from A to show B. The problem is, once I call setContentView to show B, and then if the user presses back key in B, then it goes to home screen, instead of coming to A. I have seen some snippets on web, which maintain the view stack and when user presses the back key they pop up the previous view. I couldnt implement that. Questions : 1) Is there any better way to having a activity like Playback bar/ Status bars across all the views/activities ? 2) If the above way is the only way to do it,then how can I handle the back key? With Regards MS. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: addView in layout at run time
ImageButton constructor takes the context as input parameter http://developer.android.com/reference/android/widget/ImageButton.html b = new ImageButton(this); Regards Sarwar Erfan On Nov 30, 3:27 pm, Sarwar Erfan erfanonl...@gmail.com wrote: Hi, You are adding the same ImageButton again and again. You are getting reference of some existing button: b = (ImageButton) findViewById(R.id.card_image); and adding that button to the view again and again! So, you are getting the runtime error. Hint: You need to create NEW ImageButtons if you want multiple image buttons. b = new ImageButton(); Regards Sarwar Erfan On Nov 30, 3:18 pm, pedr0 pulsarpie...@gmail.com wrote: Hi at all, I have to put some ImageButton inside an LinearLayout, but I don't know the number of this statically, so because I keep the data through internet at run-time. I solved this problem adding new child at the layout at run time after the oncreate() functions is called in this way: ImageButton b; LinearLayout contanier = (LinearLayout) findViewById(R.id.card_images_layout); for (int i = 0; i this.card.images.size(); i++) { b = (ImageButton) findViewById(R.id.card_image); b.setImageBitmap((this.card.images.get(i).getImage_data())); contanier.addView(b); } But I take this error java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first Is my solution which is incorrect or I make wrong something? Thanks a lot pedr0 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: addView in layout at run time
Thanks a lot, but how to configure my botton like this: ImageButton android:layout_width=wrap_content android:layout_height=wrap_content / how can I set the layout_param at runtime? On 30 Nov, 10:34, Sarwar Erfan erfanonl...@gmail.com wrote: ImageButton constructor takes the context as input parameterhttp://developer.android.com/reference/android/widget/ImageButton.html b = new ImageButton(this); Regards Sarwar Erfan On Nov 30, 3:27 pm, Sarwar Erfan erfanonl...@gmail.com wrote: Hi, You are adding the same ImageButton again and again. You are getting reference of some existing button: b = (ImageButton) findViewById(R.id.card_image); and adding that button to the view again and again! So, you are getting the runtime error. Hint: You need to create NEW ImageButtons if you want multiple image buttons. b = new ImageButton(); Regards Sarwar Erfan On Nov 30, 3:18 pm, pedr0 pulsarpie...@gmail.com wrote: Hi at all, I have to put some ImageButton inside an LinearLayout, but I don't know the number of this statically, so because I keep the data through internet at run-time. I solved this problem adding new child at the layout at run time after the oncreate() functions is called in this way: ImageButton b; LinearLayout contanier = (LinearLayout) findViewById(R.id.card_images_layout); for (int i = 0; i this.card.images.size(); i++) { b = (ImageButton) findViewById(R.id.card_image); b.setImageBitmap((this.card.images.get(i).getImage_data())); contanier.addView(b); } But I take this error java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first Is my solution which is incorrect or I make wrong something? Thanks a lot pedr0 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Eclipse Reading Android Code as Java
The link above is for working with the Android source code (platform itself). For application development, you would need to follow the instructions here: http://developer.android.com/sdk/eclipse-adt.html Make sure you have specified the path to your SDK in Window Preferences Android SDK Location. Goodluck! -Zarah. On Nov 24, 4:12 am, Chase chasie...@gmail.com wrote: I seem to be failing at understanding how to use the make command in command prompt? Thanks you for the information otherwise, it has been really helpful! :) Thanks, Chase On Nov 23, 12:15 pm, XC He schosnab...@gmail.com wrote: you have to study this page firsthttp://source.android.com/source/using-eclipse.html 2010/11/24 Chase chasie...@gmail.com: I just inherited a project at my workplace and I am having trouble having Eclipse act as an Adroid editor rather than a Java editor. Pretty much everything is under lined and I can't seem to find a way to change how it is interpreted. I have downloaded all of the Android SDK's and the Eclipse Plugin. I can create Android projects and write the code just fine, but everything is still underlining. I must be missing something simple. Any suggestions, something I missed or didn't download? Thanks a ton guys, Chase -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] InetAddress.getByname vs ping
Hi, I need to resolve an host address to ip. My android device can ping to the hostname only to resolve the host to IP . But when I use InetAddress.getByname, it throws an exception. An excerpt of hyper terminal trace is below. Please help me resolve this issue by letteing me know which api i must use as ping is only having DNS resolution but not successful packet transmission. Trace: # ping -c 2 www.google.com PING www.l.google.com (209.85.132.104) 56(84) bytes of data. ^C ^C --- www.l.google.com ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 1006ms # # # # # ping -c 2 www.yahoo.com PING any-fp.wa1.b.yahoo.com (67.195.160.76) 56(84) bytes of data. ^C --- any-fp.wa1.b.yahoo.com ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 1006ms # ping -c 2 www.starwave.com PING starwave.com (199.181.132.250) 56(84) bytes of data. --- starwave.com ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 1007ms # # The trace of exception by InetAddress.getByname: -- W/Server( 1122): Connection error: W/Server( 1122): java.net.UnknownHostException: starwave.com W/Server( 1122): at java.net.InetAddress.lookupHostByName(InetAddress.java:504) W/ Server( 1122): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:280) W/ Server( 1122): at java.net.InetAddress.getByName(InetAddress.java:310) W/Server( 1122): at android..config.Config.getSLPHost(Config.java:169) W/Server( 1122): at com.android.server.Server.run(Server.java:211) W/ Server( 1122): at java.lang.Thread.run(Thread.java:1096) Thanks in advance for your time Regards, GSA -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: App freezes when the power key is pressed
After I insert the USB cable, there is three options “1. Connect your phone. 2. Install PC Companion. 3. Charge phone.” No matter which option I have selected, the app will just freeze without any message. When I press the power key to go to power save mode and then press it again to resume the application, the app will just freeze without any message. I test by doing lots of screen orientation changes, like you recommended.But I can not replicate the freezing problem on my Samsung galaxy. I don't have the SonyEricsson X10 and X8 devices to test on. I try to simulate a power key press on the emulator, by pressing the power button. I debug and onKeyDown is called, but onpause() and onResume() is not called. Doesn't onpause() and onResume() get called when the power key is pressed? I can not simulate insertion of a USB cable on the emulator. My onStart method only call the superclass, so I don't see how an exception could be raised here. My onResume method also sets the graphics thread to setRunning(false), which means that the thread will continue, but it will not execute the drawing loop. On 29 Nov, 19:16, Dianne Hackborn hack...@android.com wrote: What do you mean your app freezes? This is not a typical failure case when pressing the power button. :} On Mon, Nov 29, 2010 at 10:05 AM, Eyvind Almqvist eyv...@mobile-visuals.com wrote: My app freezes when the power key is pressed. This happens on SonyEricsson X10 and X8, but not on Samsung Galaxy S. This is what happens: 1)Launch the application-Press power key- Press power key again to active app-App freeze. The app also freezes when the USB cable is inserted, like this: 2)Launch the application- Insert USB cable-Message pops up and click any option to continue- App freeze. I am distributing apps to SonyEricsson's Playnow appstore. They have reported this as error, so I have to fix this. Does anyone have an idea how to fix this? I have already followed all the advices in Designing for Responsiveness on http://developer.android.com/guide/practices/design/responsiveness.html -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them.- Dölj citerad text - - Visa citerad 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] InetAddress.getByname vs ping
Re: ping - Something is blocking ICMP (ping) packets. Could be your cellular network operator, or perhaps even the firmware. Re: getByName - Does your application have android.permission.INTERNET in the manifest? -- Kostya 30.11.2010 12:48, aad пишет: Hi, I need to resolve an host address to ip. My android device can ping to the hostname only to resolve the host to IP . But when I use InetAddress.getByname, it throws an exception. An excerpt of hyper terminal trace is below. Please help me resolve this issue by letteing me know which api i must use as ping is only having DNS resolution but not successful packet transmission. Trace: # ping -c 2 www.google.com PING www.l.google.com (209.85.132.104) 56(84) bytes of data. ^C ^C --- www.l.google.com ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 1006ms # # # # # ping -c 2 www.yahoo.com PING any-fp.wa1.b.yahoo.com (67.195.160.76) 56(84) bytes of data. ^C --- any-fp.wa1.b.yahoo.com ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 1006ms # ping -c 2 www.starwave.com PING starwave.com (199.181.132.250) 56(84) bytes of data. --- starwave.com ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 1007ms # # The trace of exception by InetAddress.getByname: -- W/Server( 1122): Connection error: W/Server( 1122): java.net.UnknownHostException: starwave.com W/Server( 1122): at java.net.InetAddress.lookupHostByName(InetAddress.java:504) W/ Server( 1122): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:280) W/ Server( 1122): at java.net.InetAddress.getByName(InetAddress.java:310) W/Server( 1122): at android..config.Config.getSLPHost(Config.java:169) W/Server( 1122): at com.android.server.Server.run(Server.java:211) W/ Server( 1122): at java.lang.Thread.run(Thread.java:1096) Thanks in advance for your time Regards, GSA -- Kostya Vasilyev -- WiFi Manager + pretty widget -- 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] Re: InetAddress.getByname vs ping
Yes, permission is there as on using the IP address directly it works fine. I want to know how to emulate the ping's functionality wherein it is resolving the hostname to IP while inetaddress throws exception. ping not being able to handshake is ok. Thank you for your time again Regards On Nov 30, 3:04 pm, Kostya Vasilyev kmans...@gmail.com wrote: Re: ping - Something is blocking ICMP (ping) packets. Could be your cellular network operator, or perhaps even the firmware. Re: getByName - Does your application have android.permission.INTERNET in the manifest? -- Kostya 30.11.2010 12:48, aad пишет: Hi, I need to resolve an host address to ip. My android device can ping to the hostname only to resolve the host to IP . But when I use InetAddress.getByname, it throws an exception. An excerpt of hyper terminal trace is below. Please help me resolve this issue by letteing me know which api i must use as ping is only having DNS resolution but not successful packet transmission. Trace: # ping -c 2www.google.com PINGwww.l.google.com(209.85.132.104) 56(84) bytes of data. ^C ^C ---www.l.google.comping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 1006ms # # # # # ping -c 2www.yahoo.com PING any-fp.wa1.b.yahoo.com (67.195.160.76) 56(84) bytes of data. ^C --- any-fp.wa1.b.yahoo.com ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 1006ms # ping -c 2www.starwave.com PING starwave.com (199.181.132.250) 56(84) bytes of data. --- starwave.com ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 1007ms # # The trace of exception by InetAddress.getByname: -- W/Server( 1122): Connection error: W/Server( 1122): java.net.UnknownHostException: starwave.com W/Server( 1122): at java.net.InetAddress.lookupHostByName(InetAddress.java:504) W/ Server( 1122): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:280) W/ Server( 1122): at java.net.InetAddress.getByName(InetAddress.java:310) W/Server( 1122): at android..config.Config.getSLPHost(Config.java:169) W/Server( 1122): at com.android.server.Server.run(Server.java:211) W/ Server( 1122): at java.lang.Thread.run(Thread.java:1096) Thanks in advance for your time Regards, GSA -- Kostya Vasilyev -- WiFi Manager + pretty widget --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
[android-developers] Re: InetAddress.getByname vs ping
On Nov 30, 3:04 pm, Kostya Vasilyev kmans...@gmail.com wrote: Re: ping - Something is blocking ICMP (ping) packets. Could be your cellular network operator, or perhaps even the firmware. Re: getByName - Does your application have android.permission.INTERNET in the manifest? There are too many manifest files. Please let me know which one I must use. Regards -- Kostya 30.11.2010 12:48, aad пишет: Hi, I need to resolve an host address to ip. My android device can ping to the hostname only to resolve the host to IP . But when I use InetAddress.getByname, it throws an exception. An excerpt of hyper terminal trace is below. Please help me resolve this issue by letteing me know which api i must use as ping is only having DNS resolution but not successful packet transmission. Trace: # ping -c 2www.google.com PINGwww.l.google.com(209.85.132.104) 56(84) bytes of data. ^C ^C ---www.l.google.comping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 1006ms # # # # # ping -c 2www.yahoo.com PING any-fp.wa1.b.yahoo.com (67.195.160.76) 56(84) bytes of data. ^C --- any-fp.wa1.b.yahoo.com ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 1006ms # ping -c 2www.starwave.com PING starwave.com (199.181.132.250) 56(84) bytes of data. --- starwave.com ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 1007ms # # The trace of exception by InetAddress.getByname: -- W/Server( 1122): Connection error: W/Server( 1122): java.net.UnknownHostException: starwave.com W/Server( 1122): at java.net.InetAddress.lookupHostByName(InetAddress.java:504) W/ Server( 1122): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:280) W/ Server( 1122): at java.net.InetAddress.getByName(InetAddress.java:310) W/Server( 1122): at android..config.Config.getSLPHost(Config.java:169) W/Server( 1122): at com.android.server.Server.run(Server.java:211) W/ Server( 1122): at java.lang.Thread.run(Thread.java:1096) Thanks in advance for your time Regards, GSA -- Kostya Vasilyev -- WiFi Manager + pretty widget --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
[android-developers] Re: addView in layout at run time
Thanks a lot, it's very simple to do. On 30 Nov, 10:38, pedr0 pulsarpie...@gmail.com wrote: Thanks a lot, but how to configure my botton like this: ImageButton android:layout_width=wrap_content android:layout_height=wrap_content / how can I set the layout_param at runtime? On 30 Nov, 10:34, Sarwar Erfan erfanonl...@gmail.com wrote: ImageButton constructor takes the context as input parameterhttp://developer.android.com/reference/android/widget/ImageButton.html b = new ImageButton(this); Regards Sarwar Erfan On Nov 30, 3:27 pm, Sarwar Erfan erfanonl...@gmail.com wrote: Hi, You are adding the same ImageButton again and again. You are getting reference of some existing button: b = (ImageButton) findViewById(R.id.card_image); and adding that button to the view again and again! So, you are getting the runtime error. Hint: You need to create NEW ImageButtons if you want multiple image buttons. b = new ImageButton(); Regards Sarwar Erfan On Nov 30, 3:18 pm, pedr0 pulsarpie...@gmail.com wrote: Hi at all, I have to put some ImageButton inside an LinearLayout, but I don't know the number of this statically, so because I keep the data through internet at run-time. I solved this problem adding new child at the layout at run time after the oncreate() functions is called in this way: ImageButton b; LinearLayout contanier = (LinearLayout) findViewById(R.id.card_images_layout); for (int i = 0; i this.card.images.size(); i++) { b = (ImageButton) findViewById(R.id.card_image); b.setImageBitmap((this.card.images.get(i).getImage_data())); contanier.addView(b); } But I take this error java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first Is my solution which is incorrect or I make wrong something? Thanks a lot pedr0 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Sony Ericsson LiveView ™ micro display SDK is released
If I remember rightly you don't need a SE phone to use with the LiveView, I'll be testing with a Nexus One in the next week (should it arrive). Regards, Richard On 29 Nov 2010, at 20:33, Leon Moreyn-Android Development wrote: Ba hum bug. Its not good for US developers as most of the Xperia line in the USA will not receive update to 2.1 until most likely well into the new year. On Nov 29, 3:40 am, Najat Baker najat.ba...@sonyericsson.com wrote: You can now download LiveView™ SDK here: http://developer.sonyericsson.com/wportal/devworld/downloads/download... And you can find LiveView™ micro display developer tutorial here: http://developer.sonyericsson.com/wportal/devworld/downloads/download... Best regards Najat -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Start default email client
Hi at all, How can I make a intent to start the default email client? I would like to set the receiver address of message.. Thanks! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Displaying unicode in a TextView?
Thanks. I'll check the content variable later today or tomorrow and post back here. In the mean time, I'm wondering if perhaps this isn't a unicode issue, after all. Upon closer examination, it seems that the only characters that appear as garbage in the data I'm examining are quote characters and apostrophes. I vaguely remember seeing this problem in the past with some Microsoft character sets that might not actually be unicode. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: InetAddress.getByname vs ping
30.11.2010 13:18, aad пишет: There are too many manifest files. Please let me know which one I must use. ? The one for your application, where you call getByName. -- Kostya Vasilyev -- WiFi Manager + pretty widget -- 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] Start default email client
You can't. You can start *an* email client. Which one depends on what the user has installed, and which application he chooses. The code I use is: Intent view = new Intent(Intent.ACTION_VIEW); StringBuilder uri = new StringBuilder(mailto:;); uri.append(email address here); uri.append(?subject=).append(Uri.encode(subject here)); uri.append(body=).append(Uri.encode(message body here)); view.setData(Uri.parse(uri.toString())); startActivity(view); There are other ways to specify subject and body, but this one works with certain buggy email clients (H*C Se*se). -- Kostya 30.11.2010 13:30, pedr0 пишет: Hi at all, How can I make a intent to start the default email client? I would like to set the receiver address of message.. Thanks! -- Kostya Vasilyev -- WiFi Manager + pretty widget -- 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] Threads
Hello everybody, I have some trouble with threads. The thing is the following: I have my main Activity, which is doing some OpenGL and should be doing it at all time. In parallel to that I start another activity, which is waiting for some network traffic, once there arrives sth a variable should be changed. public class OpenGLRenderer extends GLSurfaceView implements Rend{ boolean test = false; public OpenGLRenderer(Context context) { super(context); Thread t = new Thread(){ public void run(){ try{ ServerSocket ss = new ServerSocket(7070); while(true){ test = test(ss); handler.post(update); } }catch(Exception e){ e.printStackTrace(); } } }; t.start(); } public void onDrawFrame(GL10 gl) { if(test){ Log.d(catch, test==true); } } final Runnable update = new Runnable() { @Override public void run() { Log.d(catch, test: +(test)); } private boolean test(ServerSocket ss){ try{ Log.d(com, wait for incomming connection.); while(true){ try { ss.setSoTimeout(500); Socket s = ss.accept(); ObjectInputStream ois = new ObjectInputStream(s.getInputStream()); String in = new String((byte[])ois.readObject()); //do something return true; }catch(SocketTimeoutException e){} } }catch(Exception e){ e.printStackTrace(); } return false; } } So the thing now is that test is true in the update-Runnable, but it is still false when I call it in onDrawFrame. Why is that the case, I am getting really desperate, can anybody help please!?!? Thanks a lot 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: Back key behaviour between Activity Groups.
ok If this is the case then you can implement the Back key in your code as: @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { // your implementation return true; } else { return super.onKeyDown(keyCode, event); } } or if you are using API 8 @Override public void onBackPressed() { // TODO Auto-generated method stub super.onBackPressed(); } On Nov 30, 2:27 pm, MaheshSharma maheshsharmasuco2...@gmail.com wrote: Yes, I have done that. The problem is that I will have to add manually add this PlayBack custom layout to each of the view. Now more over, even if I do that, For each new instantiation of view, I have to do bunch of instiations. Like connecting to background service. Which is costly. So I was wondering, If I could have to inflate it only once. On Nov 30, 11:57 am, akkilis deepakverma.u...@gmail.com wrote: To add on, dont forget to add the constructor to the PlayBackView with context and AttributeSet i.e. public PlayBackrView(Context context, AttributeSet attrs) { super(context, attrs); .. .. } On Nov 30, 11:52 am, akkilis deepakverma.u...@gmail.com wrote: Mahesh, Why dont you make a different class, say PlayBackView, extending LinearLayout and place the layout of the common component Playback bar in a different layout xml, say playback.xml. Now inflate the playback.xml in the PlayBackView. Now you can add this your custom view in any of the layout xml (home, A, B, C) as: ?xml version=1.0 encoding=utf-8? FrameLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent com.packagename.PlayBackView android:id=@+id/playbackview android:layout_width=match_parent android:layout_height=wrap_contentt / ImageView --- etc etc/ /FrameLayout In the PlayBackView class, you can define the onClick handlers or any other event handler as you want. Hope this will help you. On Nov 30, 7:59 am, MaheshSharma maheshsharmasuco2...@gmail.com wrote: Hello All, My app is kind of a music app and I have a playback bar that I need to be visible across all the views. I had three activities, A/B/C. Instead of adding the playback bar explicitly to all A,B,C. I added the Playback Bar to A and made A,B,C as ActivityGroups. Since, A has the playback bar, now I when I start B from A, I call setContentView from A to show B. The problem is, once I call setContentView to show B, and then if the user presses back key in B, then it goes to home screen, instead of coming to A. I have seen some snippets on web, which maintain the view stack and when user presses the back key they pop up the previous view. I couldnt implement that. Questions : 1) Is there any better way to having a activity like Playback bar/ Status bars across all the views/activities ? 2) If the above way is the only way to do it,then how can I handle the back key? With Regards MS. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Doubt Layout
Hello, I would put two buttons on one line, so that they occupy the entire horizontal space as possible with equal sizes. I put these buttons in a grid layout, divided into two columns. There is some property of the layout that can do this? Att, -- Diêgo Nunes Assunção Give Peace a Chance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Start default email client
Thanks, it works! On 30 Nov, 11:42, Kostya Vasilyev kmans...@gmail.com wrote: You can't. You can start *an* email client. Which one depends on what the user has installed, and which application he chooses. The code I use is: Intent view = new Intent(Intent.ACTION_VIEW); StringBuilder uri = new StringBuilder(mailto:;); uri.append(email address here); uri.append(?subject=).append(Uri.encode(subject here)); uri.append(body=).append(Uri.encode(message body here)); view.setData(Uri.parse(uri.toString())); startActivity(view); There are other ways to specify subject and body, but this one works with certain buggy email clients (H*C Se*se). -- Kostya 30.11.2010 13:30, pedr0 пишет: Hi at all, How can I make a intent to start the default email client? I would like to set the receiver address of message.. Thanks! -- Kostya Vasilyev -- WiFi Manager + pretty widget --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] Re: InetAddress.getByname vs ping
This code where I use getByName is actually getting converted to .jar java file. Does it still need the manifest file? I am not able to find the one related to the jar. However when I grepped all files had the permissions. Any other clues? Do I have to dig into the implementation of ping and getbyname :-( as a last resort? On Nov 30, 3:38 pm, Kostya Vasilyev kmans...@gmail.com wrote: 30.11.2010 13:18, aad пишет: There are too many manifest files. Please let me know which one I must use. ? The one for your application, where you call getByName. -- Kostya Vasilyev -- WiFi Manager + pretty widget --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] Re: [DDMS] Framework reboot failed
This time I tried for emulator with command below : *% adb shell malloc.debug.qemu 1 = I have check this property in bionic froyo % adb shell stop % adb shell start* -- Atul Raut Android Telephony Engineer http://rautatul.weebly.com/ http://rautatul.wordpress.com/ Mobile : 9581819292 atulrau...@gmail.com hack...@android.com hack...@android.com On Tue, Nov 30, 2010 at 12:52 PM, Atul Raut atul.dr...@gmail.com wrote: + more points to note is am not seen other process id than system_process. How to seen others process in same tab ? -- Atul Raut Android Telephony Engineer http://rautatul.weebly.com/ http://rautatul.wordpress.com/ Mobile : 9581819292 atulrau...@gmail.com hack...@android.com hack...@android.com On Tue, Nov 30, 2010 at 12:49 PM, Atul Raut atul.dr...@gmail.com wrote: Hi all, I wanted to check memory leak over Froyo platfrom. I started ddms by setting proper values. I started emulator [build is generic] after this I run below command to activate for memory leak. Set the env variable mention below. 1.export ANDROID_SWT=android_platform/prebuilt/linux-x86_64/swt 2.export ANDROID_PRODUCT_OUT=android_platform /out/target/product/generic/ 3.vi ~/.android/ddms.cfg add a line native=true at the end of the file 4.export PATH=$PATH:android_platform /prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/ 5.Now launch the ddms by using the command ./out/host/linux-x86/bin/ddms * And then did : % adb shell setprop libc.debug.malloc 1 % adb shell stop % adb shell start* leak but soon after adb shell start, framework is rebooting but its fail to launch the UI screen but am able to seen adb logs. And its showing SystemServer messages. Why UI Screen is not coming ? Am I missing something here ? Any pointers will helpful to me. Thanks for help in advance, -- Atul Raut Android Telephony Engineer http://rautatul.weebly.com/ http://rautatul.wordpress.com/ Mobile : 9581819292 atulrau...@gmail.com hack...@android.com hack...@android.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: LocationListener sometimes not receiving updates from network provider
Hi Igor, Thanks for your reply, it is much appreciated. Thanks also for pointing out the issues with the code I provided. However, this was merely a stripped-down outline of what I am doing. The use of mCoarseLocationListener is a type from the strip-down process, and I agree that the LocationProvider variable is not necessary. However, the problem remains that while the code works fine in 95% of cases, there are still 5% of cases where I never get a call to onLocationChanged. Any suggestions as to why this is the case would still be much appreciated. Best, Michael. On Nov 30, 12:29 am, ip332 iprile...@gmail.com wrote: Michael, According to Android documentation the following call locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, this); requests updates from WiFi or cellular network which means you should get some update (from cell tower) even if WiFi location is not available. However, I've seen cases when Google map application failed to set map to MyLocation for several minutes while driving on a freeway. Back to your code. I think you need to replace getLastKnownLocation(mCoarseLocationProvider) with getLastKnownLocation(LocationManager.NETWORK_PROVIDER) - it is not clear where do you get mCoarseLocationProvider. Also you don't need to use LocationProvider variable in your code fragment: public MyLocationListener() { mLocMan = (LocationManager)getSystemService(Context.LOCATION_SERVICE); if (mLocMan.getLastKnownLocation(LocationManager.NETWORK_PROVIDER) != null) { mCurrentLocation = mLocMan.getLastKnownLocation(LocationManager.NETWORK_PROVIDER); } mLocMan.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, this); } Check the following link which has a lot of useful suggestions:http://developer.android.com/guide/topics/location/obtaining-user-loc... Bets regards Igor On Nov 29, 2:44 pm, michael michael.d.peder...@googlemail.com wrote: Let me also add that the location listener does sometimes get calls to onProviderEnabled -- this happens after asking the user to enable wireless network locations if initially disabled. So I know for sure that the listener is registered correctly. It just never gets an onLocationChanged call. /Michael. On Nov 29, 10:10 pm, michael michael.d.peder...@googlemail.com wrote: Hi folks, I have a location listener running in a foreground service. The listener registers for wireless network updates in its constructor. In the majority of cases, location updates are received as expected. However, log entries from the live app show that for about 5% of my users, location updates are never received even though wireless network location is enabled on the phone (I check this through the LocationManager.isProviderEnabled method). That is, onLocationChanged is never called, at least not within say 20 minutes of registering the listener. Does anybody have any idea why this might be? Are there cases, or certain geographic areas, where you would not expect wireless locations to be available? A stripped-down outline of the location listener code is shown below: class MyLocationListener extends LocationListener { private Location mLocation = null; public MyLocationListener() { mLocMan = (LocationManager) getSystemService(Context.LOCATION_SERVICE); if (mLocMan.getLastKnownLocation(mCoarseLocationProvider) != null) { mCurrentLocation = mLocMan.getLastKnownLocation(mCoarseLocationProvider); } LocationProvider lp = mLocMan.getProvider(LocationManager.NETWORK_PROVIDER); mLocMan.requestLocationUpdates(lp.getName(), 0, 0, this); } public void onLocationChanged(Location loc) { mLocation = loc; } } I verify through flurry logs that the network location provider is indeed obtained and enabled, and that mLocation == null after about 20 minutes. Any suggestions would be enormously appreciated. I am running out of ideas for how to fix this, and I cannot replicate the issue on my own test devices. Cheers, Michael.- 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: InetAddress.getByname vs ping
30.11.2010 14:03, aad пишет: This code where I use getByName is actually getting converted to .jar java file. Does it still need the manifest file? I am not able to find the one related to the jar. However when I grepped all files had the permissions. No, a jar file doesn't have its own manifest. Check the manifest of the application where the jar is used. Any other clues? Do I have to dig into the implementation of ping and getbyname:-( as a last resort? I don't think that's necessary :) -- Kostya Vasilyev -- WiFi Manager + pretty widget -- 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] Re: Start default email client
I am sorry, yes it's works, it show me a email client, but when I click to send button it say me that the email is sended, but the email account configured doesn't receive an email! What's wrong? On 30 Nov, 11:58, pedr0 pulsarpie...@gmail.com wrote: Thanks, it works! On 30 Nov, 11:42, Kostya Vasilyev kmans...@gmail.com wrote: You can't. You can start *an* email client. Which one depends on what the user has installed, and which application he chooses. The code I use is: Intent view = new Intent(Intent.ACTION_VIEW); StringBuilder uri = new StringBuilder(mailto:;); uri.append(email address here); uri.append(?subject=).append(Uri.encode(subject here)); uri.append(body=).append(Uri.encode(message body here)); view.setData(Uri.parse(uri.toString())); startActivity(view); There are other ways to specify subject and body, but this one works with certain buggy email clients (H*C Se*se). -- Kostya 30.11.2010 13:30, pedr0 пишет: Hi at all, How can I make a intent to start the default email client? I would like to set the receiver address of message.. Thanks! -- Kostya Vasilyev -- WiFi Manager + pretty widget --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] Re: Doubt Layout
Use Linear layout with fill_parent(width). Add 2 buttons with layout_weight as 1. On Nov 30, 3:51 pm, Diego N. diegonunes.sist...@gmail.com wrote: Hello, I would put two buttons on one line, so that they occupy the entire horizontal space as possible with equal sizes. I put these buttons in a grid layout, divided into two columns. There is some property of the layout that can do this? Att, -- Diêgo Nunes Assunção Give Peace a Chance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: images not scaled to screen size
Yes, they will be scaled, provided you design your app to do so. Say, for example, if you have an ImageView/ImageButton, there is a property scaleType. If you don't change it, the images will be scaled. But if you are using that, then, depending on the type, it might or might not scale. But, I am still not clear about your confusion. The emulators should first of all register as large devices, else, there's no point in having the hdpi folder. On Nov 30, 12:39 pm, Vinay vinayku...@gmail.com wrote: Hi, Thank you very much for the information. Yet another question is: The images that are present in the hdpi folder are however not to the scale such that it can fit for a 17TFT monitor. So in such a case will the images be automiatically scaled ?? I see that all other applications are rendered full screen and even the custom application invovling only default android widgets also works fine. It is only images that are being used (for image View etc.) that pose problem. I'll be thankful if you can please provide some insight about the autoscaling as well. Thanks again, Vinay. On Nov 30, 10:19 am, Kumar Bibek coomar@gmail.com wrote: Well, the device/emulator you are running your application should register as a L device. Only then, is will pick up the corresponding resources. Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com On Tue, Nov 30, 2010 at 9:48 AM, Vinay vinayku...@gmail.com wrote: Hai All, I did go through the Multiple screen support document: http://developer.android.com/guide/practices/screens_support.html I'm using freescale imx51 board connected to a DELL 17 TFT monitor. The default applications do appear full screen. But when I port my custom application it renders in compatibility mode. I have observed that the images that are in the folder mdpi are being used by the application for the above said display.. I have also tried using support screen and any density parameters in the manifest file. I have all the three folders (hdpi, ldpi, mdpi) holding density specific images. First I tested my application on the emulator (Medium Density / Normal Screen). Hence my image size were specific to 480X320 (Landscape mode). I generated hdpi and ldpi images accordingly: hdpi = 1.5 x mdpi ldpi = 0.75 x mdpi Please help understand why the custom application not being rendered full screen like all other default pplication. Why are images not being scaled to fit the DELL 17 monitor connected to the imx51 board. Also what exactly should be values of support screen and any-density fields in the manifest file when above said display's are being used Thanks in advance Vinay. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en-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: Start default email client
If the message is sent but not received, something is wrong somewhere along the way (not in the intent). What happens if you send the message yourself, from the same email program / address, to the same address? -- Kostya 30.11.2010 14:17, pedr0 пишет: I am sorry, yes it's works, it show me a email client, but when I click to send button it say me that the email is sended, but the email account configured doesn't receive an email! What's wrong? On 30 Nov, 11:58, pedr0pulsarpie...@gmail.com wrote: Thanks, it works! On 30 Nov, 11:42, Kostya Vasilyevkmans...@gmail.com wrote: You can't. You can start *an* email client. Which one depends on what the user has installed, and which application he chooses. The code I use is: Intent view = new Intent(Intent.ACTION_VIEW); StringBuilder uri = new StringBuilder(mailto:;); uri.append(email address here); uri.append(?subject=).append(Uri.encode(subject here)); uri.append(body=).append(Uri.encode(message body here)); view.setData(Uri.parse(uri.toString())); startActivity(view); There are other ways to specify subject and body, but this one works with certain buggy email clients (H*C Se*se). -- Kostya 30.11.2010 13:30, pedr0 пишет: Hi at all, How can I make a intent to start the default email client? I would like to set the receiver address of message.. Thanks! -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- Kostya Vasilyev -- WiFi Manager + pretty widget -- 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] Re: How to terminate an Android emulator by programing?
Kill the process by making a native call, I guess. On Nov 28, 12:48 pm, Cheng Wu swing1...@gmail.com wrote: In my program , I need to start and terminate emulators one by one. I found the way to start the emulator in programming, but still not found how to terminate it. Clearly , at last I must let the emulator's window Disappear. Could someone help me? Think you !! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] I am unable to install APK on the emulator!!!
Hi all, I have an application with minSDKVersion as 7 and my emulator's SDK version is 8. When i try to install the APK on my emulator, i am getting error as INSTALL_FAILED_OLDER_SDK. Why am i getting this error? 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] World's Strongest Child
http://guinesssrecords.blogspot.com/2010/11/worlds-strongest-child.html -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 can I split pdf file into png / jpeg image
Go through the PDF format, and check if the libraries for reading PDF give this feature. There's no shortcut, I am sure. You have to do a bit of research and coding yourself. On Nov 27, 1:47 pm, sanjay sanjayujjain...@gmail.com wrote: Hi, I want my android application to save each page of a pdf file into a png / jpeg image. Any idea how to achieve this? Thanks Regards, Sanjay Ujjainkar -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] World's Strongest Child
I don't agree Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Tue, Nov 30, 2010 at 5:05 PM, Sami sami...@gmail.com wrote: http://guinesssrecords.blogspot.com/2010/11/worlds-strongest-child.html -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: InetAddress.getByname vs ping
This jar is run on boot-up. I dont invoke any application explicitly. I just switch on the Do I need to link one for this jar or is there any under-running application invoked from behind that I may not know? But I am still confused how it works fine when I directly use the IP address, but fails only on this conversion. and surprisingly ping resolves On Nov 30, 4:17 pm, Kostya Vasilyev kmans...@gmail.com wrote: 30.11.2010 14:03, aad пишет: This code where I use getByName is actually getting converted to .jar java file. Does it still need the manifest file? I am not able to find the one related to the jar. However when I grepped all files had the permissions. No, a jar file doesn't have its own manifest. Check the manifest of the application where the jar is used. Any other clues? Do I have to dig into the implementation of ping and getbyname:-( as a last resort? I don't think that's necessary :) -- Kostya Vasilyev -- WiFi Manager + pretty widget --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: InetAddress.getByname vs ping
Is this a normal application, can you run it after the device is booted? Or is this part of custom firmware? -- Kostya 30.11.2010 14:43, aad пишет: This jar is run on boot-up. I dont invoke any application explicitly. I just switch on the Do I need to link one for this jar or is there any under-running application invoked from behind that I may not know? But I am still confused how it works fine when I directly use the IP address, but fails only on this conversion. and surprisingly ping resolves On Nov 30, 4:17 pm, Kostya Vasilyevkmans...@gmail.com wrote: 30.11.2010 14:03, aad пишет: This code where I use getByName is actually getting converted to .jar java file. Does it still need the manifest file? I am not able to find the one related to the jar. However when I grepped all files had the permissions. No, a jar file doesn't have its own manifest. Check the manifest of the application where the jar is used. Any other clues? Do I have to dig into the implementation of ping and getbyname:-( as a last resort? I don't think that's necessary :) -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- Kostya Vasilyev -- WiFi Manager + pretty widget -- 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] Re: Market expanding to technically non-compliant devices?
Hi And when I use my phone touchscreen app to control my TV app hopefully from a single integrated apk then what ? Regards On Nov 30, 7:20 pm, blindfold seeingwithso...@gmail.com wrote: Yes, things are getting confusing if not messy. The Logitech TV Cam accessory for the Logitech Revue Google TV adds a camera to Google TVhttp://www.logitech.com/en-us/smartTV/accessories/devices/tv-cambut it can reportedly not be used by Android apps: The TV Cam cannot be accessed from other applications at this timehttp://forums.adobe.com/message/3256491#3256491 Great, so there *is* a camera for this Android device (Google TV) but it cannot be used by regular Android apps. Now this probably means that Android camera apps will simply remain invisible on the Android Market for this Google TV, but for developers it is just as important to know if a device is compatible with their app or not - to be able to tell their customers. One should not have to scour web forums in the hope of getting an indication of that. In other words, should it not be *required* that Logitech clearly indicates on their website that Logitech TV Cam does not work with third-party (and Google's!) Android camera apps, and *only* works with their own proprietary video call app? I currently cannot find this on the Logitech TV Cam product pagehttp://www.logitech.com/en-us/smartTV/accessories/devices/tv-camand even if it is hidden somewhere in the small print that is hardly practical for developers who need to be able to quickly tell compatibility for a range of new devices to answer customer inquiries. Looks like there should be some additional requirements for manufacturers here in order to be allowed to use the Google TV brand, because everybody already knows that Google TV runs Androidhttp://www.google.com/tv/developers.htmland if there is a camera accessory everybody would assume that Android camera apps would run fine and not be in for an unpleasant surprise or a heap of uncertainty. Thanks! On Nov 30, 8:20 am, Spiral123 cumis...@gmail.com wrote: GoogleTV. My Logitech Revue has no touch screen - assuming the market gets expanded to this device (yes please!) then I won't want to see any apps where I need to touch the screen. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: InetAddress.getByname vs ping
It is invoked by default. It is like a feature, say like Bluetooth on Android, a functionality. I have other methods to explicitly invoke an application which will use this later, but this one - happens by default, on boot-up, as soon as I switch on my device with the loaded SD Card. On Nov 30, 4:52 pm, Kostya Vasilyev kmans...@gmail.com wrote: Is this a normal application, can you run it after the device is booted? Or is this part of custom firmware? -- Kostya 30.11.2010 14:43, aad пишет: This jar is run on boot-up. I dont invoke any application explicitly. I just switch on the Do I need to link one for this jar or is there any under-running application invoked from behind that I may not know? But I am still confused how it works fine when I directly use the IP address, but fails only on this conversion. and surprisingly ping resolves On Nov 30, 4:17 pm, Kostya Vasilyevkmans...@gmail.com wrote: 30.11.2010 14:03, aad пишет: This code where I use getByName is actually getting converted to .jar java file. Does it still need the manifest file? I am not able to find the one related to the jar. However when I grepped all files had the permissions. No, a jar file doesn't have its own manifest. Check the manifest of the application where the jar is used. Any other clues? Do I have to dig into the implementation of ping and getbyname:-( as a last resort? I don't think that's necessary :) -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- Kostya Vasilyev -- WiFi Manager + pretty widget --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
[android-developers] Re: I am unable to install APK on the emulator!!!
Here i am trying to build the apk as part of android source code. But i am not changing any framework.. Is this causing any issue... On Nov 30, 4:34 pm, Pink sivareddy.j...@gmail.com wrote: Hi all, I have an application with minSDKVersion as 7 and my emulator's SDK version is 8. When i try to install the APK on my emulator, i am getting error as INSTALL_FAILED_OLDER_SDK. Why am i getting this error? 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: Please help with an ideea
Now even one little 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] Twitter Integration with Android app
Hi All I need to integrate the Twitter in my application,Could any body please let me know what are the best way to achieve this. I only need to Login and post a tweet in twitter from android app.Is there any sort of SDK for Twitter?. -- 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] Re: InetAddress.getByname vs ping
Not sure what invoked by default is. It sure seems like at the time your code runs, DNS is not properly set up yet. Since you are customizing the platform, this group is a better match: http://groups.google.com/group/android-platform -- Kostya 30.11.2010 15:05, aad пишет: It is invoked by default. It is like a feature, say like Bluetooth on Android, a functionality. I have other methods to explicitly invoke an application which will use this later, but this one - happens by default, on boot-up, as soon as I switch on my device with the loaded SD Card. On Nov 30, 4:52 pm, Kostya Vasilyevkmans...@gmail.com wrote: Is this a normal application, can you run it after the device is booted? Or is this part of custom firmware? -- Kostya 30.11.2010 14:43, aad пишет: This jar is run on boot-up. I dont invoke any application explicitly. I just switch on the Do I need to link one for this jar or is there any under-running application invoked from behind that I may not know? But I am still confused how it works fine when I directly use the IP address, but fails only on this conversion. and surprisingly ping resolves On Nov 30, 4:17 pm, Kostya Vasilyevkmans...@gmail.comwrote: 30.11.2010 14:03, aad пишет: This code where I use getByName is actually getting converted to .jar java file. Does it still need the manifest file? I am not able to find the one related to the jar. However when I grepped all files had the permissions. No, a jar file doesn't have its own manifest. Check the manifest of the application where the jar is used. Any other clues? Do I have to dig into the implementation of ping and getbyname:-( as a last resort? I don't think that's necessary :) -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com- Hide quoted text - - Show quoted text - -- Kostya Vasilyev -- WiFi Manager + pretty widget -- 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] Re: How can I split pdf file into png / jpeg image
This is to intensive for mobile devices! Make a webservice that accepts a pdf and returns the image! Byron Grace Software On Nov 27, 3:47 am, sanjay sanjayujjain...@gmail.com wrote: Hi, I want my android application to save each page of a pdf file into a png / jpeg image. Any idea how to achieve this? Thanks Regards, Sanjay Ujjainkar -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Feature Graphic, High Resolution Application Icon and Promotional Video.
no answer. congratulations google :) On Nov 26, 11:20 am, sblantipodi perini.dav...@dpsoftware.org wrote: contected them, lets see if they answer. On Nov 25, 11:58 pm, TreKing treking...@gmail.com wrote: On Thu, Nov 25, 2010 at 4:10 AM, sblantipodi perini.dav...@dpsoftware.orgwrote: Is there someone who know when we can finally upload this file without having to re-upload and re-upload it? Do you know also what URL should we use for Promotional Video? Is it good a youtube url or they need a direct link to a video file ? I don't think the people able to answer that question read this group. And if they do, they're not going to answer you. This is your best option.http://www.google.com/support/androidmarket/bin/request.py?contact_ty... - 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: Stupid market.
Today is 30 November, do you see the content rating options in your developer console? I'm really bothered from this market. On Nov 24, 11:30 pm, Kostya Vasilyev kmans...@gmail.com wrote: The email said age ratings go into effect starting November 30. There is still time. Finally, a convenient way to find Sexy Girl Wallpaper applications :) -- Kostya Vasilyev --http://kmansoft.wordpress.com 25.11.2010 1:26 пользователь sblantipodi perini.dav...@dpsoftware.org написал: So there is no need that I submit that form, you should implement the features you want to implement in a reasonable stable way before asking us to modify something. I have just received an email from the market saying that I need to set a content ratings for my apps. I login to the url they gived me, and there is no way to set my content ratings. Hey guys, please, don't bother us. On Nov 24, 11:19 pm, Nathan critter...@crittermap.com wrote: I've added them plenty of times too. I'm hoping it takes one of these times. Nathan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Stupid market.
30.11.2010 16:19, sblantipodi пишет: Today is 30 November, do you see the content rating options in your developer console? No, there isn't. But it's still the night before the 30th in Mountain View, California. I'm really bothered from this market. On Nov 24, 11:30 pm, Kostya Vasilyevkmans...@gmail.com wrote: The email said age ratings go into effect starting November 30. There is still time. Finally, a convenient way to find Sexy Girl Wallpaper applications :) -- Kostya Vasilyev --http://kmansoft.wordpress.com 25.11.2010 1:26 пользователь sblantipodiperini.dav...@dpsoftware.org написал: So there is no need that I submit that form, you should implement the features you want to implement in a reasonable stable way before asking us to modify something. I have just received an email from the market saying that I need to set a content ratings for my apps. I login to the url they gived me, and there is no way to set my content ratings. Hey guys, please, don't bother us. On Nov 24, 11:19 pm, Nathancritter...@crittermap.com wrote: I've added them plenty of times too. I'm hoping it takes one of these times. Nathan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilyev -- WiFi Manager + pretty widget -- 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: Feature Graphic, High Resolution Application Icon and Promotional Video.
Mine were getting lost early on, too, but the ones I uploaded on the 27th persisted. I can see them now. Give it a try, see if it works for you. -- Kostya 30.11.2010 16:17, sblantipodi пишет: no answer. congratulations google :) On Nov 26, 11:20 am, sblantipodiperini.dav...@dpsoftware.org wrote: contected them, lets see if they answer. On Nov 25, 11:58 pm, TreKingtreking...@gmail.com wrote: On Thu, Nov 25, 2010 at 4:10 AM, sblantipodi perini.dav...@dpsoftware.orgwrote: Is there someone who know when we can finally upload this file without having to re-upload and re-upload it? Do you know also what URL should we use for Promotional Video? Is it good a youtube url or they need a direct link to a video file ? I don't think the people able to answer that question read this group. And if they do, they're not going to answer you. This is your best option.http://www.google.com/support/androidmarket/bin/request.py?contact_ty... - TreKinghttp://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- Kostya Vasilyev -- WiFi Manager + pretty widget -- 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] Re: lock sqlite file
I'm not sure you can lock the file (at least without having root permissions). I am not that familiar with that in java, but I would look for a read write lock of some kind, using the write lock only when you need to transfer the file, and the read lock when you are writing into the db in any of your methods. In this way all the writes won't lock, unless you are transferring the file, and the transfer process will wait for the end of any current write. Hope I was clear enough, Federico On 30 Nov, 10:25, manigault manig...@gmail.com wrote: Hi all, I have the following problem i have to transfer my db file over internet. How can i lock the file to ensure that nobody will write in the sqlite db file while i am transferring it. I need to get READ LOCK on the file to prevent blocking on read operations. Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: What is the best way to send data from Android Application to a Remote MySQL Database?
Agree use a Rest Service or several On Nov 29, 1:56 pm, Leon Moreyn-Android Development lmor...@earthcam.com wrote: You can create an online page to handle data posts to your database. On Nov 29, 7:34 am, priya naral naral.pr...@gmail.com wrote: What is the best way to send data from Android Application to a Remote MySQL Database? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Button placement problems
Hello, I could find anything similar so I decided to open a new thread. However if there already is a similar answer please post the link. I need to place my buttons in a little unconventional way shown here (dkw I could post the message with an imageshack link so an ASCI 'picture'): ___ || || || || || || |__| |___B1_| || | | |___B2___|_|___ B3__ | In fact I need it working in a second screen without B2. So far my code is the following: ?xml version=1.0 encoding=utf-8? LinearLayout android:id=@+id/layout1 android:layout_width=fill_parent android:layout_height=fill_parent xmlns:android=http://schemas.android.com/apk/res/android; android:background=@drawable/id_app2 android:orientation=vertical android:gravity=fill Button android:id=@+id/button1 android:layout_width=fill_parent android:layout_gravity=center_vertical android:layout_marginTop=291dp android:layout_height=40dp /Button Button android:id=@+id/button3 android:layout_width=wrap_content android:layout_height=wrap_content android:height=30dp android:width=160dp android:layout_gravity=bottom|right android:layout_marginTop=70dp /Button /LinearLayout (for simplicity I have removed the B2 from the code) An it worked on my Samsung Galaxy. However I tried the same app on my friends acer phone and the buttons were higher that should be. This is a little bit strange since everything on other screens works fine (as you can see I use dp not px) - I only have problem with this one. How to place them so they would be the same at every device? PS: For clarity B1 is a below the center of the screen. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Button placement problems
Serdel, Please note that you set B1 to be centered_vertical and have top_margin of 291dp. Which Acer phone you tested this on and the result was not the same? Do you need the space between B1 and B2, B3? Daniel On Tue, Nov 30, 2010 at 1:53 PM, Serdel adam.lichwierow...@gmail.com wrote: Hello, I could find anything similar so I decided to open a new thread. However if there already is a similar answer please post the link. I need to place my buttons in a little unconventional way shown here (dkw I could post the message with an imageshack link so an ASCI 'picture'): ___ | | | | | | | | | | | | |__| |___B1_| | | | | |___B2___|_|___ B3__ | In fact I need it working in a second screen without B2. So far my code is the following: ?xml version=1.0 encoding=utf-8? LinearLayout android:id=@+id/layout1 android:layout_width=fill_parent android:layout_height=fill_parent xmlns:android=http://schemas.android.com/apk/res/android; android:background=@drawable/id_app2 android:orientation=vertical android:gravity=fill Button android:id=@+id/button1 android:layout_width=fill_parent android:layout_gravity=center_vertical android:layout_marginTop=291dp android:layout_height=40dp /Button Button android:id=@+id/button3 android:layout_width=wrap_content android:layout_height=wrap_content android:height=30dp android:width=160dp android:layout_gravity=bottom|right android:layout_marginTop=70dp /Button /LinearLayout (for simplicity I have removed the B2 from the code) An it worked on my Samsung Galaxy. However I tried the same app on my friends acer phone and the buttons were higher that should be. This is a little bit strange since everything on other screens works fine (as you can see I use dp not px) - I only have problem with this one. How to place them so they would be the same at every device? PS: For clarity B1 is a below the center of the screen. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Daniel Drozdzewski -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Sony Ericsson LiveView™ m icro display SDK is released
Hi, Is it possible to get a download link for the android-2.1 update for the Xperia X10? I have one and would like to update it. Elvis Dowson -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Do Androids dream of rule engines?
Hi Bob. Thank you for your feedback! The reason why I didn't put why rule engines are needed on Android in the post and on the site (except a little bit on the history page) is because I'm primarily Java SE/J2EE guy and no expert in Android. This is why the post is a question. It is for Android experts to decide whether it is needed and how it can be used. If the community shares these thought with me, I'll gladly publish them in the Event Bus online documentation, given posters permission. My reasons to believe that there is a need are listed below: - About two years ago Sun Java ME guys from JCP approached me and said that Hammurapi Rules (the predecessor of Event Bus) is the only rules engine which runs on Java ME and that there is a great need in rule engines on mobile devices. They wanted to come up with Java spec for rule engines on mobile devices. (Then Oracle acquired Sun and it didn't go anywhere.) This was the primary factor to build Event Bus in a way that it runs on both Java SE and Android. - I think that there are a lot of events flying around in a mobile device. A mobile device communicates with the external worlds and these communications aren't fast. This is why parallel predicate evaluation and parallel handler execution was introduced. - I also thought about leveraging it in UI as you described, but again - I do not possess the expert power in this area - I know how to build UI's, but I don't do it on a daily basis. So I decided that it's better not to say something than to say something wrong. Event Bus supports retractions - you can remove event from the bus and all conclusions based on this event will be invalidated. However, in the current release retraction does not activate any handlers, as it used to be in Hammurapi Rules. Thank you for pointing it out - I'll add the concept of retraction-activated handlers to the bus. Do you mind if I incorporate your feedback into the Why section on the Android page? --- Best regards, Pavel. On Nov 29, 10:07 pm, Bob Kerns r...@acm.org wrote: Hi, Pavel. I would like to see the Code of Hammurapi ... I hope it's not written in cuneiform! :=) Great name! I think it would be helpful if you were to be a bit more explicit about what makes you believe there is a need for aruleengineon Android. I've written moreruleengines than I can recall offhand, and a big fan ofruleengines in general, but I'd find it hard to characterize just why and when you need one on Android. I imagine people less familiar withruleengines would find it even more difficult, even when they're facing a problem well-solved with it. So I'd encourage you to write a bit more about why and how you see it being useful on Android. Looking over your site, it looks like you are using something similar to a Rete network for your matching. And that you've extended this with asynchronous execution of predicates and handlers? Perhaps one scenario is when you have slow interactions (e.g. network interactions) which have to asynchronously interact with the UI, and not block the event thread? Expressing this as Hammurapi rules might be a good way to to integrate such background interactions and the UI? This would avoid a lot of threading pitfalls and UI coordination headaches. I have found thatruleengines are a very nice way to manage complex UI concerns, such as when buttons should be activated, what values should populate drop-down lists, etc. Especially when theruleengine supports retraction -- so that if one of the conditions that led to a button being activated is no longer true, the button is then deactivated automatically. Do you support any form of retraction -- reversing an action (un-asserting a fact) when the condition that led to it is no longer true? Given how simple individual Android screens are, and how they are spread across multiple activities, I'm not sure whether this makes android need rules less -- or more! Perhaps more, as the logic around maintaining the various bits of state across activities should perhaps be best managed in a way decoupled from individual screens. On Nov 28, 12:53 pm, Pavel Vlasov pvlasov...@gmail.com wrote: Hello, I've searched this forum and the web and got an impression that there is a need for aruleengineon Android, but there are very fewrule engines which can run on it. I'd like to share with the community that Hammurapi Group has recently released Hammurapi Event Bus (http://www.hammurapi.com/dokuwiki/ doku.php/products:event_bus:start), which is a forward-chainingrule engineand an event dispatchingengine. It runs on Java 6 and Android 2.0+. --- Best regards, Pavel. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at
[android-developers] Detect OSK shown / hidden events
Hi all! We're trying to trigger an animation whenever the on screen keyboard is shown or closed. There doesn't seem to be any options to register listeners directly to that event either in the EditText or in the window / app in general. Only solution I managed to find was an older post here where solution was to listen to size changed events. From this thread: http://groups.google.com/group/android-developers/browse_thread/thread/9d1681a01f05e782 Unfortunately, that solution doesn't work in landscape mode. For some reason the onSizeChanged doesn't get called in landscape mode. As the previous thread is already very old I was hoping that maybe in 2.0 or later versions there would be an API for that. What is the best way to get notifications when the OSK is opened / closed? Thanks! Juhani -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Market expanding to technically non-compliant devices?
What do you mean what? Your phone touchscreen app will work fine with your touchscreen phone. with luck your app should then be able to find your GoogleTV device and get it to do stuff. How you talk to it and what stuff you can get it to do we will find out when we finally get to see the SDK. As blindfold says earlier in the thread, although it appears that manufacturers can turn off hardware availability (e.g. TV Cam) that is going to be frustrating to developers and end users alike. Another example that will potentially irritate me is that the Logitech device has hardware IR and RF remote sensors built in but is currently hardwired to only accept specific Logitech Harmony RF remotes. I expect the SDK will include functionality to deal with remotes - but I hope the agreement between Logitech and Google requires Logitech to enable all the capabililites of the device. On Nov 30, 7:01 am, gjs garyjamessi...@gmail.com wrote: Hi And when I use my phone touchscreen app to control my TV app hopefully from a single integrated apk then what ? Regards On Nov 30, 7:20 pm, blindfold seeingwithso...@gmail.com wrote: Yes, things are getting confusing if not messy. The Logitech TV Cam accessory for the Logitech Revue Google TV adds a camera to Google TVhttp://www.logitech.com/en-us/smartTV/accessories/devices/tv-cambut it can reportedly not be used by Android apps: The TV Cam cannot be accessed from other applications at this timehttp://forums.adobe.com/message/3256491#3256491 Great, so there *is* a camera for this Android device (Google TV) but it cannot be used by regular Android apps. Now this probably means that Android camera apps will simply remain invisible on the Android Market for this Google TV, but for developers it is just as important to know if a device is compatible with their app or not - to be able to tell their customers. One should not have to scour web forums in the hope of getting an indication of that. In other words, should it not be *required* that Logitech clearly indicates on their website that Logitech TV Cam does not work with third-party (and Google's!) Android camera apps, and *only* works with their own proprietary video call app? I currently cannot find this on the Logitech TV Cam product pagehttp://www.logitech.com/en-us/smartTV/accessories/devices/tv-camand even if it is hidden somewhere in the small print that is hardly practical for developers who need to be able to quickly tell compatibility for a range of new devices to answer customer inquiries. Looks like there should be some additional requirements for manufacturers here in order to be allowed to use the Google TV brand, because everybody already knows that Google TV runs Androidhttp://www.google.com/tv/developers.htmlandif there is a camera accessory everybody would assume that Android camera apps would run fine and not be in for an unpleasant surprise or a heap of uncertainty. Thanks! On Nov 30, 8:20 am, Spiral123 cumis...@gmail.com wrote: GoogleTV. My Logitech Revue has no touch screen - assuming the market gets expanded to this device (yes please!) then I won't want to see any apps where I need to touch the screen. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Please help with an ideea
http://tinyurl.com/34f6d55 :) Yahel -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] getLookupUri(contactId, lookupKey) clarification
This was a bug in 2.1. Lookup key was based on the contact name for unsynced contacts, which created the problem you are describing. As of 2.2 we use raw contact ids instead. In both cases we use stable server-side ids for synced contacts. On Nov 29, 2010 11:01 PM, LSDsl gls...@gmail.com wrote: Hi. Misunderstand with this (getLookupUri(contactId, lookupKey)). I store id and lookup in my application. After resave contact (change name for example) lookup also changes (but ID not change) I cannot select contact from DB using getLookupUri(contactId, lookupKey). Why? In docs When both IDs are present in the URI, the system will try to use the long ID first. That is a very quick query. If the contact is not found, or if the one that is found has the wrong lookup key, the content provider will parse the lookup key and track down the constituent raw contacts.. So long ID is correct in my situation. So can somebody clarify this situation and say how what information I must store to 100% select contact in future? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Please help with an ideea
Not so fast my friend, I'm talking here about something totaly different than modifing the screen brigtness from API... This program apply somesort or filter to further reduce the brightness bellow the minimum value ..very useful on AMOLED screens like GalaxyS, where some people find the lowest value much to bright especially at night... So, no, no, next time read more careful ;) On Nov 30, 5:04 pm, Yahel kaye...@gmail.com wrote: http://tinyurl.com/34f6d55 :) Yahel -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Doubt Layout
Thank you Kumar, worked the way you expected. On Tue, Nov 30, 2010 at 9:24 AM, Kumar Bibek coomar@gmail.com wrote: Use Linear layout with fill_parent(width). Add 2 buttons with layout_weight as 1. On Nov 30, 3:51 pm, Diego N. diegonunes.sist...@gmail.com wrote: Hello, I would put two buttons on one line, so that they occupy the entire horizontal space as possible with equal sizes. I put these buttons in a grid layout, divided into two columns. There is some property of the layout that can do this? Att, -- Diêgo Nunes Assunção Give Peace a Chance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Diêgo Nunes Assunção Give Peace a Chance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Detect touch event on a OpenGL object
Yes you are right. is white, sorry I was confused. :) So, I have tried to implement the color-picking solution, without fortune, because I always get from glReadPixels... and I don't understand why... Maybe I can't read from the frame buffer? I'm using Android 2.2 and 2.1. :( This is my code, where x and y are the coordinates of point on the screen where I touch. ByteBuffer buff = ByteBuffer.allocateDirect(4); buff.order(ByteOrder.nativeOrder()); byte [] array = new byte[4]; gl.glReadPixels(x, y, 1, 1, GL10.GL_RGBA, GL10.GL_UNSIGNED_BYTE, buff); buff.get(array); Log.d(DEBUG, + array[0] + - + array[1] + - + array[2] + - + array[3]); On 29 Nov, 19:52, Phil Endecott spam_from_goo...@chezphil.org wrote: gl.glColor4f(colorCount, 0, 0, 1); markers.get(i).draw(); colorCount++; but unfortunately it doesn't work. The color remains always white (0,0,0,1) in RGBA. White is 1,1,1,1. The colour components passed to glColor4f are floats and should range between 0 and 1. So colorCount++ is probably not what you want. Maybe it will work if you do colorCount+=0.01. But I suggest using glColour4ub (if that's available in the Java binding) as that lets you pass bytes and you know you'll get the exact same values back without any float-to-int conversion issues. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Twitter Integration with Android app
Try Twiiter4J library. Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Tue, Nov 30, 2010 at 6:05 PM, Ajmer Singh ajmersing...@gmail.com wrote: Hi All I need to integrate the Twitter in my application,Could any body please let me know what are the best way to achieve this. I only need to Login and post a tweet in twitter from android app.Is there any sort of SDK for Twitter?. -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: What's the best way to have your app 'sleep' for N milliseconds?
The Thread.sleep(1000) is probably not the best idea on Android because responsiveness is an issue if you care about user ratings ;-). With Thread.sleep() the app just sit's there and waits and won't respond to user input. I would recommend using something like: private static final int WAKE_UP_DELAY = 5000; private static final int WAKE_UP_CALL = 0; private Handler handler; private Runnable wakeUpCall = new Runnable() { @Override public void run() { handler.sendEmptyMessage(WAKE_UP_CALL); } }; handler = new Handler(new Handler.Callback() { @Override public boolean handleMessage(Message msg) { if (msg.what==WAKE_UP_CALL) { // change message, your code goes here... // let's start the timer again handler.postDelayed(wakeUpCall, WAKE_UP_DELAY); return true; } return false; } } ); handler.postDelayed(wakeUpCall, WAKE_UP_DELAY); // do something... The // do something part is the important difference to the Thread.sleep(). With the latter the app sleeps while with the my version the app can do whatever the app is supposed to do. And after a certain time (5 seconds in my example) you can change the message or whatever else there is to do. Emanuel Moecklin 1gravity LLC A big bang experience for our customers! On Nov 29, 2:55 pm, dipti dvai...@gmail.com wrote: You can use java's Thread.sleep(1000) . This will make the application pause for 1 sec ( 1000 millisec ) On Nov 29, 6:49 am, charlest stevegut...@gmail.com wrote: I want to display a message on the screen, have it displayed for 60 seconds, then display another message. There is nothing specific going on during the 60 seconds that I'm waiting to complete, so AsyncTask doesn't seem to apply. Does someone have a generic code snippet that does this so that I can use it in other places as needed? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Detect OSK shown / hidden events
Take a look at the onConfigurationChanged(). If you add in the manifest that you want to handle the event, you can check the configuration object for keyboard displayed and run your code. http://developer.android.com/guide/topics/resources/runtime-changes.html On Nov 30, 9:41 am, Juhani pleafh...@gmail.com wrote: Hi all! We're trying to trigger an animation whenever the on screen keyboard is shown or closed. There doesn't seem to be any options to register listeners directly to that event either in the EditText or in the window / app in general. Only solution I managed to find was an older post here where solution was to listen to size changed events. From this thread:http://groups.google.com/group/android-developers/browse_thread/threa... Unfortunately, that solution doesn't work in landscape mode. For some reason the onSizeChanged doesn't get called in landscape mode. As the previous thread is already very old I was hoping that maybe in 2.0 or later versions there would be an API for that. What is the best way to get notifications when the OSK is opened / closed? Thanks! Juhani -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Passing objects to new intents
On Tue, Nov 30, 2010 at 1:11 AM, Doug beafd...@gmail.com wrote: Parcelable is not such a headache once you get the boilerplate code out of the way. It's not only the repetitive CREATOR stuff. I found that if I send a custom parcelable to a Service which was to start after my main Activity had gone away, loading my object would fail (class loader not available or something ... there was a thread or two about it a while ago). This was my major motivation for ditching parcelable. Parcelable is an advantage if you need to pass arrays of such objects around. You can't attach arrays of Bundles to intents without your own mechanisms. Sure you can. Bundle extends parcelable, so you can attach an array of parcelables that are Bundles. Or, better yet, you can pass an ArrayList of Bundles with putParcelableArrayListExtra(), which takes advantage of the generics interface. - 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] Market has the All option disabled :)
The content rating is finally showing in my console and the All option is disabled... Pre-Teen is selected by default :). -- Sincerely, Brad Gies --- Bistro Bot - Bistro Blurb http://bgies.comhttp://nocrappyapps.com http://bistroblurb.com http://forcethetruth.com http://ihottonight.com --- Everything in moderation, including abstinence (paraphrased) Every person is born with a brain... Those who use it well are the successful happy ones - Brad Gies Adversity can make or break you... It's your choice... Choose wisely - Brad Gies Never doubt that a small group of thoughtful, committed people can change the world. Indeed. It is the only thing that ever has - Margaret Mead -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: What's the best way to have your app 'sleep' for N milliseconds?
Whatever the case is, you cannor prevent the user to press the Home key to display the Homescreen, right? If you don't care about the Home button, then I guess, an Activity or a dialog should be fine. On Nov 30, 8:50 pm, Emanuel Moecklin 1gravity...@gmail.com wrote: The Thread.sleep(1000) is probably not the best idea on Android because responsiveness is an issue if you care about user ratings ;-). With Thread.sleep() the app just sit's there and waits and won't respond to user input. I would recommend using something like: private static final int WAKE_UP_DELAY = 5000; private static final int WAKE_UP_CALL = 0; private Handler handler; private Runnable wakeUpCall = new Runnable() { @Override public void run() { handler.sendEmptyMessage(WAKE_UP_CALL); } }; handler = new Handler(new Handler.Callback() { @Override public boolean handleMessage(Message msg) { if (msg.what==WAKE_UP_CALL) { // change message, your code goes here... // let's start the timer again handler.postDelayed(wakeUpCall, WAKE_UP_DELAY); return true; } return false; } } ); handler.postDelayed(wakeUpCall, WAKE_UP_DELAY); // do something... The // do something part is the important difference to the Thread.sleep(). With the latter the app sleeps while with the my version the app can do whatever the app is supposed to do. And after a certain time (5 seconds in my example) you can change the message or whatever else there is to do. Emanuel Moecklin 1gravity LLC A big bang experience for our customers! On Nov 29, 2:55 pm, dipti dvai...@gmail.com wrote: You can use java's Thread.sleep(1000) . This will make the application pause for 1 sec ( 1000 millisec ) On Nov 29, 6:49 am, charlest stevegut...@gmail.com wrote: I want to display a message on the screen, have it displayed for 60 seconds, then display another message. There is nothing specific going on during the 60 seconds that I'm waiting to complete, so AsyncTask doesn't seem to apply. Does someone have a generic code snippet that does this so that I can use it in other places as needed? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Multiple clickable elements within a listview row? Good or bad idea?
Hi, I've got a pretty standard list control, it's got about 4 lines of text. Some of the text in each row might start a new activity when clicked, like: Row 1 John Doe [clickable, starts activity] 1234 Main Street [clickable, starts activity] Last Read: The Great Gatsby [clickable, starts activity] I haven't tried making multiple focusable items within a listview row for about a year now, but I think it caused issues when using the scroll wheel on the device of some sort. Is this a good pattern to use, or is there some other mechanism we can go with? Alternates are displaying a dialog when a row is clicked with buttons for each clickable element, a long-click to activate an options dialog, etc. I see that the twitter app has the multiple clickable elements per row pattern implemented, so maybe it's ok to go with? Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Why my apps can't be searched out by some phone model?
1. Have you taken care of Adding multiple screen size support? 2. Do you use Copy protection?' 3. Do you filter your apps by country? (Least possible) On Nov 28, 6:20 pm, john h john.h...@gmail.com wrote: Some Italy users reported that some of my applications can't be searched out in Android Market. It's very strange. 1. Only one of my app can be searched out, this app don't need internet permission and without AdMob. Other apps are require internet permission and with AdMob. 2. But the user can search out some other apps require internet permission and with AdMob. 3. Most of them are italian, but some italian can download all my application 4. The phone model include HTC Desire, Ericsonic X10 mini pro, HTC Wildfire Did you meet the same problem? Could anybody tell me why? Thanks, John -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Twitter Integration with Android app
I agree with Kumar, try Twitter4J. And you can check this blog post for a sample reg. OAuth authentication: http://consultingblogs.emc.com/nileeshabojjawar/archive/2010/03/18/twitter4j-oauth-generating-the-access-token.aspx On Nov 30, 11:48 pm, Kumar Bibek coomar@gmail.com wrote: Try Twiiter4J library. Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com On Tue, Nov 30, 2010 at 6:05 PM, Ajmer Singh ajmersing...@gmail.com wrote: Hi All I need to integrate the Twitter in my application,Could any body please let me know what are the best way to achieve this. I only need to Login and post a tweet in twitter from android app.Is there any sort of SDK for Twitter?. -- 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.comandroid-developers%2Bunsubs cr...@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] Passing objects to new intents
Ok...I'll look into it. Thx dude! --- John C. Bland II Blog: http://www.johncblandii.com Company: http://www.katapultmedia.com Twitter: @johncblandii On Mon, Nov 29, 2010 at 9:42 PM, TreKing treking...@gmail.com wrote: On Mon, Nov 29, 2010 at 9:29 PM, John C. Bland II johncblan...@gmail.comwrote: So you return a Bundle and receive a bundle then expand it to the properties? Yup, basically. It's like extending the Parcelable interface ... only without the headaches. - 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Making an Flash Application or Browser Based Application non exitable on Android Tablet PC
I want my application to not having the option of exiting or switching to other application Is it possible in web application. If yes how?? The Android SDK is speciifaclly designed to NOT allow such behavior. I think the only way to do that is by changing the device's firmware. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: App freezes when the power key is pressed
Ok that's weird. If you have nothing in your onStart and your onResume sets the loop as running for your drawing loop, then that is where you should have a look. My guess would be that the restarting of your looping via setRunning doesn't do what you think and that it is just not restarting at all so that you don't have any drawing going on. Or maybe you are creating objects in your onCreate method that get destroyed when your apps looses focus and that are never recreated again because onCreate is only called the very first time you launch your activity. First thing would be to Log.e(drawing,I'm drawing) in your thread drawing loop. Yahel On Nov 30, 10:50 am, Eyvind Almqvist eyv...@mobile-visuals.com wrote: After I insert the USB cable, there is three options “1. Connect your phone. 2. Install PC Companion. 3. Charge phone.” No matter which option I have selected, the app will just freeze without any message. When I press the power key to go to power save mode and then press it again to resume the application, the app will just freeze without any message. I test by doing lots of screen orientation changes, like you recommended.But I can not replicate the freezing problem on my Samsung galaxy. I don't have the SonyEricsson X10 and X8 devices to test on. I try to simulate a power key press on the emulator, by pressing the power button. I debug and onKeyDown is called, but onpause() and onResume() is not called. Doesn't onpause() and onResume() get called when the power key is pressed? I can not simulate insertion of a USB cable on the emulator. My onStart method only call the superclass, so I don't see how an exception could be raised here. My onResume method also sets the graphics thread to setRunning(false), which means that the thread will continue, but it will not execute the drawing loop. On 29 Nov, 19:16, Dianne Hackborn hack...@android.com wrote: What do you mean your app freezes? This is not a typical failure case when pressing the power button. :} On Mon, Nov 29, 2010 at 10:05 AM, Eyvind Almqvist eyv...@mobile-visuals.com wrote: My app freezes when the power key is pressed. This happens on SonyEricsson X10 and X8, but not on Samsung Galaxy S. This is what happens: 1)Launch the application-Press power key- Press power key again to active app-App freeze. The app also freezes when the USB cable is inserted, like this: 2)Launch the application- Insert USB cable-Message pops up and click any option to continue- App freeze. I am distributing apps to SonyEricsson's Playnow appstore. They have reported this as error, so I have to fix this. Does anyone have an idea how to fix this? I have already followed all the advices in Designing for Responsiveness on http://developer.android.com/guide/practices/design/responsiveness.html -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@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.- Dölj citerad text - - Visa citerad text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Do Androids dream of rule engines?
Hi, I think Androids should dream of rule engines ! I am working on global event distribution and event processing at the network's edge (e.g. a mobile phone) and I recently ported several existing middlewares to Android. One of these is Esper, a complex event processing runtime. I do not know that much about rule engines, but a colleague of mine recently evaluated the suitability of complex event processing engines and rule engines for protocol verifications. Therefore, I assume there are scenarios in which both approaches are reasonably suited. In my case, I use a complex event processing engine to deal with the multitude of events coming from an Android device's physical (gps, acceleration, etc.) as well as virtual sensors (application specific sensors). The same could be achieved with rule engines as well. This is my reason 1 why Androids should dream of rule engines. Reason 2 is based on my efforts for porting Jadex Active Components to Android. Using Jadex one may modularize applications into self- contained agents, processes, etc. A very nice paradigm. Until now, I only managed to port the so called Jadex MicroAgents as well as BPMN-based Agents, but Jadex also supports the development of intelligent BDI Agents (BDI = Belief, Desire, Intention), which are able to reason about the world and what they should do therein. Such a reasoning process is in most agent systems based on a rule engine (in case of Jadex it is Jadex Rules), which sorts out what plan an agent should follow to reach its goals. Unfortunately, this has not been ported yet. Therefore, no BDI agents on Android, which is really a pitty, as agent-oriented software engineering offers a multitude of nice concepts for building distributed applications ... and mobile devices are right on the way to play an active role in distributed systems. To cut a long story short: it's time that more heavy-weight components (like rule engines) are finally supported by mobile platforms, because this allows developers to benefit from established desktop concepts even in the mobile world. Cheers, Dirk ps: sorry for being verbose On 30 Nov., 15:40, Pavel Vlasov pvlasov...@gmail.com wrote: Hi Bob. Thank you for your feedback! The reason why I didn't put why rule engines are needed on Android in the post and on the site (except a little bit on the history page) is because I'm primarily Java SE/J2EE guy and no expert in Android. This is why the post is a question. It is for Android experts to decide whether it is needed and how it can be used. If the community shares these thought with me, I'll gladly publish them in the Event Bus online documentation, given posters permission. My reasons to believe that there is a need are listed below: - About two years ago Sun Java ME guys from JCP approached me and said that Hammurapi Rules (the predecessor of Event Bus) is the only rules engine which runs on Java ME and that there is a great need in rule engines on mobile devices. They wanted to come up with Java spec for rule engines on mobile devices. (Then Oracle acquired Sun and it didn't go anywhere.) This was the primary factor to build Event Bus in a way that it runs on both Java SE and Android. - I think that there are a lot of events flying around in a mobile device. A mobile device communicates with the external worlds and these communications aren't fast. This is why parallel predicate evaluation and parallel handler execution was introduced. - I also thought about leveraging it in UI as you described, but again - I do not possess the expert power in this area - I know how to build UI's, but I don't do it on a daily basis. So I decided that it's better not to say something than to say something wrong. Event Bus supports retractions - you can remove event from the bus and all conclusions based on this event will be invalidated. However, in the current release retraction does not activate any handlers, as it used to be in Hammurapi Rules. Thank you for pointing it out - I'll add the concept of retraction-activated handlers to the bus. Do you mind if I incorporate your feedback into the Why section on the Android page? --- Best regards, Pavel. On Nov 29, 10:07 pm, Bob Kerns r...@acm.org wrote: Hi, Pavel. I would like to see the Code of Hammurapi ... I hope it's not written in cuneiform! :=) Great name! I think it would be helpful if you were to be a bit more explicit about what makes you believe there is a need for aruleengineon Android. I've written moreruleengines than I can recall offhand, and a big fan ofruleengines in general, but I'd find it hard to characterize just why and when you need one on Android. I imagine people less familiar withruleengines would find it even more difficult, even when they're facing a problem well-solved with it. So I'd encourage you to write a bit more about why and how you see it being useful on Android. Looking over your site, it looks like you are
[android-developers] ShellCommandUnresponsiveException
Hi, I'm just starting on Android and trying to launch Hello Android, this error comes up: !ENTRY com.android.ide.eclipse.adt 4 0 2010-11-30 13:05:15.914 !MESSAGE No command output when running: 'am start -n com.example.helloandroid/com.example.helloandroid.HelloAndroid -a android.intent.action.MAIN -c android.intent.category.LAUNCHER' on device emulator-5554 !STACK 0 com.android.ddmlib.ShellCommandUnresponsiveException at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java: 408) at com.android.ddmlib.Device.executeShellCommand(Device.java:277) at com.android.ide.eclipse.adt.internal.launch.ActivityLaunchAction.doLaunchAction(Unknown Source) at com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.launchApp(Unknown Source) at com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.clientChanged(Unknown Source) at com.android.ddmlib.AndroidDebugBridge.clientChanged(AndroidDebugBridge.java: 861) at com.android.ddmlib.Device.update(Device.java:399) at com.android.ddmlib.Client.update(Client.java:834) at com.android.ddmlib.HandleAppName.handleAPNM(HandleAppName.java:90) at com.android.ddmlib.HandleAppName.handleChunk(HandleAppName.java: 64) at com.android.ddmlib.MonitorThread.callHandler(MonitorThread.java: 414) at com.android.ddmlib.MonitorThread.processClientActivity(MonitorThread.java: 322) at com.android.ddmlib.MonitorThread.run(MonitorThread.java:263) with: XP SP2 Eclipse Helios JDK 1.6.0_22 Android SDK r07 ADT plugin 0.9.9 Please, I would like someone replies my post. 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] Problem with TabHost not being the root of the layout
Hello everyone I see it documented that for tab widget the layout for the tabs should have the TabHost as the root. But i have seen many applications (eg Facebook app) where tabs are below a edit text widget. I am not sure how to achieve that. If i do something like below, i just see the EditText widget and the tabs disappear. Any help is appreciated. ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=fill_parent EditText xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=wrap_content android:text=wassup /EditText TabHost xmlns:android=http://schemas.android.com/apk/res/android; android:id=@android:id/tabhost android:layout_width=fill_parent android:layout_height=100sp LinearLayout android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent android:padding=5dp TabWidget android:id=@android:id/tabs android:layout_width=fill_parent android:layout_height=wrap_content / FrameLayout android:id=@android:id/tabcontent android:layout_width=fill_parent android:layout_height=fill_parent android:padding=5dp / /LinearLayout /TabHost /LinearLayout Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Camera application
On Fri, Nov 26, 2010 at 2:25 AM, kunwar handa kunwar.ha...@gmail.comwrote: Here are all the classes i made along with manifest I think you'll find that most people do not have the time or patience to parse through foreign, unformatted code. Someone please help me out.. If you want help, please narrow the scope of your problem down, better explain what you're trying to do and what's not working, and post s SHORT snippet of code related to what you're doing. - 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] Change Relative layout background dynamically Issues
Hi everyone. I have a relative layout that I want to change the background according to a set of features. For some reason when I try to change the background image I get a null pointer exception. Currently in the onStart method I call a function the handles valedating then determins what background image should show. The code for the image change I have is below: RelativeLayout background = (RelativeLayout)findViewById(R.id.currentWeatherBackground); background.setBackgroundResource(R.drawable.blue_background); blue_background is in my resource folder and I can use it just fine if I type it into the XML. Could anyone please shed some light on what I am doing wrong? Thank you for your time and help, Tommy -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: BackupManagerService
On Thu, Nov 25, 2010 at 10:15 PM, Mahendra Liya liyamahend...@gmail.comwrote: I am trying to implement a functionality in one of my application which allows the user to change the screen brightness. I implemented it by using the Settings.System class (putInt / getInt methods). http://tinyurl.com/3486vs3 However, I don't find any changes in my screen's brightness. I have given appropriate permissions to my app (WRITE_SETTINGS), but the log details shows the following warning: WARN/BackupManagerService : data changed but no participant. The log shows a lot of stuff. I highly doubt a backup manager warning has anything to do with your brightness not working. Also do kindly let me know as to would I be able to see the brightness changes on the emulator? Seems like something emulatable. Any help related to this as well as the BackupManagerService class would be a great help. I love how you just threw that in there at the end. http://developer.android.com/reference/android/app/backup/BackupManager.html - 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] Question about services
I've been reading Mark Murphy's books about Android programming and I am having trouble understanding some things about services. As I understand it there are local and remote services that I can create. However, what I don't understand are the use cases for when you would use one over the other. Here's basically what I need to do and I'm not sure about which service type to use. I want to create an application and a homescreen widget that both get data from a service. I had in mind a service where the application and the widget could register a callback with the service to get data updates. Is that best done by a remote or a local service, or does it matter? Can either one be used? Any hints or tips would be great. Oh, if it matters the app, widget, and service will be in a single apk. Thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] hardware update wizard doesn't start when I plug in the phone with the USB cable
On Thu, Nov 25, 2010 at 2:37 PM, David Karr davidmichaelk...@gmail.comwrote: How do I install the Android USB driver if the Hardware Update Wizard doesn't start? When you have something connected via USB, it shows up in the notification area of the task bar. Click that to bring up a Safely Remove Hardware window. In there should list your Android device. Select that and Properties to open a new window and select the Driver tab. Select Update Driver - 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] Handling Camera
On Fri, Nov 26, 2010 at 1:24 AM, Android rajuma...@gmail.com wrote: am using the following code to get the preview for my camera , but my app getting force closed, dont know y, can anyone help me on this. A stack trace would help. - 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] SVG support in Android
On Fri, Nov 26, 2010 at 8:33 AM, sysrix jean.poutc...@gmail.com wrote: Does Android support SVG ? Well that was easy http://tinyurl.com/364wygl :-) - 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] Question about services
I think a local service would work fine. Basically create another class in your android project, extend Service, do your stuff, then send a broadcast from your service. In your activity you will want to register a broadcast receiver that listens for that broadcast from the service. In the onReceive event of the Broadcast Receiver execute whatever code you need to once the service responds. You can set the service up to send different broadcasts for different actions. -Original Message- From: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] On Behalf Of Isaac Wagner Sent: Tuesday, November 30, 2010 1:01 PM To: android-developers@googlegroups.com Subject: [android-developers] Question about services I've been reading Mark Murphy's books about Android programming and I am having trouble understanding some things about services. As I understand it there are local and remote services that I can create. However, what I don't understand are the use cases for when you would use one over the other. Here's basically what I need to do and I'm not sure about which service type to use. I want to create an application and a homescreen widget that both get data from a service. I had in mind a service where the application and the widget could register a callback with the service to get data updates. Is that best done by a remote or a local service, or does it matter? Can either one be used? Any hints or tips would be great. Oh, if it matters the app, widget, and service will be in a single apk. Thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Change Relative layout background dynamically Issues
Post your logcat output and the part of your layout xml file where you declare the RelativeLayout. I would guess that you either didn't assign an android:id to the relative layout, or using the wrong id with findViewById. Because of this, the value of background is null. -- Kostya 30.11.2010 20:57, Tommy пишет: Hi everyone. I have a relative layout that I want to change the background according to a set of features. For some reason when I try to change the background image I get a null pointer exception. Currently in the onStart method I call a function the handles valedating then determins what background image should show. The code for the image change I have is below: RelativeLayout background = (RelativeLayout)findViewById(R.id.currentWeatherBackground); background.setBackgroundResource(R.drawable.blue_background); blue_background is in my resource folder and I can use it just fine if I type it into the XML. Could anyone please shed some light on what I am doing wrong? Thank you for your time and help, Tommy -- Kostya Vasilyev -- WiFi Manager + pretty widget -- 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] Where to find the source code of UI widget
Where could I find the source code of UI component of Android, such as button, spinner, progressbar, etc? Thanks! Cindy -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Where to find the source code of UI widget
On Tue, Nov 30, 2010 at 12:52 PM, cindy ypu01...@yahoo.com wrote: Where could I find the source code of UI component of Android, such as button, spinner, progressbar, etc? http://source.android.com/ - 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] Retrieve Version of another app
This is probably obvious to the rest of you, but I'm getting a bit lost. I've been using the PackageManager to check whether another app is installed. Can I use it to check the version number of that other app? Thanks for any tips. Nathan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Retrieve Version of another app
On Tue, Nov 30, 2010 at 1:01 PM, Nathan critter...@crittermap.com wrote: Can I use it to check the version number of that other app? http://developer.android.com/reference/android/content/pm/PackageInfo.html - 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