[android-developers] Re: Gps Signal Strength
Signal strength isn't really a factor except for the visibility of satellites. As Lance indicates, multipath through reflection weight down on accuracy. So do urban canyons, bodies of water as well as shadowing by trees or even just overcast skies. What you can use programatically is the measure of error/accuracy (in meters). It's somewhat accurate. The location indicator of the Maps API uses that. On May 9, 8:31 pm, Lance Nanek lna...@gmail.com wrote: Watch out using the satellite count if you end up using that. I've seen the accuracy get worse at the same time as the sat count goes up before. I was walking inside, so I guess the phone started seeing signal reflections or something. On May 5, 5:15 pm, Tommy droi...@gmail.com wrote: Is there a way to return the GPS signal Strength? Thank you for your input 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 athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Send SMS in Android
My wild guess is you are clicking on the button more than once... put the send() inside a if loop and set the boolean to false after calling send() Nithin On May 10, 10:53 am, mike hasitharand...@gmail.com wrote: hi guys, i have a application which send sms. but i found that the application always sends 2 sms messages to the selected number. couldn't figure out how is this happening. so i'll paste the code below if you have any suggestions just let me know public class Compose extends Activity { private EditText name, msg; private Button send; private Spinner spinnerTimer; private ImageButton contacts; String contactName, number; private ImageView shp; private HashMapString, Integer color; �...@override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.compose_sms); colorMap(); name = (EditText) findViewById(R.id.num); msg = (EditText) findViewById(R.id.msg); send = (Button) findViewById(R.id.snd); send.setOnClickListener(new OnClickListener() { �...@override public void onClick(View v) { // TODO Auto-generated method stub Log.d(Button, Button); send(454546, Mike); return; } }); } public void alert(String header, String body) { new AlertDialog.Builder(this).setTitle(header).setMessage(body) .setCancelable(true).setNeutralButton(Close, new DialogInterface.OnClickListener() { �...@override public void onClick(DialogInterface dialog, int which) { // TODO Auto-generated method stub } }).show(); } �...@override public boolean onKeyDown(int keyCode, KeyEvent event) { // TODO Auto-generated method stub if (keyCode == KeyEvent.KEYCODE_BACK) { finish(); Intent intent = new Intent(this, Menu.class); startActivityForResult(intent, 107); return true; } return false; } private void send(String number,String msg) { PendingIntent pi = PendingIntent.getActivity(this, 0, new Intent(this, Compose.class), 0); Log.d(SMS, SMS); SmsManager sms = SmsManager.getDefault(); sms.sendTextMessage(number, null, msg, pi, null); } } regards, Mike -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How can I catch screen orientation change in onPause()?
Maybe what you really want is to tell Android that your app will handle orientation changes on its own, rather than messing around with onPause http://developer.android.com/reference/android/app/Activity.html#ConfigurationChanges On Apr 23, 10:01 am, Thom Shutt thomshuttimper...@googlemail.com wrote: Specifically, I need a way of _not_ performing the onPause functionality I've implemented when it occurs because of a change in screen orientation. Thanks -- Thom -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to build default applications as a seperate
It will not work in many cases, because often they are not standalone apps. So either they need special rights and must be signed with the platform key, or they use JNI stuff from other parts of the framework . I think, you must use the android build system. On 8 Mai, 11:15, Karteek N kartee...@gmail.com wrote: Hi , I download the android source code. From that i want to run phone application as seperate application. I coped the phone application from packages/apps/ folder and placed in my workspace. If i am trying to import it shows the following error *Android requires .class compatibility set to 5.0. Please fix project properties.* Why it is giving the above error. where iam wrong. Please any one help me Regards, Karteek -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Creating Menu Problem
On Thu, May 6, 2010 at 9:16 PM, ChunKuen Lee jiafei...@gmail.com wrote: Any IDEA? help me~ Plz. LOL What's so funny? This may be what you're looking for... http://developer.android.com/reference/android/widget/ExpandableListView.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: deserialize byte[]
Sending serialized bytesteam over the internet is generally bad idea - it's really difficult to ensure serialised bytes compatibility on both ends (JVM version, serial vgersion UID and couple of other factors really matter.) If I were you, I would use JSON / XML data binding for this purpose On 10 Mai, 02:33, dillipk codersnet2...@gmail.com wrote: Hello, I am trying to deserialize some byte[] data which the app receives from server in android, but the data after deserialization isn't correct. Below code works absolutely fine with BlackBerry, but I wonder why it doesn't in android..!!!? AM I MISSING SOMETHING??? Any help on this is highly appreciated.. String fiename; String email; byte[] byteImageData = null; public void deserialize(byte[] array) throws IOException { System.out.println(begin DeSerializing UserAdInfo :); ByteArrayInputStream in = new ByteArrayInputStream(array); DataInputStream dIn = new DataInputStream(in); filename = dIn.readUTF(); email = dIn.readUTF(); byteImageData = new byte[dIn.available()]; dIn.read(byteImageData); } If there is some sample source to support deserialzation in android would be a great help.. Thanks in advance.. Regards, -DK -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Send SMS in Android
hi Nithin, i also guess the same thing because of that what i did was i create a very simple application. it also sends 2 sms's. this is really frustration. this the application package com.sms; import android.app.Activity; import android.os.Bundle; import android.telephony.SmsManager; import android.widget.Toast; public class sms extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); try { sendSMS(772376937, Randika); Toast.makeText(sms.this, SMS Sent, Toast.LENGTH_LONG).show(); } catch (Exception e) { // TODO Auto-generated catch block Toast.makeText(sms.this, e.getMessage(), Toast.LENGTH_LONG).show(); } } public void sendSMS(String number, String msg) throws Exception{ SmsManager smsManager = SmsManager.getDefault(); smsManager.sendTextMessage(number, null, msg, null, null); } } regards, Randika -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: ProgressDialog - how to remove the numbers
relax bibek, I will explain... since I don't know how to upload screenshots here, I'l do my best to describe. about the example - as I said, in the ApiDemos there is a progress dialog example. look it up. about the numbers - when the dialog shows, you see the orange progress bar start running, and underneath it you see 2 sets of numbers: 25% 25/100 these are running numbers as the bar progresses. I need these to be hidden (at least the 25/100). Ori On May 9, 5:37 pm, Kumar Bibek coomar@gmail.com wrote: What numbers Which numbers??? Which example ??? Thanks and Regards, Kumar Bibek On May 9, 7:14 pm, oriharel ori.ha...@gmail.com wrote: I was following the progress dialog example in the ApiDemos. all went great except for one thing - I want to remove the numbers that appear underneath the bar (those running numbers that run from 0 to .getMax(). couldn't find how to do it. anyone? Ori -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Send SMS in Android
Hi Randika I'll try to solve ur issue. Add my id in the chat. Regards Mani On Mon, May 10, 2010 at 2:56 PM, mike hasitharand...@gmail.com wrote: hi Nithin, i also guess the same thing because of that what i did was i create a very simple application. it also sends 2 sms's. this is really frustration. this the application package com.sms; import android.app.Activity; import android.os.Bundle; import android.telephony.SmsManager; import android.widget.Toast; public class sms extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); try { sendSMS(772376937, Randika); Toast.makeText(sms.this, SMS Sent, Toast.LENGTH_LONG).show(); } catch (Exception e) { // TODO Auto-generated catch block Toast.makeText(sms.this, e.getMessage(), Toast.LENGTH_LONG).show(); } } public void sendSMS(String number, String msg) throws Exception{ SmsManager smsManager = SmsManager.getDefault(); smsManager.sendTextMessage(number, null, msg, null, null); } } regards, Randika -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] How to create uses-library
Hi, In android manifest file there is a tag to include libraries called uses-library. Suppose if i have some java files in the package hierarchy called com.my.lib i used the following tag in my manifest file uses-library android:name=com.my.lib / Now it is compiled successfully. But if i want to launch to emulator it is throwing the following error [2010-05-10 10:38:18 - MyMusicPlayer] Installing MyMusicPlayer.apk... [2010-05-10 10:38:20 - MyMusicPlayer] Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY [2010-05-10 10:38:20 - MyMusicPlayer] Please check logcat output for more details. [2010-05-10 10:38:20 - MyMusicPlayer] Launch canceled! And application is not running on emulator. Any help please -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Send SMS in Android
hi Nithin, i also guess the same thing because of that what i did was i create a very simple application. it also sends 2 sms's. this is really frustration. this the application package com.sms; import android.app.Activity; import android.os.Bundle; import android.telephony.SmsManager; import android.widget.Toast; public class sms extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); try { sendSMS(772376937, Randika); Toast.makeText(sms.this, SMS Sent, Toast.LENGTH_LONG).show(); } catch (Exception e) { // TODO Auto-generated catch block Toast.makeText(sms.this, e.getMessage(), Toast.LENGTH_LONG).show(); } } public void sendSMS(String number, String msg) throws Exception{ SmsManager smsManager = SmsManager.getDefault(); smsManager.sendTextMessage(number, null, msg, null, null); } } regards, Randika -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to set and get thread priority from Java and native layers
I have a multithreaded streaming app which has mainly the following 5 threads 1 Main App(UI) Thread 1 controller thread (in native) 1 audio decoder thread (in native) 1 video decoder thread(in native) 1 thread to query the head position of audio (in Java) Apart from this I have video rendering with OpenGL. My problem is, if I query the thread priority using the Thread.getPriority method (my native threads make callbacks to Java and I am making the query at that point of time), I am getting the priority of each of them as 5. For my audio query thread (the last one in the list) I am explicitly setting the priority using Process.setThreadPriority(Process.THREAD_PRIORITY_URGENT_AUDIO); Also for my decoder threads, I am giving higher priority than my controller thread(using pthread APIs in native). But still finally all of them seem to have same priority. Can anyone please tell me what is wrong here. Also what should I be doing to increase the priority of my threads(both from Java and native). Thanks KK -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How does NotificationService work?
I Know there is a system service out there handling toast, notification. But how does it handle these events. In android.widget.Toast.java, I only found INotificationService(which is defined by an aidl file) that handles it, I couldn't no found any class in android system implemented the interface, help!!! -- 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] How does NotificationService work?
I Know there is a system service out there handling toast, notification. But how does it handle these events. In android.widget.Toast.java, I only found INotificationManager(which is defined by an aidl file) that handles it, I couldn't no found any class in android system implemented the interface, help!!! -- 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: Listening for Bluetooth events and AVRCP profile
You get AVRCP keys with the MEDIA_BUTTON Intent. But I don't know of support for track information. I'm afraid you need to do that low level, if it's possible at all (that is, without having to flash a patched ROM or at least having root access and using NDK...). On 10 Mai, 01:13, Moto medicalsou...@gmail.com wrote: Any info :) On May 3, 1:10 pm, Moto medicalsou...@gmail.com wrote: Before I invest my time developing the AVRCP profile... Can I actually achieve this without hacking the Android platform using the given Bluetooth APIs? Thanks! On May 2, 11:32 pm, Moto medicalsou...@gmail.com wrote: I need to find out the following information or guidance to achieve a solution: 1. I want to be able to capture bluetooth state changes, particularly when it's paired and when it's not. I do see I can possibly catch the intent android.bluetooth.a2dp.intent.action.SINK_STATE_CHANGED but how reliable is this throughout devices since I can't find it on the APIs? 2. I want to be able to send now playing information to the paired device. I assume this is done via the AVRCP profile. Does Android support this profile? I could not find it in the APIs but did find some info that is supported by android on this site.http://sites.google.com/a/android.com/opensource/projects/bluetooth-faq Thanks for all the help in advance! -Moto -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] read the inbox messages
Hi everyone Can we read the android SMS messages programmatically in android. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: how to build the gallery application.
He wrote, that he already downloaded everything. So he has already what he needs ..the different Android.mk files and he could also run mm SHOWCOMMANDS=1 in the Android build environment to see what happens during the build of this part. Good luck ! Frank On 7 Mai, 14:14, Mark Murphy mmur...@commonsware.com wrote: SaiKiranVeluri wrote: Thanks for the quick response Murphy, any idea like what build in applications this gallery application is expecting to compile itself?, I will say it again: The Gallery application most likely cannot be built using the SDK. Most of the built-in applications need to be built as part of the firmware. This means what...is expecting to compile itself is: everything. You are welcome to attempt to make a port of the Gallery application that builds using just the SDK. You will need to find all unresolved imports, look at the code from the firmware that is missing, and determine if that is something you need to clone into your own project or if it is something you can just comment out (perhaps disabling some features). -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Online Training: 10-14 May 2010:http://onlc.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 athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: I've found a way to stop piracy of my apps
It took several days (almost a week) for crackers to decompile Screebl Pro and find a way to circumvent AAL. Typically it takes about 90 secs from the time that we publish to the market for the various warez sites to start tweeting the location of the download. I was wondering, after the first crack-run they obviously will have devised a crack-method, which means that every other app using AAL will be cracked within 90 seconds till a new version is released... A week of cracking will only be the case during the first attempt... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 in sending in SMS
Hi all I am new in android, i need to send the sms in android, i have tryed with the following code, and i have tested in emulator, but i am getting error. i need to know how to send sms, and also please tell me below code will work or not import android.app.Activity; import android.app.AlertDialog; import android.app.PendingIntent; import android.content.Intent; import android.os.Bundle; import android.telephony.gsm.SmsManager; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; public class email extends Activity { /** Called when the activity is first created. */ public EditText name_text; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.email); final EditText to_text = (EditText) findViewById(R.id.to_text); to_text.setOnClickListener(new OnClickListener() { public void onClick(View v) { to_text.setText(); } }); final EditText message_label = (EditText) findViewById(R.id.message_text); message_label.setOnClickListener(new OnClickListener() { public void onClick(View v) { message_label.setText(); } }); Button send_button = (Button) findViewById(R.id.send_button); send_button.setOnClickListener(new OnClickListener() { public void onClick(View arg0) { String tvstring = to_text.getText().toString(); String bodystring = message_label.getText().toString(); tvstring = tvstring.trim(); if (tvstring.equalsIgnoreCase(Enter The Email-ID) || tvstring.equalsIgnoreCase()) { AlertDialog.Builder builder = new AlertDialog.Builder(email.this); builder.setMessage(Please Enter Your Email-ID or Mobile Number).setPositiveButton( OK, null).show(); } else if (bodystring.equalsIgnoreCase(Enter The Your Message)|| bodystring.equalsIgnoreCase()) { AlertDialog.Builder builder = new AlertDialog.Builder(email.this); builder.setMessage(Please Enter Your Message).setPositiveButton( OK, null).show(); }else { sendSMS(tvstring, bodystring); } } }); } private void sendSMS(String phoneNumber, String message) { PendingIntent pi = PendingIntent.getActivity(this, 0, new Intent(this, email.class), 0); SmsManager sms = SmsManager.getDefault(); sms.sendTextMessage(phoneNumber, null, message, pi, null); } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: glTexImage2D very slow on phones like Nexus one
Hi Robert, Even I have a similar issue. The glTexSubImage2D API was taking long time and sometime it was blocking ( in loadTexture() function ). So we are creating a pixmap and then creatin a EGL Image of using eglCreateImageKHR API and then calling glEGLImageTargetTexture2DOES API . I've also replaced the glTexImage2D API with this image creation and creating texture from the image. Though I'm able to see home screen, I see flickering effects when i move from one window to other. and this also repeats in some application like lunar lander. Please let me know if creating EGLImage and creating texture everytime the loadTexture function is causing these flickering effects. Also if i induce a sleep for some 30ms before flipping, flickering reduces. Please help regarding this issue. Thanks, Manjunath On Apr 18, 2:18 pm, Robert Green rbgrn@gmail.com wrote: Eong, All Mario and I are trying to say is that the thing you are trying to do (upload textures every frame) is generally not considered a good practice and workarounds usually exist that are more efficient, especially if you can target higher levels of opengl or use extensions like framebufferobjects. If you would be willing to tell us something a little bit more specific about what you're doing that requires a texture update every frame, we could potentially offer some more efficient ways of doing it. On Apr 18, 2:44 am, Eong eong.c...@gmail.com wrote: Thanks, Mario. I think it's somewrong with the driver or the chip. It's not just a bandwidth problem. If it's really a bandwidth problem, it only has 1/7 bandwidth of milestone? (150ms compare to 20ms with a full screen tex).That's very funny. I'm working on some libs, which will be used for our tools and games. When a full screen update only takes 20+ms, it's usable in some conditions as it already gets at least 40fps. On 4月17日, 下午6时22分, Mario Zechner badlogicga...@gmail.com wrote: It seems that the msm chips are notorious for having a low bandwidth. There's really no solution to that problem other than 1) lowering your texture size 2) lowering the bit depth of the texture, e.g. instead of using RGBA use RGBA444 or RGB565 2) uploading your texture in patches, e.g. split it up into 4 smaller parts and upload one part each frame. This will probably lead to artifactsif your frame rate is low but could work otherwise. Just out of curiousity: why do you have to upload such a big texture each frame? If you'd state your scenario in detail we might be able to suggest other solutions to the problem. On 17 Apr., 12:10, Eong eong.c...@gmail.com wrote: Robert, Sorry, it's not text, it's tex. I just use this to draw the background. I just want to know why nexus one is so slow with this. It takes 20ms on my milestone but it takes at least 80ms on the nexus one, for one frame. On 4月17日, 上午2时08分, Robert Green rbgrn@gmail.com wrote: Eong, You said you are uploading every frame just to draw text? There are much more efficient ways to do that. On Apr 16, 11:14 am, Eong eong.c...@gmail.com wrote: I'm afraid it's not a same problem. My problem only happenes on Snapdragon phones. It's fine on Milestone or Droid. I found a few threads about this but no solution. On 4月16日, 下午9时15分, Felipe Silveira webfel...@gmail.com wrote: Just a guess: It can be the same error reported here:http://code.google.com/p/android/issues/detail?id=7520 Take a look... Felipe Silveirahttp://www.felipesilveira.com.br On Fri, Apr 16, 2010 at 8:40 AM, Eong eong.c...@gmail.com wrote: Hi, We are developing 2D games. And we found our game works fine except the snapdragon chips, like Nexus one and Liquid A1. It even runs fine on G1. We use GLSurfaceView, and we useglTexImage2Dand glTexIsubmage2D to put on the text and then draw. TheglTexImage2Dclass take more than 100ms on Nexus one (1024x512 pix tex). It's very strange, G1 is even faster than this. If anyone know something about this? -Code snip--- gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); gl.glTexSubImage2D(GL10.GL_TEXTURE_2D, 0, 0, 0, m_width, m_height, GL10.GL_RGB, GL_UNSIGNED_SHORT_5_6_5, m_byteCanvas); ((GL11Ext)gl).glDrawTexiOES(0, 0, 0, m_width, m_height); -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group,
[android-developers] Re: ProgressDialog - how to remove the numbers
I got an answer that there is no answer. so I just subclassed, reflected and changed. On May 10, 10:04 am, oriharel ori.ha...@gmail.com wrote: relax bibek, I will explain... since I don't know how to upload screenshots here, I'l do my best to describe. about the example - as I said, in the ApiDemos there is a progress dialog example. look it up. about the numbers - when the dialog shows, you see the orange progress bar start running, and underneath it you see 2 sets of numbers: 25% 25/100 these are running numbers as the bar progresses. I need these to be hidden (at least the 25/100). Ori On May 9, 5:37 pm, Kumar Bibek coomar@gmail.com wrote: What numbers Which numbers??? Which example ??? Thanks and Regards, Kumar Bibek On May 9, 7:14 pm, oriharel ori.ha...@gmail.com wrote: I was following the progress dialog example in the ApiDemos. all went great except for one thing - I want to remove the numbers that appear underneath the bar (those running numbers that run from 0 to .getMax(). couldn't find how to do it. anyone? Ori -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Misleading incorrect runtime exception when missing resource
This took me several hours to figure out so I thought its worth reporting... Manifest: uses-sdk android:minSdkVersion=3 android:targetSdkVersion=4 / supports-screens android:smallScreens=true android:normalScreens=true android:largeScreens=true android:anyDensity=true / Resource strategy: res/drawable res/drawable-hdpi-v4 No problems when testing on a Nexus One, but on the HTC Hero got this exception: Uncaught handler: thread main exiting due to uncaught exception ...skipping... Caused by: java.lang.reflect.InvocationTargetException at android.widget.ImageButton.init(ImageButton.java:47) at java.lang.reflect.Constructor.constructNative(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:446) at android.view.LayoutInflater.createView(LayoutInflater.java:499) ... 25 more Caused by: android.content.res.Resources$NotFoundException: File res/ drawable/title_bar_shadow.9.png from drawable resource ID #0x7f020008 at android.content.res.Resources.loadDrawable(Resources.java:1641) at android.content.res.TypedArray.getDrawable(TypedArray.java:548) at android.widget.ImageView.init(ImageView.java:113) at android.widget.ImageButton.init(ImageButton.java:51) ... 29 more Caused by: java.io.FileNotFoundException: res/drawable/ title_bar_shadow.9.png at android.content.res.AssetManager.openNonAssetNative(Native Method) at android.content.res.AssetManager.openNonAsset(AssetManager.java: 392) at android.content.res.Resources.loadDrawable(Resources.java:1634) ... 32 more But its nothing to do with title_bar_shadow.9.png. I guessed there was something corrupted somewhere and even went to the extent of doing a factory rest on my Hero! The problem turned out to be my own myicon.png which was present in res/drawable-hdpi-v4 but not in res/drawable. I'd forgotten to put in a smaller version in res/drawable. I could have fixed this problem in seconds if the exception message was something like: Caused by: android.content.res.Resources$NotFoundException: File res/ drawable/myicon.png from drawable resource ID #0x7f020008 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 in sending in SMS
On 10 Mag, 10:20, rajesh chandrasekaran crajeshdanger...@gmail.com wrote: Hi all I am new in android, i need to send the sms in android, i have tryed with the following code, and i have tested in emulator, but i am getting error. What kind of error are you getting? Did you remember to add the permissions to the 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
[android-developers] Max number of bluetooth devices that can be paired?
Hi All is there any max limit that we can pair with bluetooth devices? How to check this limit.? when i tried to pair with more than 15 devices, it becomes slow and later it doesnt pair. Regards Gururaja B O -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] popupCharacters selection
Hi, I am wondering if popup for key could select automatically popped up character when implementing custom Keyboard with popupCharacters property for key. I have keyboard layout that has only one popup character for some keys and I would like to select it automatically when I hold long press on normal key. That would significantly speed up text input. For example, I would like following scenario - I press key u, hold it, then popup shows only one character ū that is automatically selected, I release key u, and character ū is automatically entered in text field. Currently I must do following - I press key u, hold it, popup shows only one character ū (not selected), I must release my finger from touch screen, then press this ū character, release finger, and only then it is entered to text field. Thanks. -- Martins Mozeiko -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: ProgressDialog Problem with Rotation
Well, first of all you need to understand what happens on change of orientation. 1. The activity is killed. 2. The activity is re-started. So, obviously, your progress dialog is no where when the activity is restarted. Try to preserve the state of your activity while changing orientation and on re-start initialize the dialog. This is not very easy, you might have to try for yourself. Thanks and Regards, Kumar Bibek On May 10, 9:37 am, Aaron aobrien...@gmail.com wrote: I have a managed ProgressDialog that show the status as tasks are moving along. The Activity.show is kicked off by an AsyncTask progressUpdates and the final Activity.closeDialog is called through the AsyncTask as well. Everything works beautifully as long as the screen is not rotated... What am I doing wrong? I thought having the Activity manage my dialog would solve this for me... Here is the code I'm playing with: public class Enter extends Activity { ProgressDialog progressDialog; private final static int PROGRESS_DIALOG_ID = 1; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button button = (Button)findViewById(R.id.progressbar_button); button.setOnClickListener(new View.OnClickListener(){ @SuppressWarnings(unchecked) public void onClick(View v) { Enter.this.showDialog(PROGRESS_DIALOG_ID); new AsyncTask(){ @Override protected Object doInBackground(Object... params) { progressDialog.setMax(30); for (int a = 0; a 30; a++){ publishProgress(new Integer((a+1))); try { Thread.sleep(1000); Log.d(Enter, Click: + a); } catch (InterruptedException e) { e.printStackTrace(); } } return null; } @Override protected void onProgressUpdate(Object... values) { super.onProgressUpdate(values); Integer progress = (Integer)values[0]; progressDialog.setProgress(progress.intValue()); } @Override protected void onPostExecute(Object result) { super.onPostExecute(result); Enter.this.dismissDialog(PROGRESS_DIALOG_ID); } }.execute((Object[]) null); } }); } @Override protected Dialog onCreateDialog(int id) { Dialog dialog = null; if (id == PROGRESS_DIALOG_ID){ progressDialog = new ProgressDialog(this); progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); progressDialog.setTitle(Pleae Wait); progressDialog.setMessage(Running a long process...); progressDialog.setCancelable(true); dialog = progressDialog; } return dialog; } Thanks! -Aaron -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: store contacts in phone from a txt file.
Simple, read the contacts from the file, and add them to the contacts app on your phone. Please, if you need specific answers, ask questions which can be answered that way. Thanks and Regards, Kumar Bibek On May 10, 9:03 am, pramod.deore deore.pramo...@gmail.com wrote: I have one txt file which contains contacts in vcf format, Now I want to update my address book (insert that contacts in my address book) using this txt file. How to do that? 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 athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: draw a 2d marker on a openGL scene
I searched for that, but i did't find anything... Could you link it, please? On 4 Mag, 17:48, Robert Green rbgrn@gmail.com wrote: Paolo, If you want to do it the canvas-style, Just flip the projection to orthographic and draw a 2D quad. I have posted the code for that more than once on here so if you do a search you'll probably find it somewhere. On May 4, 5:02 am, Paolo brand...@gmail.com wrote: Hi robert, thanks for your answer. It could be a possible way, but i i think is too much for my objective. In my case the camera is static, instead it is the grid that moves around me. I have only to put some static object over the grid. I say object, but is more correct say small picture. Consider that I'm developing an Augmented Reality App. I hoped that was possible to do that, using canvas on the opengl grid, but maybe is impossible. On 3 Mag, 21:10, Robert Green rbgrn@gmail.com wrote: If you want the 2D objects to have depth, you'll want to use billboarded quads. You may want to look around to find a better implementation but here's a tutorial -http://www.lighthouse3d.com/opengl/billboarding/ On May 3, 8:47 am, Paolo brand...@gmail.com wrote: Hi guys! I've a problem and I'm not able to solve at the moment. I have realized a grid with openGL on a GLSurfaceview. This grid rotates at 360° on all the aces using the orientation sensors. Now I'd like to put over it some markers at specified coordinates, such as 2D objects, as if they were attached to the grid, because they have to rotate together to the grid. How how I can make it? Thanks. Paolo -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Update an AbsouleLayout through code.
Is there any link between the Subject and the description? Thanks and Regards, Kumar Bibek On May 9, 10:27 pm, Lordsaibat lordsai...@gmail.com wrote: My application sends a text message, it receives a reply through a broadcast receiver that fires off a Notification. Here is my problem. My display needs to update when I receive the sms back but the only way it does update is if I click on the notification or reload the app. How can I get the display to update without reloading the app. The main thing I am trying to update is an ImageButton if that helps. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to create uses-library
Can post the LogCat Output.. -Vinay On May 10, 12:21 pm, Karteek N kartee...@gmail.com wrote: Hi, In android manifest file there is a tag to include libraries called uses-library. Suppose if i have some java files in the package hierarchy called com.my.lib i used the following tag in my manifest file uses-library android:name=com.my.lib / Now it is compiled successfully. But if i want to launch to emulator it is throwing the following error [2010-05-10 10:38:18 - MyMusicPlayer] Installing MyMusicPlayer.apk... [2010-05-10 10:38:20 - MyMusicPlayer] Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY [2010-05-10 10:38:20 - MyMusicPlayer] Please check logcat output for more details. [2010-05-10 10:38:20 - MyMusicPlayer] Launch canceled! And application is not running on emulator. Any help please -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Add another Virtual Keyboard do simulate Control keys.
Hi Mani, take a look at the code of android-x86 that implaments a way to use MENU, BACK and HOME buttons in a device with just touchscreen. The name of the file that implements this is Touchable.java. http://www.android-x86.org/documents/touch-only-device-howto The inconvenient is that you need to do this modification in the Androidplataform, but as you will use Android to a specific device, if think it is not a big deal. Regards, Rogerio 2010/5/7 Mani Android manis.dr...@gmail.com Hi Rogerio I'm also looking for the same solution. Did u find out? If you found the soultion, please guide me. Thanks Regards Manikandan.D 2010/1/13 Rogério de Souza Moraes rogerio.so...@gmail.com Hi folks, I am working with an hardware that have just five buttons. But I have just one button available to the following functions: home, back, search, soft-back(menu). The hardware is for automotive use, so that is because he doesn't have the common buttons of a cell phone. So I am thinking about create a second virtual keyboard that is called by this available button, to show these buttons that are missing on hardware. I want to know if it is possible to do. If it is, what type of code should I follow to create this extra virtual keyboard? I think a good start is to look at the code of the current virtual keyboard. Any suggest will be appreciated. Thanks, Rogerio -- You received this message because you are subscribed to the Google Groups Android Developers group. 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.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] How to handle the key events for HOME, MENU, BACK?
manis.droid wrote: Dear all How to handle the key events for HOME, MENU, BACK after making these keys as a soft keys? Requirement: The Device doesn't going to have any hard keys. So we want to bring these keys as a soft key and handle these keys events. If any one having the solution, please guide me to do it. This should be handled at the firmware level. SDK applications should neither know nor care how these buttons are implemented. Your engineers working on the device firmware have access to the [android-porting] Google Group to learn more about how to make this work, or they can follow the work of the android-x86 project: http://www.android-x86.org/documents/touch-only-device-howto -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android 2.x Programming Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to create uses-library
Karteek N wrote: In android manifest file there is a tag to include libraries called uses-library. This is for SDK add-ons, like the Google Maps add-on. Suppose if i have some java files in the package hierarchy called com.my.lib i used the following tag in my manifest file uses-library android:name=com.my.lib / Now it is compiled successfully. But if i want to launch to emulator it is throwing the following error [2010-05-10 10:38:18 - MyMusicPlayer] Installing MyMusicPlayer.apk... [2010-05-10 10:38:20 - MyMusicPlayer] Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY [2010-05-10 10:38:20 - MyMusicPlayer] Please check logcat output for more details. [2010-05-10 10:38:20 - MyMusicPlayer] Launch canceled! And application is not running on emulator. Any help please Don't use uses-library. Put the JAR in your libs/ directory (and, in the case of Eclipse users, add it to your build path). -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android 2.x Programming Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Question about contact management (register and lookUpKey)
Hello I'm a newbie with manipulation of Contact API I would create an application that saved a references to chosen contacts and create nex contacts. So I first think of contact id but i have read that it was a bad idea and the lookupkey was here for that ! So I try to play with lookupKey and i'm facing some little problems... First : I choose a contact to saved, I did it by getting it's lookUpKey : no problem. I try to access later to contact with it's lookUpKey : no problem. I go to contact native application, I change the first name of the choosen contact. I go in my application an try to access to choosen contact with saved lookUpKey : problem, the contact lookUpKey has changed because I change the first name... Is there a way to have a unique access to a contact ? Or I was imagine to register to modification done on my contact ? How could I solve my problem ? Second : I created a contact with this code : ContentValues values = new ContentValues(); Uri rawContactUri = cr.insert(ContactsContract.RawContacts.CONTENT_URI, values); long rawContactId = ContentUris.parseId(rawContactUri); this.cur = this.cr.query(rawContactUri, new String[] { ContactsContract.RawContacts.CONTACT_ID }, null, null, null); String id = null; if (this.cur.moveToFirst()) { id = cur.getString(cur.getColumnIndex(ContactsContract.RawContacts.CONTACT_ID)); this.cur = this.cr.query(ContactsContract.Contacts.CONTENT_URI, null, ContactsContract.Contacts._ID + = ?, new String[] { id }, null); if (this.cur.moveToFirst()) { Log.i(ContactAPI5, LookUpCreate : + cur.getString(cur.getColumnIndex(ContactsContract.Contacts.LOOKUP_KEY))); } else { Log.i(ContactAPI5, no contact created); } } And for these code, the result of lookUpKey is always an empty string. Why do I have an empty string ? Best regards -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: WYSIWYG Tool for Android
Please do not use droiddraw. From my experience and what others have said about the site it is completely useless. I don't think it has been updated since pre 1.0 of the SDK. If it has been recently updated then please disregard this comment :) On May 8, 11:42 am, polyclefsoftware dja...@gmail.com wrote: There's this: http://www.droiddraw.org/ On May 8, 11:15 am, flumby jay.mojni...@gmail.com wrote: Is there any iPhone's Interface Builder style tool for WYSIWYG for Android? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How do I fix an FC on Nexus.
What is the name of the application? As Robert send, let us know how to reproduce the problem and a friendly dev will post the logcat output for you. On May 9, 4:47 pm, TreKing treking...@gmail.com wrote: On Thu, May 6, 2010 at 5:21 PM, cellurl gpscru...@gmail.com wrote: What should I do? Add analytics and bug reporting to your app or find some friendly users to send you detailed bug reports. - TreKing - Chicago transit tracking app for Android-powered deviceshttp://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Intents problem
On 8 May 2010 10:08, Mark Murphy mmur...@commonsware.com wrote: Esdras Beleza wrote: I don't know if I understood your advice, but I tried some things like that. I tried to put new data into the intent (like a used flag) and updating the intent with setIntent(updatedIntent). I also tried to create an useless new intent and replace the application intent with setIntent(newIntent). But every time that I go back to application the very first intent is handled again with its original data and then the dialog is shown. I tried to put some state into my code too, but how could my application know the difference between an intent that was sent for the first time and an intent that is being sent again? It's my main problem. Check out this thread from a bit over a week ago: http://groups.google.com/group/android-developers/browse_thread/thread/d8ea68116c17002a/af9b99df2dd7e03e Hi, I tried to use the flags that were in that thread and they don't work. I'll try to explain my problem again, more clearly: 1) I have a widget with 3 buttons that starts my activity, sending 3 different types of intents to the activity. Each one makes my application start showing a dialog A, B or C. 2) I have a onResume() function that handles which intent was sent and shows the right dialog. 3) If my activity is not running, onResume() is called after onCreate() and the dialog A, B or C is shown. 4) If my activity is already running, onNewIntent() gets the new received intent, onResume() is called and the dialog A, B or C is shown. 5) Here comes the problem: if I go to other application (browser, for example) and go back to my application, the intent seems to be received again, onResume() is called and the dialog A, B or C is shown. But they must be shown *only* when the widget is clicked. Any suggestion? I'm so tired of this problem that I can't think about any new solution. Thanks again, Esdras -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.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] Common code reuse
As Mark said, resources are going to be an issue. For code though there's a simple way which would allow you to edit the shared code on the fly. Create a standard Android project and manually remove Android nature from its .project file (it you do this from inside Eclipse it'll all get automatically updated). With this change you'll be able to treat it as a library and reference its code from other Android projects. Cheers, Max On 7 May 2010 12:16, Mark Murphy mmur...@commonsware.com wrote: Ajay wrote: Hi, I have a set of common code (including .java files and resources) , which I have to use for two similar applications with different package names (for different vendors). How can I maintain two packages which share the common code without making two copies of the common source? You can compile the source code into a JAR and have the other projects incorporate that JAR file. However, resources are then a problem -- you can't use R.layout, R.id, R.string, or similar ways to identify those resources. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _Beginning Android 2_ from Apress Now Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Max number of bluetooth devices that can be paired?
Hi you can pair max 7 device for proper functionality. -- Regards Sandeep On Mon, May 10, 2010 at 3:10 PM, guru guru.nav...@gmail.com wrote: Hi All is there any max limit that we can pair with bluetooth devices? How to check this limit.? when i tried to pair with more than 15 devices, it becomes slow and later it doesnt pair. Regards Gururaja B O -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Need Assistance !!!
On Sun, May 9, 2010 at 11:53 PM, Sattanaathan Ravi sattanaat...@gmail.comwrote: Architecture and other guidances(how to get things done) What does Architecture mean? How to get WHAT things done? Everything? Do you want someone to come on here and post you a how-to-make-an-app guide from start to finish? Do you really think that's going to happen? and any tips that relates to the app will be of a great help.., Tip: Read the documentation, get a good book, and get started on your own. Then, as you get stuck on SPECIFIC problems you need help with come back and post here. Sorry, but realistically no one is going to drop what they're doing to walk you through making an app, which is what it sounds like you're asking for. - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Intents problem
Esdras Beleza wrote: 5) Here comes the problem: if I go to other application (browser, for example) and go back to my application, the intent seems to be received again, onResume() is called and the dialog A, B or C is shown. But they must be shown *only* when the widget is clicked. Any suggestion? I'm so tired of this problem that I can't think about any new solution. I am assuming there is more to the application than the three dialogs, by virtue of: if I go to other application (browser, for example) and go back to my application. This means, apparently, that you are trying to use the same activity for at least four different things: -- dialog A -- dialog B -- dialog C -- whatever other functionality you go back to Move your dialog A/B/C handling into an activity that finish()-es itself when done, so that it is not in the user's BACK button history. If need be, do that after calling startActivity() for the activity that does the rest of your app. That way, your dialog-displaying activities cannot be navigated to except by your widget. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Development Wiki: http://wiki.andmob.org -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Media control style buttons
On Mon, May 10, 2010 at 12:38 AM, flumby jay.mojni...@gmail.com wrote: The user experience is very much like the play controls button on Media controls. Any suggestion/sample code on how to implement it? Isn't that part of the open source code? If so, seems like the best place to look. - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: ProgressDialog - how to remove the numbers
On Mon, May 10, 2010 at 4:05 AM, oriharel ori.ha...@gmail.com wrote: I got an answer that there is no answer. Sure there is - find wherever the sample is placing those numbers and take that part out. - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] WCF complex types with android
Hi to all! I made the connection between my service WCF and my app android. But i'm wondering if u have ideas about using complex types (classes created on the server side). should i implement the serialization process? or should i juts create the classes on my client side(android) Plz can u help me -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] MMS URI Structure
Inspired by a post by CJ a few months ago, and because I ran into the same problem, I did a little (OK, a LOT) of poring through endless screens of code, and finally made some headway on how MMS messages are stored. Although the documentation blatantly omits this (read: unsupported, may change in the future, don't rely on it, danger Will Robinson) the list of supported URIs for accessing the parts of MMSes is pasted below directly from the MMSprovider.java file. Each of these is preceded by content://mms/, and the # sign means that you put in a number (ID) to select a specific record. I hope others will find this to be the breakthrough that I found it to be! Example: To find a certain MMS record whose ID is 326 in the Inbox, use the URI content://mms/inbox/326 To return all addresses related to message ID 326, use content://mms/ 326/addr sURLMatcher.addURI(mms, null, MMS_ALL); sURLMatcher.addURI(mms, #, MMS_ALL_ID); sURLMatcher.addURI(mms, inbox, MMS_INBOX); sURLMatcher.addURI(mms, inbox/#,MMS_INBOX_ID); sURLMatcher.addURI(mms, sent, MMS_SENT); sURLMatcher.addURI(mms, sent/#, MMS_SENT_ID); sURLMatcher.addURI(mms, drafts, MMS_DRAFTS); sURLMatcher.addURI(mms, drafts/#, MMS_DRAFTS_ID); sURLMatcher.addURI(mms, outbox, MMS_OUTBOX); sURLMatcher.addURI(mms, outbox/#, MMS_OUTBOX_ID); sURLMatcher.addURI(mms, part, MMS_ALL_PART); sURLMatcher.addURI(mms, #/part, MMS_MSG_PART); sURLMatcher.addURI(mms, part/#, MMS_PART_ID); sURLMatcher.addURI(mms, #/addr, MMS_MSG_ADDR); sURLMatcher.addURI(mms, rate, MMS_SENDING_RATE); sURLMatcher.addURI(mms, report-status/#, MMS_REPORT_STATUS); sURLMatcher.addURI(mms, report-request/#, MMS_REPORT_REQUEST); sURLMatcher.addURI(mms, drm,MMS_DRM_STORAGE); sURLMatcher.addURI(mms, drm/#, MMS_DRM_STORAGE_ID); -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Wired crash with ActivityUnitTestCase and dimens.xml
Hi @all, I wrote a test case with ActivityUnitTestCase which was working fine. Now I added a dimensions file (dimens.xml) and using the values with a style.xml. Here some parts from the dimens.xml: resources eat-comment/ dimen name=my_height15dp/dimen resources Here the attrs.xml: resources declare-styleable name=Theme attr name=theHeight format=dimension / /declare-styleable /resources And here the style.xml: resources style name=myStyle item name=android:layout_height@dimen/my_height/item item name=android:paddingLeft?theHeight/item /style /resources The style.xml is in the android manifest. On the G1 and the emulator the code works fine. In the test case I'm getting a crash. 05-10 15:03:48.658: INFO/TestRunner(748): java.lang.UnsupportedOperationException: Can't convert to dimension: type=0x2 From the call stack I can see that this line causes the crash: protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.setContentView(R.layout.my_layout); } Any idea? T-Droid -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] WCF complex types with android
If you can return JSON then you should be ok THanks Sincerely Jose C Gomez http://www.josecgomez.com On Mon, May 10, 2010 at 9:38 AM, Lamia Hannoun lamia.hann...@gmail.comwrote: Hi to all! I made the connection between my service WCF and my app android. But i'm wondering if u have ideas about using complex types (classes created on the server side). should i implement the serialization process? or should i juts create the classes on my client side(android) Plz can u help me -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.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: Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required!
Al Could you give an example of how to use StringBuilder to replace what I am doing? Thanks, Abhi On May 6, 3:37 pm, Al alcapw...@googlemail.com wrote: This isn't an error, it's just a message to inform you it is better to specify the size of thebufferyou need in the constructor. Abhi wrote: String line = , oldtext = ; while((line = reader.readLine()) != null) { oldtext += line + \r\n; } Don't do that, use a StringBuilder and StringBuilder#append() instead. String concatenation like the way you are doing it slows things down and creates more objects. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: [Help] how to draw multiple lines in Edittext?
What exactly is your problem here . getting line count 18 when u filled textbox with 18 lines? On Sat, May 8, 2010 at 12:53 AM, Vincent Tsao caojunvinc...@gmail.comwrote: @Soical Hub: thanks for your help, your suggestion inspired me a lot i finally find this way to get padding: *getCompoundPaddingTop()*, and it works fine now what' more, i find another tricky way to meet my requirement: *Step 1: fill in the EditText with 18 'empty' line rows* StringBuilder sb = new StringBuilder(); for (int i = 0; i 18; i++) { sb.append(\n); } * this.setText(sb.toString());* *Step 2: draw those 18 lines * * * @Override protected void onDraw(Canvas canvas) { canvas.drawColor(paperColor); * int count = getLineCount(); // that's the tricky part, now count will return 18* Rect r = mRect; for (int i = 0; i count; i++) { int baseline = getLineBounds(i, r); // Draw ruled lines canvas.drawLine(r.left, baseline + 1, r.right, baseline + 1, linePaint); canvas.save(); } super.onDraw(canvas); canvas.restore();** * *} but i don't like this tricky way personally :) -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: ProgressDialog Problem with Rotation
Evan Charlton wrote a great article that might help you. http://evancharlton.com/thoughts/rotating-async-tasks/ -Mike dg On May 10, 12:37 am, Aaron aobrien...@gmail.com wrote: I have a managed ProgressDialog that show the status as tasks are moving along. The Activity.show is kicked off by an AsyncTask progressUpdates and the final Activity.closeDialog is called through the AsyncTask as well. Everything works beautifully as long as the screen is not rotated... What am I doing wrong? I thought having the Activity manage my dialog would solve this for me... Here is the code I'm playing with: public class Enter extends Activity { ProgressDialog progressDialog; private final static int PROGRESS_DIALOG_ID = 1; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button button = (Button)findViewById(R.id.progressbar_button); button.setOnClickListener(new View.OnClickListener(){ @SuppressWarnings(unchecked) public void onClick(View v) { Enter.this.showDialog(PROGRESS_DIALOG_ID); new AsyncTask(){ @Override protected Object doInBackground(Object... params) { progressDialog.setMax(30); for (int a = 0; a 30; a++){ publishProgress(new Integer((a+1))); try { Thread.sleep(1000); Log.d(Enter, Click: + a); } catch (InterruptedException e) { e.printStackTrace(); } } return null; } @Override protected void onProgressUpdate(Object... values) { super.onProgressUpdate(values); Integer progress = (Integer)values[0]; progressDialog.setProgress(progress.intValue()); } @Override protected void onPostExecute(Object result) { super.onPostExecute(result); Enter.this.dismissDialog(PROGRESS_DIALOG_ID); } }.execute((Object[]) null); } }); } @Override protected Dialog onCreateDialog(int id) { Dialog dialog = null; if (id == PROGRESS_DIALOG_ID){ progressDialog = new ProgressDialog(this); progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); progressDialog.setTitle(Pleae Wait); progressDialog.setMessage(Running a long process...); progressDialog.setCancelable(true); dialog = progressDialog; } return dialog; } Thanks! -Aaron -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Problem in sending in SMS
Another option is to use the built-in ACTION_SEND or its variants, so that you are using the facilities that are already available. This is and especially useful approach for a beginner. Look for ACTION_SEND in this document: http://developer.android.com/reference/android/content/Intent.html and you can piece together how to use it. As an example, this bit of code lets the user choose whether to send the information as SMS or as an email. --- private void sendData(String value) { // We're going to send the data in two forms, as message text and as an // attachment FileOutputStream fos; if (value == null || !(mSendText.isChecked() || mSendFile.isChecked())) { Toast.makeText(this, R.string.msg_nothing_to_send, Toast.LENGTH_LONG).show(); return; } try { fos = this.openFileOutput(data.csv, Context.MODE_WORLD_READABLE); fos.write(value.getBytes()); fos.close(); Uri fileUri = Uri.fromFile(getFileStreamPath(data.csv)); // Log.d(TAG, File Uri: + fileUri.toString()); Intent i = new Intent(Intent.ACTION_SEND); i.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); if (mSendText.isChecked()) i.putExtra(Intent.EXTRA_TEXT, value); if (mSendFile.isChecked()) i.putExtra(Intent.EXTRA_STREAM, fileUri); i.putExtra(Intent.EXTRA_TITLE, bpdata.csv); i.putExtra(Intent.EXTRA_SUBJECT, bpdata.csv); i.setType(text/plain); Intent ai = Intent.createChooser(i, getString(R.string.msg_choose_send_method)); ai.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(ai); } catch (FileNotFoundException e) { Log.e(TAG, getString(R.string.title_error)); Toast.makeText(this, getString(R.string.title_error), Toast.LENGTH_LONG).show(); e.printStackTrace(); } catch (IOException e) { Log.e(TAG, getString(R.string.title_error)); Toast.makeText(this, getString(R.string.title_error), Toast.LENGTH_LONG).show(); e.printStackTrace(); } } --- On May 10, 2:20 am, rajesh chandrasekaran crajeshdanger...@gmail.com wrote: Hi all I am new in android, i need to send the sms in android, i have tryed with the following code, and i have tested in emulator, but i am getting error. i need to know how to send sms, and also please tell me below code will work or not import android.app.Activity; import android.app.AlertDialog; import android.app.PendingIntent; import android.content.Intent; import android.os.Bundle; import android.telephony.gsm.SmsManager; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; public class email extends Activity { /** Called when the activity is first created. */ public EditText name_text; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.email); final EditText to_text = (EditText) findViewById(R.id.to_text); to_text.setOnClickListener(new OnClickListener() { public void onClick(View v) { to_text.setText(); } }); final EditText message_label = (EditText) findViewById(R.id.message_text); message_label.setOnClickListener(new OnClickListener() { public void onClick(View v) { message_label.setText(); } }); Button send_button = (Button) findViewById(R.id.send_button); send_button.setOnClickListener(new OnClickListener() { public void onClick(View arg0) { String tvstring = to_text.getText().toString(); String bodystring = message_label.getText().toString(); tvstring = tvstring.trim(); if (tvstring.equalsIgnoreCase(Enter The Email-ID) || tvstring.equalsIgnoreCase()) { AlertDialog.Builder builder = new AlertDialog.Builder(email.this); builder.setMessage(Please Enter Your Email-ID or
[android-developers] Communication between Activities in Tabs
My application contains several Tabs. Each tab is it's own activity. They are created by using for example Intent intent = new Intent().setClass(this, SearchActivity.class); There I pass only the class of the activity. My question: how do I get the instance? (I want to invoke a method, which hides some buttons in another tab, therefore I need the instance of the activity). What is the best way to achieve this? Thanks in advance for your help. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Eclipse: running junit tests
I checked it again, unfortunately this is not the problem. The package matches the package of the application: instrumentation android:targetPackage=at.test.android.myapplication android:name=android.test.InstrumentationTestRunner / at.test.android.myapplication is the package, in which the source of the application is. On May 10, 12:12 am, Fred Grott(Android Expert, http://mobilebytes.wordpress.com) fred.gr...@gmail.com wrote: recheck your test manifest do you have the right package listed in the manifest? On May 9, 2:51 pm, Patrick patrick.manges...@gmail.com wrote: Hallo! I implemented a junit3 test in an Android Test Project (which was created by the wizard) testing classes of my real project. Running the unittest I get the following error: [2010-05-09 21:30:05 - AndroidConsumerApplicationTest] Performing android.test.InstrumentationTestRunner JUnit launch [2010-05-09 21:30:05 - AndroidConsumerApplicationTest] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'AVD1.6' [2010-05-09 21:30:05 - AndroidConsumerApplicationTest] Uploading MyApplicationTest.apk onto device 'emulator-5554' [2010-05-09 21:30:06 - AndroidConsumerApplicationTest] Installing MyApplicationTest.apk... [2010-05-09 21:30:08 - AndroidConsumerApplicationTest] Success! [2010-05-09 21:30:08 - AndroidConsumerApplicationTest] Project dependency found, installing: MyApplication [2010-05-09 21:30:10 - AndroidConsumerApplication] Application already deployed. No need to reinstall. [2010-05-09 21:30:10 - AndroidConsumerApplicationTest] Launching instrumentation android.test.InstrumentationTestRunner on device emulator-5554 [2010-05-09 21:30:14 - MyApplicationTest] Test run failed: Unable to find instrumentation target package: at.test.android.myapplication Do you have an idea, what could cause this problem? 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 athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Is Google working on the Bluetooth bug? Any estimated date of completion?
The same problem seems to be detailed here: http://forum.samdroid.net/threads/598 Looks like SPP is completely broken on the i5700 - possibly because of the Broadcom BCM4325. On the positive side, that chip has a FM module :-) On May 3, 6:56 pm, frankentux cfarrell1...@googlemail.com wrote: http://stackoverflow.com/questions/2661932http://pastebin.org/199621 could also be interesting On May 2, 2:32 am, DonFrench dcfre...@gmail.com wrote: Nexus One. No experience with spica. On May 1, 6:35 am, frankentux cfarrell1...@googlemail.com wrote: My device is a i5700 Samsung spica. The stackoverflow links and the logcats i pasted to pastebin.com (again, see my last post above) all relate to the issue on the spica. Do you have a similar issue with a spica? On 1 Mai, 00:13, dan raaka danra...@gmail.com wrote: is the device being referred here Spica (i5700)? -Dan On Fri, Apr 30, 2010 at 12:10 PM, DonFrench dcfre...@gmail.com wrote: I am not sure if it is the same issue but it sounds related. My app was eventually able to connect to the device I was having trouble with but only after I manually unpaired it. I never deliberately paired it in the first place and I was never asked for a pin during the time it was failing to connect. The device had apparently been automatically paired by Android when it was first detected, as are other nearby laptops and phones and PDAs. After unpairing it, I did not re-pair through the Android utility but ran my app again and attempted to connect to it, at which time I was prompted to enter the pin and to pair. This request to pair did not come directly from my code but resulted from a call to BluetoothSocket.connect( ). At this point it successfully connected and continues to connect. So it seems like the automatic pairing does something that prevents later connection. I wonder if once it is automatically paired without a pin, future attempts to connect recognize that it has been paired but doesn't recognize that no pin was ever requested and so fails for lack of a valid pin. Just a guess. On Apr 29, 9:21 am, frankentux cfarrell1...@googlemail.com wrote: Is this related to: http://stackoverflow.com/questions/2661932/problem-with-bluetooth-on-... http://pastebin.org/191806http://pastebin.org/191824http://pastebin.o... It sounds like the same issue... On Apr 29, 2:09 am, DonFrench dcfre...@gmail.com wrote: (sorry, premature Send of previous message) As I was saying, the two devices have the same name but different MAC addresses. Whether this was related to the problem I am not sure. But simply unpairing the device that would not connect solved the problem. It re-paired the next time my code tried to connect and from then on I could connect to either device without doing any more unpairing. On Apr 28, 5:03 pm, DonFrench dcfre...@gmail.com wrote: Update to this problem: I discovered that the device that could not be connected to had been paired at some time in the past. Both devices have the same name but different MAC On Apr 24, 4:30 pm, DonFrench dcfre...@gmail.com wrote: There is an apparentbugin theBluetoothservice discovery code, as has been mentioned by several people on several forums. The upshot is that the BluetoothSocket.connect( ) method consistently fails to discover a valid SPP service on some devices that are discoverable with non-Android devices while it consistently succeeds to discover the SPP service on seemingly identical devices. Obviously, the two devices are not identical but the fact is that I manufacture two such devices and there is nothing obviously different about them. I can consistently connect to both devices from a Windows Mobile app. I hope thatGooglewill address thisbugin the very near future. I will be willing to test any trialbug-fixes on my devices. Here is the relevant log output from the failed attempt: 04-24 15:23:33.268: INFO/ActivityManager(82): Starting activity: Intent { cmp=com.thegadgetworks/.DeviceListActivity } 04-24 15:23:33.308: DEBUG/DeviceListActivity(8055): doDiscovery() 04-24 15:23:33.318: ERROR/BluetoothEventLoop.cpp(82): event_filter: Received signal org.bluez.Adapter:PropertyChanged from /org/bluez/7766/ hci0 04-24 15:23:33.318: VERBOSE/BluetoothEventRedirector(4213): Received android.bluetooth.adapter.action.DISCOVERY_STARTED 04-24 15:23:36.608: ERROR/BluetoothEventLoop.cpp(82): event_filter:
[android-developers] Re: Lots of lost sales due to Credit Card authorization.
I think if this thread gets enough response and attention then someone from Google may notice. They've got to have people looking at these posts once in a while. Is there no official Bug list for Android Market? I did post a thread here : http://www.google.com/support/forum/p/Android+Market/thread?tid=6bdc164d35206f39hl=en, which claims its a Feature Request forum. Of course no responses there yet. For Android to continue to succeed they need strong support from the Development community, how do we get heard? You can't actually make Google do anything, but it wouldn't surprise me if this is the sort of thing they have already thought long and hard about, but their many lawyers and bizdev types will have to completely grok the problem before anything is done. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Need Assistance !!!
Alright thanks for your Advice TreKing -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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've found a way to stop piracy of my apps
That argument assumes that I don't respond to those cracks with improvements to AAL that will make it more difficult! :) Also, each app will need to be cracked individually, and I'm trying to work out some ways to make that a job that isn't cookie-cutter. The point here is to get this past the pain threshold where it won't be worth the trouble for an app that is only a few bucks. This is fascinating stuff, but very, very non-lucrative. I don't really want to engage in this game, but I don't see an alternative until it gets solved at the platform level. Given the lack of commercial interest (and the prodding of several smart devs), I've considered opening this up, but I'm not sure how to do that without it simply lowering the barrier for pirates. On May 10, 3:55 am, MobDev developm...@mobilaria.com wrote: It took several days (almost a week) for crackers to decompile Screebl Pro and find a way to circumvent AAL. Typically it takes about 90 secs from the time that we publish to the market for the various warez sites to start tweeting the location of the download. I was wondering, after the first crack-run they obviously will have devised a crack-method, which means that every other app using AAL will be cracked within 90 seconds till a new version is released... A week of cracking will only be the case during the first attempt... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Strange ListView divider behaviour
Next observation: When i build/run application from within Eclipse, everything behaves normal (that means all dividers are visible). However, when i create/build/run new project by means of android create, and debug and adb install tools, the app is rendered badly (some of the dividers are invisible, as can be seen in attached picture). Could it be caused by differences building tools/process? Thanks Ondra On May 5, 5:09 pm, Ondra ondrejzez...@gmail.com wrote: Hi, can anyone help me out with a problem I've run into? I have been trying to create aListViewActivity with an ImageView in every row. I've used this tutorial:http://developer.android.com/resources/samples/ApiDemos/src/com/examp... The issue is that there are always some dividers missing whenever I run the example. The dividers are disappearing/appearing and flickering as i scroll the list (tested in emulator and HTC Tattoo). Strangeis that the same example downloaded from the market (API Demos app) behaves correctly. Here is a screenshot of how it looks:http://yfrog.com/4cnokp Thanks Andy -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How can I know if OpenGl has drawn something?
glReadPixels is too slow, so I need another way. Without testing object by object, Is there any other way? Thanks you very much -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] WCF complex types with android
Thanks for ur quick answer but can u give me more information(tutorial) or some example code !!! Thx 2010/5/10 Jose Gomez j...@josecgomez.com If you can return JSON then you should be ok THanks Sincerely Jose C Gomez http://www.josecgomez.com On Mon, May 10, 2010 at 9:38 AM, Lamia Hannoun lamia.hann...@gmail.comwrote: Hi to all! I made the connection between my service WCF and my app android. But i'm wondering if u have ideas about using complex types (classes created on the server side). should i implement the serialization process? or should i juts create the classes on my client side(android) Plz can u help me -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.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.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] Namespaces and custom widgets
As a continuation of the thread in http://groups.google.com/group/android-developers/browse_thread/thread/390e8188cedd66a6, I'm still trying to figure out how a custom widget can use getIdentifier() to read attributes. As an example, I have a widget class called CustomWidget. It has attributes inner_margin and outer_margin. Normally, to read these attributes, I would do the following in source code: import com.example.customactivity.R;// I don't want to do this. ... TypedArray a = ctx.obtainStyledAttributes(attrs, R.styleable.CustomWidget); innerMargin = a.getInt(R.styleable.CustomWidget_inner_margin, 0); Because my CustomWidget is intended to be shared among a number of projects, or even get published, it's a real problem having to import R from whatever activity it's going to be linked with. What I'd rather do is: int resid = ctx.getResources().getIdentifier(inner_margin, int, com.example.customwidget); innerMargin = a.getInt(resid, 0); but getidentifier always returns zero. Can anybody tell me the magic I need to perform to do what I want? For completeness, my CustomWidget.xml file that defines the resources looks like this: ?xml version=1.0 encoding=utf-8? resources declare-styleable name=CustomWidget attr name=outer_margin format=integer / attr name=inner_margin format=integer / /declare-styleable /resources and for even more completeness, the entire source code can be found at http://www.efalk.org/tmp/CustomWidget.tar.gz -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Set an ImageView at a particular position inside GridView
I am using the GridView along with an ImageAdapter. The functionality I want is that I select a particular image and drop it on to the GridView. I want this image to snap to a cell closest to where it has been dropped. How do I tell the GridView (or the Adapter) to set this dropped Image in the appropriate location? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: SIP Stack
i saw this in sipdroid project FAQ: Sipdroid now uses TCP for the signaling connection and keeps the corresponding port open. does anyone know how peer servers of sipdroid handle scalability when there are a million of sipdroid clients connecting with the servers using TCP? as i observed, T-mobile Intermittently changes IP of my G1 phone without any notice, which in fact tears down the TCP connection. On May 9, 10:14 pm, Nandan . bhavesh2...@gmail.com wrote: yaa android cod support *sip stack s*uch as mjsip, now pjsip is already ported in android platform. i can refer you just see sipdroid project. sipdroid.org you can use rtpsender and reciver java file of sipdroid project of media folder. bhavesh On Mon, May 10, 2010 at 3:24 AM, mike enervat...@gmail.com wrote: On 05/06/2010 01:24 AM, vaibhav wrote: Hi When I went through the document opencore_framework_capabilities.pdf I came to know that Android supports RTP streaming for 3gpp format. After doing a anaysis I found that the data from a server could be streamed to the android device and played back. i.e the RTP payloads sent from the server are parsed by the Android device and sent to the decoder for playback. 1. I want to know if it is possible that the PCM data captured from a camera and then encoded using a particular encoder could be streamed using RTP from android code i.e is RTP sender support present in the Android code ?. If not then can someone please mention what could be the possible modifications required. 2. Does Android code support SIP stack ?. I assume that know that RTP is the actual media payloads, and that SIP is the rendezvous protocol to facilitate setting up the RTP listeners via an SDP announcement? That said, it sounds like you ought to look into RTSP if what you're trying to do is just stream. SIP is very, very complicated in comparison, and has all kinds of issues surrounding NAT's that are likely to just confuse the issue if all you're trying to do is Server-Client streaming. Mike -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 -- B!-!/-\\/!=$!-! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Having a back button functioning like the emulators
Hi all I have 3 activities 1: Welcome screen 2:List of country 3:Details abt that country Now i want to from activity 3 to 2 Currently wat im doing is Intent i = new Intent(getApplicationContext(), selectcountry.class); startActivity(i); This way the onCreate methode of 2nd activity is called ... and the whole list is populated again ... But the back button of emulated function differently ... wat code should i write to make my back button behave like the emulators ... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: ProgressDialog Problem with Rotation
Thanks Mike, that was very helpful! I'll See if I can use the info to get my example working correctly, and post it for the next person... On May 10, 9:05 am, Mike dg vinb...@gmail.com wrote: Evan Charlton wrote a great article that might help you. http://evancharlton.com/thoughts/rotating-async-tasks/ -Mike dg On May 10, 12:37 am, Aaron aobrien...@gmail.com wrote: I have a managed ProgressDialog that show the status as tasks are moving along. The Activity.show is kicked off by an AsyncTask progressUpdates and the final Activity.closeDialog is called through the AsyncTask as well. Everything works beautifully as long as the screen is not rotated... What am I doing wrong? I thought having the Activity manage my dialog would solve this for me... Here is the code I'm playing with: public class Enter extends Activity { ProgressDialog progressDialog; private final static int PROGRESS_DIALOG_ID = 1; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button button = (Button)findViewById(R.id.progressbar_button); button.setOnClickListener(new View.OnClickListener(){ @SuppressWarnings(unchecked) public void onClick(View v) { Enter.this.showDialog(PROGRESS_DIALOG_ID); new AsyncTask(){ @Override protected Object doInBackground(Object... params) { progressDialog.setMax(30); for (int a = 0; a 30; a++){ publishProgress(new Integer((a+1))); try { Thread.sleep(1000); Log.d(Enter, Click: + a); } catch (InterruptedException e) { e.printStackTrace(); } } return null; } @Override protected void onProgressUpdate(Object... values) { super.onProgressUpdate(values); Integer progress = (Integer)values[0]; progressDialog.setProgress(progress.intValue()); } @Override protected void onPostExecute(Object result) { super.onPostExecute(result); Enter.this.dismissDialog(PROGRESS_DIALOG_ID); } }.execute((Object[]) null); } }); } @Override protected Dialog onCreateDialog(int id) { Dialog dialog = null; if (id == PROGRESS_DIALOG_ID){ progressDialog = new ProgressDialog(this); progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); progressDialog.setTitle(Pleae Wait); progressDialog.setMessage(Running a long process...); progressDialog.setCancelable(true); dialog = progressDialog; } return dialog; } Thanks! -Aaron -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe
[android-developers] Go back to previous activity
I want to go back to previous activity What code should i write for back button plz dont suggest Intent i = new Intent(Constants.CountryContext, selectcountry.class); startActivity(i); This creates the whole activity again ... which i dont want .. i want somthing like emulators back button .. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Go back to previous activity
On Mon, May 10, 2010 at 11:24 AM, pawan nimje pawanni...@gmail.com wrote: I want to go back to previous activity What code should i write for back button How about finish() ? plz dont suggest Intent i = new Intent(Constants.CountryContext, selectcountry.class); startActivity(i); I have no idea what ContryContext or selectcountry.class are. Why in the world would anyone suggest that? - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: SIP Stack
On 05/10/2010 09:04 AM, HeHe wrote: i saw this in sipdroid project FAQ: Sipdroid now uses TCP for the signaling connection and keeps the corresponding port open. does anyone know how peer servers of sipdroid handle scalability when there are a million of sipdroid clients connecting with the servers using TCP? as i observed, T-mobile Intermittently changes IP of my G1 phone without any notice, which in fact tears down the TCP connection. Remember that SIP doesn't actually transport the media, that's RTP which is over UDP. So losing the connection shouldn't generally be any worse than losing a http connection generally. As far as scalability, I woudn't worry about that too much. UDP based SIP suffers from a lot of problems, not the least of which is the lack of security (unless you manage to find DTLS or are running it over IPsec). And of course NAT's are tricky as I mentioned before. But I still haven't heard why RTSP wouldn't be a better choice if this is just server-client streaming. SIP is a kitchen sink of a protocol. Mike On May 9, 10:14 pm, Nandan .bhavesh2...@gmail.com wrote: yaa android cod support *sip stack s*uch as mjsip, now pjsip is already ported in android platform. i can refer you just see sipdroid project. sipdroid.org you can use rtpsender and reciver java file of sipdroid project of media folder. bhavesh On Mon, May 10, 2010 at 3:24 AM, mikeenervat...@gmail.com wrote: On 05/06/2010 01:24 AM, vaibhav wrote: Hi When I went through the document opencore_framework_capabilities.pdf I came to know that Android supports RTP streaming for 3gpp format. After doing a anaysis I found that the data from a server could be streamed to the android device and played back. i.e the RTP payloads sent from the server are parsed by the Android device and sent to the decoder for playback. 1. I want to know if it is possible that the PCM data captured from a camera and then encoded using a particular encoder could be streamed using RTP from android code i.e is RTP sender support present in the Android code ?. If not then can someone please mention what could be the possible modifications required. 2. Does Android code support SIP stack ?. I assume that know that RTP is the actual media payloads, and that SIP is the rendezvous protocol to facilitate setting up the RTP listeners via an SDP announcement? That said, it sounds like you ought to look into RTSP if what you're trying to do is just stream. SIP is very, very complicated in comparison, and has all kinds of issues surrounding NAT's that are likely to just confuse the issue if all you're trying to do is Server-Client streaming. Mike -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 -- B!-!/-\\/!=$!-! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Having a back button functioning like the emulators
On Mon, May 10, 2010 at 11:09 AM, pawan nimje pawanni...@gmail.com wrote: wat code should i write to make my back button behave like the emulators ... finish(). And please don't double post - it's really unnecessary. - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] On activity (re)usage en creation
A question that might be a bit general/basic knowledge, but for me it has a quite direct background, so i'll form it as an example: I have an activity entry showing something equivalent of a blogpost, that might have comments. You can click somewhere to open a comments activity. But in this activity there are links back to entries, creating a nice line of activities. If I call the entry activity (with an intent) on a link to show this entry, am I re-using the old activity, or am I creating an endless string of entry, comment, entry, comment activities (pretty cost- ineffective that would be). -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] On activity (re)usage en creation
On Mon, May 10, 2010 at 11:35 AM, EnnaN nhui...@gmail.com wrote: If I call the entry activity (with an intent) on a link to show this entry, am I re-using the old activity, or am I creating an endless string of entry, comment, entry, comment activities (pretty cost- ineffective that would be). You can test this pretty easily by doing what you described and backing out. If it's the former, you should have 2 back presses. If it's the latter, you should have to back out as many times as activities you started. Yes? - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Go back to previous activity
By Intent i = new Intent(Constants.CountryContext, selectcountry.class); startActivity(i); i meant Intent i = new Intent(getApplicationContext(), SomeClass.class); startActivity(i); On Mon, May 10, 2010 at 9:59 PM, TreKing treking...@gmail.com wrote: On Mon, May 10, 2010 at 11:24 AM, pawan nimje pawanni...@gmail.comwrote: I want to go back to previous activity What code should i write for back button How about finish() ? plz dont suggest Intent i = new Intent(Constants.CountryContext, selectcountry.class); startActivity(i); I have no idea what ContryContext or selectcountry.class are. Why in the world would anyone suggest that? - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] Go back to previous activity
yup ... finish() is working ... hey Treking ... is there any way to find out the contents of Activity Stack .. i.e getting the name and position of Activities ... and den bringing forward any of the activities .. plz help .. On Mon, May 10, 2010 at 9:59 PM, TreKing treking...@gmail.com wrote: On Mon, May 10, 2010 at 11:24 AM, pawan nimje pawanni...@gmail.comwrote: I want to go back to previous activity What code should i write for back button How about finish() ? plz dont suggest Intent i = new Intent(Constants.CountryContext, selectcountry.class); startActivity(i); I have no idea what ContryContext or selectcountry.class are. Why in the world would anyone suggest that? - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] Having a back button functioning like the emulators
sorry and thank u ... On Mon, May 10, 2010 at 10:03 PM, TreKing treking...@gmail.com wrote: On Mon, May 10, 2010 at 11:09 AM, pawan nimje pawanni...@gmail.comwrote: wat code should i write to make my back button behave like the emulators ... finish(). And please don't double post - it's really unnecessary. - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: Need Assistance !!!
You might consider using a webview UI in an application such as this, it's easier for beginners to learn and has a lot of power behind it. -John Coryat -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: draw a 2d marker on a openGL scene
I couldn't find it either, hrmm Anyway it's like this: gl.glMatrixMode(GL10.GL_PROJECTION); gl.glPushMatrix(); gl.glLoadIdentity(); GLU.gluOrtho2D(gl, 0, viewportWidth, viewportHeight, 0); gl.glMatrixMode(GL10.GL_MODELVIEW); // draw your quad in 2d here - coordinate system is top left = 0,0 to bottom right = width,height gl.glMatrixMode(GL10.GL_PROJECTION); gl.glPopMatrix(); gl.glMatrixMode(GL10.GL_MODELVIEW); On May 10, 5:32 am, Paolo brand...@gmail.com wrote: I searched for that, but i did't find anything... Could you link it, please? On 4 Mag, 17:48, Robert Green rbgrn@gmail.com wrote: Paolo, If you want to do it the canvas-style, Just flip the projection to orthographic and draw a 2D quad. I have posted the code for that more than once on here so if you do a search you'll probably find it somewhere. On May 4, 5:02 am, Paolo brand...@gmail.com wrote: Hi robert, thanks for your answer. It could be a possible way, but i i think is too much for my objective. In my case the camera is static, instead it is the grid that moves around me. I have only to put some static object over the grid. I say object, but is more correct say small picture. Consider that I'm developing an Augmented Reality App. I hoped that was possible to do that, using canvas on the opengl grid, but maybe is impossible. On 3 Mag, 21:10, Robert Green rbgrn@gmail.com wrote: If you want the 2D objects to have depth, you'll want to use billboarded quads. You may want to look around to find a better implementation but here's a tutorial -http://www.lighthouse3d.com/opengl/billboarding/ On May 3, 8:47 am, Paolo brand...@gmail.com wrote: Hi guys! I've a problem and I'm not able to solve at the moment. I have realized a grid with openGL on a GLSurfaceview. This grid rotates at 360° on all the aces using the orientation sensors. Now I'd like to put over it some markers at specified coordinates, such as 2D objects, as if they were attached to the grid, because they have to rotate together to the grid. How how I can make it? Thanks. Paolo -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How can I know if OpenGl has drawn something?
What are you trying to do? glReadPixels is a pipeline stall - it will slow everything down. If you want to check to see if an object has been touched, use a collision detection system, unproject the touch point into a ray and get the closest item that intersects with that ray. It's actually easier, more reliable and faster. On May 10, 10:16 am, Alfonso alfonsocris...@gmail.com wrote: glReadPixels is too slow, so I need another way. Without testing object by object, Is there any other way? Thanks you very much -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Go back to previous activity
On Mon, May 10, 2010 at 11:46 AM, pawan nimje pawanni...@gmail.com wrote: hey Treking ... is there any way to find out the contents of Activity Stack .. There should be a most recently used list somewhere - dig around the documentation (ApplicationInfo, Packagemanager, etc would be likely culprits). i.e getting the name and position of Activities ... and den bringing forward any of the activities .. You probably won't be able to directly access other activities to bring them to the front, though you could theoretically start those activities with the proper intent. All this begs the question of why you want to do this anyway? - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: SIP Stack
i was not thinking about media. i guess the reason why sipdroid+TCP+pbxes can lower battery use is to enlarge sip registration expiration, eg. to 5 minutes or longer. what if mobile service provider changes phone IP earlier than 5 min when the provider finds no traffic to/from the phone? it will not be able to receive incoming calls without re-registration. anyway, i am just guessing. do you know the usual (or by default) registration expiration between sipdroid and pbxes? On May 10, 9:32 am, mike enervat...@gmail.com wrote: On 05/10/2010 09:04 AM, HeHe wrote: i saw this in sipdroid project FAQ: Sipdroid now uses TCP for the signaling connection and keeps the corresponding port open. does anyone know how peer servers of sipdroid handle scalability when there are a million of sipdroid clients connecting with the servers using TCP? as i observed, T-mobile Intermittently changes IP of my G1 phone without any notice, which in fact tears down the TCP connection. Remember that SIP doesn't actually transport the media, that's RTP which is over UDP. So losing the connection shouldn't generally be any worse than losing a http connection generally. As far as scalability, I woudn't worry about that too much. UDP based SIP suffers from a lot of problems, not the least of which is the lack of security (unless you manage to find DTLS or are running it over IPsec). And of course NAT's are tricky as I mentioned before. But I still haven't heard why RTSP wouldn't be a better choice if this is just server-client streaming. SIP is a kitchen sink of a protocol. Mike On May 9, 10:14 pm, Nandan .bhavesh2...@gmail.com wrote: yaa android cod support *sip stack s*uch as mjsip, now pjsip is already ported in android platform. i can refer you just see sipdroid project. sipdroid.org you can use rtpsender and reciver java file of sipdroid project of media folder. bhavesh On Mon, May 10, 2010 at 3:24 AM, mikeenervat...@gmail.com wrote: On 05/06/2010 01:24 AM, vaibhav wrote: Hi When I went through the document opencore_framework_capabilities.pdf I came to know that Android supports RTP streaming for 3gpp format. After doing a anaysis I found that the data from a server could be streamed to the android device and played back. i.e the RTP payloads sent from the server are parsed by the Android device and sent to the decoder for playback. 1. I want to know if it is possible that the PCM data captured from a camera and then encoded using a particular encoder could be streamed using RTP from android code i.e is RTP sender support present in the Android code ?. If not then can someone please mention what could be the possible modifications required. 2. Does Android code support SIP stack ?. I assume that know that RTP is the actual media payloads, and that SIP is the rendezvous protocol to facilitate setting up the RTP listeners via an SDP announcement? That said, it sounds like you ought to look into RTSP if what you're trying to do is just stream. SIP is very, very complicated in comparison, and has all kinds of issues surrounding NAT's that are likely to just confuse the issue if all you're trying to do is Server-Client streaming. Mike -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 -- B!-!/-\\/!=$!-! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: SIP Stack
On 05/10/2010 10:24 AM, HeHe wrote: i was not thinking about media. i guess the reason why sipdroid+TCP+pbxes can lower battery use is to enlarge sip registration expiration, eg. to 5 minutes or longer. what if mobile service provider changes phone IP earlier than 5 min when the provider finds no traffic to/from the phone? it will not be able to receive incoming calls without re-registration. anyway, i am just guessing. do you know the usual (or by default) registration expiration between sipdroid and pbxes? Again, if this is just server-client streaming this is yet another reason to avoid SIP and look at RTSP. SIP is a rendezvous protocol, and all rendezvous protocols are complicated, with lots of things to consider. AFAIK -- it's been a long time -- SIP registrations can be very long lasting. Unless something has actually changed -- like your IP address moved -- it shouldn't be a problem. I'm not entirely convinced that this is a huge issue anyway because the cellular guys are probably moving you around at L2 for the most part (again, it's been a long time since I've paid attention to the 3gpp guys), so IP address changes are probably pretty rare. I have no idea if anybody's been deploying mobile IP which would more directly solve this issue. Mike, who used to like to make fun of Henning, Cullen and Jonathan and many others in the SIP WG because of SIP's complexity. On May 10, 9:32 am, mikeenervat...@gmail.com wrote: On 05/10/2010 09:04 AM, HeHe wrote: i saw this in sipdroid project FAQ: Sipdroid now uses TCP for the signaling connection and keeps the corresponding port open. does anyone know how peer servers of sipdroid handle scalability when there are a million of sipdroid clients connecting with the servers using TCP? as i observed, T-mobile Intermittently changes IP of my G1 phone without any notice, which in fact tears down the TCP connection. Remember that SIP doesn't actually transport the media, that's RTP which is over UDP. So losing the connection shouldn't generally be any worse than losing a http connection generally. As far as scalability, I woudn't worry about that too much. UDP based SIP suffers from a lot of problems, not the least of which is the lack of security (unless you manage to find DTLS or are running it over IPsec). And of course NAT's are tricky as I mentioned before. But I still haven't heard why RTSP wouldn't be a better choice if this is just server-client streaming. SIP is a kitchen sink of a protocol. Mike On May 9, 10:14 pm, Nandan .bhavesh2...@gmail.comwrote: yaa android cod support *sip stack s*uch as mjsip, now pjsip is already ported in android platform. i can refer you just see sipdroid project. sipdroid.org you can use rtpsender and reciver java file of sipdroid project of media folder. bhavesh On Mon, May 10, 2010 at 3:24 AM, mikeenervat...@gmail.comwrote: On 05/06/2010 01:24 AM, vaibhav wrote: Hi When I went through the document opencore_framework_capabilities.pdf I came to know that Android supports RTP streaming for 3gpp format. After doing a anaysis I found that the data from a server could be streamed to the android device and played back. i.e the RTP payloads sent from the server are parsed by the Android device and sent to the decoder for playback. 1. I want to know if it is possible that the PCM data captured from a camera and then encoded using a particular encoder could be streamed using RTP from android code i.e is RTP sender support present in the Android code ?. If not then can someone please mention what could be the possible modifications required. 2. Does Android code support SIP stack ?. I assume that know that RTP is the actual media payloads, and that SIP is the rendezvous protocol to facilitate setting up the RTP listeners via an SDP announcement? That said, it sounds like you ought to look into RTSP if what you're trying to do is just stream. SIP is very, very complicated in comparison, and has all kinds of issues surrounding NAT's that are likely to just confuse the issue if all you're trying to do is Server-Client streaming. Mike -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 -- B!-!/-\\/!=$!-! -- You received this message because you are
[android-developers] Re: On using themes?!
Hmmh, also no answer to this question on themes. Maybe the answer cannot be given with two lines? So let me explain what I would expect step by step and you stop me were I deviate from the Golden Path? I'll try yes/no questions. In the simplest terms I would expect that in every place I can specify a color in RGB (#) I could also specify a symbolic name instead. This should work like @color/xyz, but with one more level of indirection that lets me switch between themes, like dark and light. Is that possible? I would expect those themes to be applicable to (a) widgets, (b) drawables (see the mentioned example) and (c) when I need to style something myself like HTML. Are (a) - (c) possible? Furthermore I would expect that I could define style keys myself, but I got the impression that only keys from the android namespace can be used? That lead me to believe that you can't define abstract colors, but only styles for specific attributes used in the widgets' implementations. And again, if there is any meaningful documentation I would be happy to read it. Just send me the link or name of the book. On Sat, May 8, 2010 at 3:26 PM, Mariano Kamp mariano.k...@gmail.com wrote: Hi, I have trouble (examplehttp://groups.google.com/group/android-developers/browse_thread/thread/5b4ce3e49a1b63d2/) wrapping my head around styles/themes. Can somebody help me or point me to actual documentation? Let's say I have a drawable that I want to use as the background of a layout: shape xmlns:android=http://schemas.android.com/apk/res/android; android:shape=rectangle gradient android:startColor=#9F9FA4 android:endColor=#66FF android:angle=270 / /shape Now I want to have a dark and a light theme. Depending on the chosen theme I want to have a different value for startColor and endColor. How do I do that? I am aware of extending themes, but what do I put into the items? How do I reference those new values then? Cheers, Mariano -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Go back to previous activity
The resone why i want all this is ... what im wanting is since all those activities are already created ... on button click i jus want to switch [jump] to those activities ... instead of using the startActivity(intent) method ...anyways forget it and thnx for the help On Mon, May 10, 2010 at 10:47 PM, TreKing treking...@gmail.com wrote: On Mon, May 10, 2010 at 11:46 AM, pawan nimje pawanni...@gmail.comwrote: hey Treking ... is there any way to find out the contents of Activity Stack .. There should be a most recently used list somewhere - dig around the documentation (ApplicationInfo, Packagemanager, etc would be likely culprits). i.e getting the name and position of Activities ... and den bringing forward any of the activities .. You probably won't be able to directly access other activities to bring them to the front, though you could theoretically start those activities with the proper intent. All this begs the question of why you want to do this anyway? - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: On activity (re)usage en creation
You can test this pretty easily by doing what you described and backing out. If it's the former, you should have 2 back presses. If it's the latter, you should have to back out as many times as activities you started. Yes? Good point I think! That would mean that the back-button is defined as go back 1 activity, and not something more fancy with states. I couldn't find the precize definition of the back button, so i'll assume you're right and go test. In the meanwhile, is there a standard method to ensure some sort of singleton effect? I'll check back later. - TreKing - Chicago transit tracking app for Android-powered deviceshttp://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Check The Pic and comment
Hi All, Check the image attached and let me know if its possible ... 6 tabs ... 4 above and 2 below ... and if yes .. how?? PS : i have created 4 tabs [all above :) ] using extends TabActivity,tabhost etc . -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=enattachment: demo.JPG
[android-developers] Re: How can I know if OpenGl has drawn something?
I've got that collision detection system implemented, yet. And I'm agree to use glUnproject as the best achoice. My problem is that I remap the modelview matrix with the sensors and when I rotate the phone, change the coords of the screen returned by glUnproject. Even if I keep the object in the same place of the screen. Furthermore, I don't understand why it doesn't return values according to the given viewport. Because of all this I was looking for alternatives, but if you explain me what's the matter with glUnproject, I'll be really pleasent. Thanks you very much for this answer and (I hope) for the next one. On 10 mayo, 19:11, Robert Green rbgrn@gmail.com wrote: What are you trying to do? glReadPixels is a pipeline stall - it will slow everything down. If you want to check to see if an object has been touched, use a collision detection system, unproject the touch point into a ray and get the closest item that intersects with that ray. It's actually easier, more reliable and faster. On May 10, 10:16 am, Alfonso alfonsocris...@gmail.com wrote: glReadPixels is too slow, so I need another way. Without testing object by object, Is there any other way? Thanks you very much -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: SIP Stack
when i mentioned ...not be able to receive incoming calls.., i was not thinking about just server-client streaming. Mike, you knew it :) what is your mobile service provider? the sentence IP address changes are probably pretty rare looks strange to a T-Moble user like me. at least i find my G1 ip frequently changes :( On May 10, 10:47 am, mike enervat...@gmail.com wrote: On 05/10/2010 10:24 AM, HeHe wrote: i was not thinking about media. i guess the reason why sipdroid+TCP+pbxes can lower battery use is to enlarge sip registration expiration, eg. to 5 minutes or longer. what if mobile service provider changes phone IP earlier than 5 min when the provider finds no traffic to/from the phone? it will not be able to receive incoming calls without re-registration. anyway, i am just guessing. do you know the usual (or by default) registration expiration between sipdroid and pbxes? Again, if this is just server-client streaming this is yet another reason to avoid SIP and look at RTSP. SIP is a rendezvous protocol, and all rendezvous protocols are complicated, with lots of things to consider. AFAIK -- it's been a long time -- SIP registrations can be very long lasting. Unless something has actually changed -- like your IP address moved -- it shouldn't be a problem. I'm not entirely convinced that this is a huge issue anyway because the cellular guys are probably moving you around at L2 for the most part (again, it's been a long time since I've paid attention to the 3gpp guys), so IP address changes are probably pretty rare. I have no idea if anybody's been deploying mobile IP which would more directly solve this issue. Mike, who used to like to make fun of Henning, Cullen and Jonathan and many others in the SIP WG because of SIP's complexity. On May 10, 9:32 am, mikeenervat...@gmail.com wrote: On 05/10/2010 09:04 AM, HeHe wrote: i saw this in sipdroid project FAQ: Sipdroid now uses TCP for the signaling connection and keeps the corresponding port open. does anyone know how peer servers of sipdroid handle scalability when there are a million of sipdroid clients connecting with the servers using TCP? as i observed, T-mobile Intermittently changes IP of my G1 phone without any notice, which in fact tears down the TCP connection. Remember that SIP doesn't actually transport the media, that's RTP which is over UDP. So losing the connection shouldn't generally be any worse than losing a http connection generally. As far as scalability, I woudn't worry about that too much. UDP based SIP suffers from a lot of problems, not the least of which is the lack of security (unless you manage to find DTLS or are running it over IPsec). And of course NAT's are tricky as I mentioned before. But I still haven't heard why RTSP wouldn't be a better choice if this is just server-client streaming. SIP is a kitchen sink of a protocol. Mike On May 9, 10:14 pm, Nandan .bhavesh2...@gmail.com wrote: yaa android cod support *sip stack s*uch as mjsip, now pjsip is already ported in android platform. i can refer you just see sipdroid project. sipdroid.org you can use rtpsender and reciver java file of sipdroid project of media folder. bhavesh On Mon, May 10, 2010 at 3:24 AM, mikeenervat...@gmail.com wrote: On 05/06/2010 01:24 AM, vaibhav wrote: Hi When I went through the document opencore_framework_capabilities.pdf I came to know that Android supports RTP streaming for 3gpp format. After doing a anaysis I found that the data from a server could be streamed to the android device and played back. i.e the RTP payloads sent from the server are parsed by the Android device and sent to the decoder for playback. 1. I want to know if it is possible that the PCM data captured from a camera and then encoded using a particular encoder could be streamed using RTP from android code i.e is RTP sender support present in the Android code ?. If not then can someone please mention what could be the possible modifications required. 2. Does Android code support SIP stack ?. I assume that know that RTP is the actual media payloads, and that SIP is the rendezvous protocol to facilitate setting up the RTP listeners via an SDP announcement? That said, it sounds like you ought to look into RTSP if what you're trying to do is just stream. SIP is very, very complicated in comparison, and has all kinds of issues surrounding NAT's that are likely to just confuse the issue if all you're trying to do is Server-Client streaming. Mike -- You received this message because you are subscribed to the Google Groups Android Developers group. 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
[android-developers] Re: On activity (re)usage en creation
Well that was easy: Entry 1-click-Comments 1-click-Entry 2. Using back works like you'd expect (that sounds good), so that would mean i'm starting a string of activities (could be bad). Anyone care to give advice about this? Is this a big memoryproblem, or could this just work? Nanne. On May 10, 8:18 pm, EnnaN nhui...@gmail.com wrote: You can test this pretty easily by doing what you described and backing out. If it's the former, you should have 2 back presses. If it's the latter, you should have to back out as many times as activities you started. Yes? Good point I think! That would mean that the back-button is defined as go back 1 activity, and not something more fancy with states. I couldn't find the precize definition of the back button, so i'll assume you're right and go test. In the meanwhile, is there a standard method to ensure some sort of singleton effect? I'll check back later. - TreKing - Chicago transit tracking app for Android-powered deviceshttp://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: On activity (re)usage en creation
On Mon, May 10, 2010 at 1:18 PM, EnnaN nhui...@gmail.com wrote: In the meanwhile, is there a standard method to ensure some sort of singleton effect? Not sure what you mean by singleton effect, but you probably want to look at the launch mode flags when starting your activities. The singleTask flag, in particular, might be of interest to you. - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Strange ListView divider behaviour
Ok, I've probably solved the problem (but i still don't understand it). When I add uses-sdk android:minSdkVersion=3/ into app's manifest file, all problems mentioned earlier and badly rendered pixels disappear (no matter which IDE i use). Ondra -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: On activity (re)usage en creation
In the meanwhile, is there a standard method to ensure some sort of singleton effect? Not sure what you mean by singleton effect, I was referring to the singleton pattern (http://en.wikipedia.org/wiki/ Singleton_pattern), but as its not completely correct in this case i obfuscaded the term somewhat to singleton effect :) Sorry bout that. but you probably want to look at the launch mode flags when starting your activities. The singleTask flag, in particular, might be of interest to you. I'll check that so i'll atleast have the choice between the two options. Any thoughts on how bad the current behaviour is? (ow, and many thanks for the replies :) ) Nanne. - TreKing - Chicago transit tracking app for Android-powered deviceshttp://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: On activity (re)usage en creation
On Mon, May 10, 2010 at 1:34 PM, EnnaN nhui...@gmail.com wrote: Any thoughts on how bad the current behaviour is? Not sure what you mean - but if you haven't touched anything else, the current behavior is the default behavior, which should suffice for most apps. - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: ProgressDialog Problem with Rotation
The solution is very simple, for anyone who runs into this in the future... As Kumar stated when the phone is rotated the activity is destroyed and recreated - you don't have to play with Android for very long before you realize that. What I didn't know is you can override that behavior by adding this to to the activity node in the android manifest: android:configChanges=orientation there is more information about it here: http://groups.google.com/group/android-developers/browse_thread/thread/c2ff370c99317236/f955457847fc69b8#f955457847fc69b8 and http://developer.android.com/reference/android/app/Activity.html#ConfigurationChanges but basically instead of destroying the activity the method onConfigurationChanged method is called. I'm not sure what other problems this creates but this seems to be better default behavior than destroying and recreating everything -Aaron On May 10, 11:15 am, Aaron aobrien...@gmail.com wrote: Thanks Mike, that was very helpful! I'll See if I can use the info to get my example working correctly, and post it for the next person... On May 10, 9:05 am, Mike dg vinb...@gmail.com wrote: Evan Charlton wrote a great article that might help you. http://evancharlton.com/thoughts/rotating-async-tasks/ -Mike dg On May 10, 12:37 am, Aaron aobrien...@gmail.com wrote: I have a managed ProgressDialog that show the status as tasks are moving along. The Activity.show is kicked off by an AsyncTask progressUpdates and the final Activity.closeDialog is called through the AsyncTask as well. Everything works beautifully as long as the screen is not rotated... What am I doing wrong? I thought having the Activity manage my dialog would solve this for me... Here is the code I'm playing with: public class Enter extends Activity { ProgressDialog progressDialog; private final static int PROGRESS_DIALOG_ID = 1; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button button = (Button)findViewById(R.id.progressbar_button); button.setOnClickListener(new View.OnClickListener(){ @SuppressWarnings(unchecked) public void onClick(View v) { Enter.this.showDialog(PROGRESS_DIALOG_ID); new AsyncTask(){ @Override protected Object doInBackground(Object... params) { progressDialog.setMax(30); for (int a = 0; a 30; a++){ publishProgress(new Integer((a+1))); try { Thread.sleep(1000); Log.d(Enter, Click: + a); } catch (InterruptedException e) { e.printStackTrace(); } } return null; } @Override protected void onProgressUpdate(Object... values) { super.onProgressUpdate(values); Integer progress = (Integer)values[0]; progressDialog.setProgress(progress.intValue()); } @Override protected void onPostExecute(Object result) { super.onPostExecute(result); Enter.this.dismissDialog(PROGRESS_DIALOG_ID); } }.execute((Object[]) null); } }); } @Override protected Dialog onCreateDialog(int id) { Dialog dialog = null; if (id == PROGRESS_DIALOG_ID){ progressDialog = new ProgressDialog(this); progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); progressDialog.setTitle(Pleae Wait); progressDialog.setMessage(Running a long process...); progressDialog.setCancelable(true); dialog
Re: [android-developers] Re: SIP Stack
On 05/10/2010 11:24 AM, HeHe wrote: when i mentioned ...not be able to receive incoming calls.., i was not thinking about just server-client streaming. Mike, you knew it :) what is your mobile service provider? the sentence IP address changes are probably pretty rare looks strange to a T-Moble user like me. at least i find my G1 ip frequently changes :( So I haven't actually tested this, and I disclaimed because I wasn't sure :) If you're getting lots of IP address changes regardless of what's happening at the 3gpp/l2 layer, you're probably not going to not have a very good experience with streaming media of any kind because once the IP address changes, the RTP stream is going to tank regardless of SIP, RTSP, Skype, etc. That's why you'd need to deal with it more directly like using IP handoffs using Mobile IP, etc. Handoffs could be done using SIP, but it would be ugly. Which probably means that somebody has proposed it and that the working group has taken it on :) AFAIK, mobile IP is still not deployed widely, even though we were working on it the handoff probelm almost 10 years ago... Part of the reason probably is because 3GPP's latency is really awful for real time conversations so there's still too high an energy barrier to actually deal with the truly difficult problem of dealing with handoffs when TDM still works just fine. Maybe 4G will get rid of all that bizarre leftovers from the ATM/bellhead days that 3G had to live with to get standardized. In any case as far as SIP registration goes, it should be relatively easy to camp on an event for when the IP address changes and quickly reregister inside the SIP stack. It wouldn't be surprising that most of the SIP stacks already have that feature. How bad this is on battery life is obviously dependent on how often IP addresses are actually changing, but you have the exact same problem with IM so at some level it's acceptable since people do use IM... Mike On May 10, 10:47 am, mikeenervat...@gmail.com wrote: On 05/10/2010 10:24 AM, HeHe wrote: i was not thinking about media. i guess the reason why sipdroid+TCP+pbxes can lower battery use is to enlarge sip registration expiration, eg. to 5 minutes or longer. what if mobile service provider changes phone IP earlier than 5 min when the provider finds no traffic to/from the phone? it will not be able to receive incoming calls without re-registration. anyway, i am just guessing. do you know the usual (or by default) registration expiration between sipdroid and pbxes? Again, if this is just server-client streaming this is yet another reason to avoid SIP and look at RTSP. SIP is a rendezvous protocol, and all rendezvous protocols are complicated, with lots of things to consider. AFAIK -- it's been a long time -- SIP registrations can be very long lasting. Unless something has actually changed -- like your IP address moved -- it shouldn't be a problem. I'm not entirely convinced that this is a huge issue anyway because the cellular guys are probably moving you around at L2 for the most part (again, it's been a long time since I've paid attention to the 3gpp guys), so IP address changes are probably pretty rare. I have no idea if anybody's been deploying mobile IP which would more directly solve this issue. Mike, who used to like to make fun of Henning, Cullen and Jonathan and many others in the SIP WG because of SIP's complexity. On May 10, 9:32 am, mikeenervat...@gmail.comwrote: On 05/10/2010 09:04 AM, HeHe wrote: i saw this in sipdroid project FAQ: Sipdroid now uses TCP for the signaling connection and keeps the corresponding port open. does anyone know how peer servers of sipdroid handle scalability when there are a million of sipdroid clients connecting with the servers using TCP? as i observed, T-mobile Intermittently changes IP of my G1 phone without any notice, which in fact tears down the TCP connection. Remember that SIP doesn't actually transport the media, that's RTP which is over UDP. So losing the connection shouldn't generally be any worse than losing a http connection generally. As far as scalability, I woudn't worry about that too much. UDP based SIP suffers from a lot of problems, not the least of which is the lack of security (unless you manage to find DTLS or are running it over IPsec). And of course NAT's are tricky as I mentioned before. But I still haven't heard why RTSP wouldn't be a better choice if this is just server-client streaming. SIP is a kitchen sink of a protocol. Mike On May 9, 10:14 pm, Nandan .bhavesh2...@gmail.com wrote: yaa android cod support *sip stack s*uch as mjsip, now pjsip is already ported in android platform. i can refer you just see
[android-developers] Re: How can I fix this touch ev ent / draw loop “deadlock”?
Yes you should definitely put a small Yield or sleep in the drawing thread, this will allow the UI thread to process events. Also make sure to only synchronize exactly when you need to. For example, dont synchronize while checking which touch action it is, etc. Instead synchronize only right before you change the global shared value. -niko On May 9, 9:41 am, Josh josh.olek...@gmail.com wrote: Thanks for your thoughts. I've started handing off my input events using a concurrent queue, and that seems to handle the blocking issue. Now I've started testing out my saveState code, which also has a synch block, and it's having the same issue. Should I send a savestate message down the pipeline and let the thread itself handle the save? Or do the yield thing? BTW, I've checked out your blog before, nice, informative stuff! On May 8, 1:09 am, Robert Green rbgrn@gmail.com wrote: Josh, I used to have that exact same problem. There are a few things you can do. One is try having your logic thread call Thread.yield() which hopefully will let the UI thread get the synchronized block and inject the touch event. The other is to separate the locking so that you only block the UI thread when you're processing touch events, not while your thread is running (which is always and is why you're having this problem). I set up a queue for input objects and the only time the queue insertion is blocked is when my logic thread is actually processing the events, which is for only a fraction of the total update time. Check out my code here -http://www.rbgrn.net/content/342-using-input-pipelines-your-android-game Once you implement that (if you do), you should have less problems. On May 7, 1:05 pm, Josh josh.olek...@gmail.com wrote: I'm trying to use the structure laid out in LunarLander to create a simple game in which the user can drag some bitmaps around on the screen (the actual game is more complex, but that's not important). I ripped out the irrelevant parts of LanderLander, and set up my own bitmap drawing, something like In BoardThread (an inner class of BoardView): run() { while(mRun) { canvas = lockSurfaceHolder... syncronized(mSurfaceHolder) { /* drawStuff using member position fields in BoardView */ } unlockSurfaceHolder } } My drawStuff simply walks through some arrays and throws bitmaps onto the canvas. All that works fine. Then I wanted to start handling touch events so that when the user presses a bitmap, it is selected, when the user unpresses a bitmap, it is deselected, and if a bitmap is selected during a touch move event, the bitmap is dragged. I did this stuff by listening for touch events in the BoardView's parent, BoardActivity, and passing them down into the BoardView. Something like In BoardView handleTouchEvent(MotionEvent e) { synchronized(mSurfaceHolder) { /* Modify shared member fields in BoardView so BoardThread can render the bitmaps */ } } This ALSO works fine. I can drag my tiles around the screen no problem. However, every once in a while, when the app first starts up and I trigger my first touch event, the handleTouchEvent stops executing at the synchronized line (as viewed in DDMS). The drawing loop is active during this time (I can tell because a timer changes onscreen), and it usually takes several seconds or more before a bunch of touch events come through the pipeline and everything is fine again. This doesn't seem like deadlock to me, since the draw loop is constantly going in and out of its syncronized block. Shouldn't this allow the event handling thread to grab a lock on mSurfaceHolder? What's going on here? Anyone have suggestions for improving how I've structured this? Some other info. This hang only ever occurs on first touch event after activity start. This includes on orientation change after restoreState has been called. Also, I can remove EVERYTHING within the syncronized block in the event handler, and it will still get hung up at the syncronized call. 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 athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group
Re: [android-developers] Re: Scala, Android, Eclipse - not including Scala jar?
On Thu, May 6, 2010 at 7:55 PM, Bob Kerns r...@acm.org wrote: The lesson there is that if you use Proguard, and something odd goes wrong, always try disabling that first -- because the amount of time you can potentially waste is huge! Proguard works pretty well, and is pretty useful. But this, together with its learning curve and setup time, are its big drawbacks. But shrinking and optimizing apps means phones can do more... Except that proguard is a required part of the Scala + Android process right now, for Scala 2.8.0.RC1. Android won't take the standard Scala library without proguard (or something else) first stripping it down. It's not something you can bypass easily. -- James Moore ja...@restphone.com http://jamesmoorecode.blogspot.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 know if OpenGl has drawn something?
If you're doing this to set up and draw your scene: gl.glMatrixMode(GL10.GL_PROJECTION); gl.glLoadIdentity(); GLU.gluPerspective(gl, FOV, viewAspectRatio, zNear, zFar); // **get or recreate this matrix for the unproject projection gl.glMatrixMode(GL10.GL_MODELVIEW); gl.glLoadIdentity(); GLU.gluLookAt(gl, pos.x, pos.y, pos.z, lookAt.x, lookAt.y, lookAt.z, upVec.x, upVec.y, upVec.z); // **get or recreate this matrix for the unproject modelview // for each object gl.glPushMatrix(); // transform/rotate/scale to match collision data - do not use this matrix for unproject. // draw gl.glPopMatrix(); then using GLU.gluUnProject with those same matrices that I pointed out (projection and modelview) will return the correct point in world space which should be the same coordinate system as your collision data. After that you just need to use ((normalize(lookAt - pos) * farZ) + the unproject point) and you have your ray. On May 10, 1:24 pm, Alfonso alfonsocris...@gmail.com wrote: I've got that collision detection system implemented, yet. And I'm agree to use glUnproject as the best achoice. My problem is that I remap the modelview matrix with the sensors and when I rotate the phone, change the coords of the screen returned by glUnproject. Even if I keep the object in the same place of the screen. Furthermore, I don't understand why it doesn't return values according to the given viewport. Because of all this I was looking for alternatives, but if you explain me what's the matter with glUnproject, I'll be really pleasent. Thanks you very much for this answer and (I hope) for the next one. On 10 mayo, 19:11, Robert Green rbgrn@gmail.com wrote: What are you trying to do? glReadPixels is a pipeline stall - it will slow everything down. If you want to check to see if an object has been touched, use a collision detection system, unproject the touch point into a ray and get the closest item that intersects with that ray. It's actually easier, more reliable and faster. On May 10, 10:16 am, Alfonso alfonsocris...@gmail.com wrote: glReadPixels is too slow, so I need another way. Without testing object by object, Is there any other way? Thanks you very much -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Getting widget size
I'm writing a widget at the moment. It's supposed to fill one cell, so I've set the size to be 72dp by 72dp. The layout has a linear layout containing a 72x72dp ImageView. In onUpdate(), I call views.setImageViewBitmap with a 72px x 72px bitmap. This worked fine under Android 1.5 on my G1, but now I have a Nexus One, the image gets stretched to fill the cell, and looks blurry. What is the correct, device independent way, to work out how big the bitmap should be? James Ots -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] PNG quality in WebView based app
I am using WebView to display html content in an app. One of the pages has a rather large PNG image. The image is large and detailed on purpose because the idea is to use it as a map and allow users to zoom in to see the detail. Unfortunately, when the image is displayed with WebView, the quality is horrific. I am assuming that WebView is attempting to do some image optimization to reduce the size of the graphic. Is there anyway to prevent it from doing this? I don't want the image to lose any of its quality. Thanks, Jeff -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 app's popup aligned with ListView item - how did they do it?
Anyone any ideas? On May 9, 4:33 pm, westmeadboy westmead...@yahoo.co.uk wrote: In the official Twitter app, in the Tweets activity, if you click on the small down arrow (right side of each tweet entry), a really nice popup appears just above or below the entry. How did they do this (i.e. position the popup alongside the relevant item)? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: I've found a way to stop piracy of my apps
Well I will say one thing, if it was opened up, that would allow each dev to make small code changes, so it would never be cookie cutter then...however, I am not against that you are trying to make some income from it, I mean you still did have to do the work. -niko On May 10, 10:06 am, dadical keyes...@gmail.com wrote: That argument assumes that I don't respond to those cracks with improvements to AAL that will make it more difficult! :) Also, each app will need to be cracked individually, and I'm trying to work out some ways to make that a job that isn't cookie-cutter. The point here is to get this past the pain threshold where it won't be worth the trouble for an app that is only a few bucks. This is fascinating stuff, but very, very non-lucrative. I don't really want to engage in this game, but I don't see an alternative until it gets solved at the platform level. Given the lack of commercial interest (and the prodding of several smart devs), I've considered opening this up, but I'm not sure how to do that without it simply lowering the barrier for pirates. On May 10, 3:55 am, MobDev developm...@mobilaria.com wrote: It took several days (almost a week) for crackers to decompile Screebl Pro and find a way to circumvent AAL. Typically it takes about 90 secs from the time that we publish to the market for the various warez sites to start tweeting the location of the download. I was wondering, after the first crack-run they obviously will have devised a crack-method, which means that every other app using AAL will be cracked within 90 seconds till a new version is released... A week of cracking will only be the case during the first attempt... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en