[android-developers] Re: How do I know whether my device is currently charging?
Is this documented anywhere? I looked here... http://developer.android.com/reference/android/os/BatteryManager.html ... but AFAICS there's nothing about 0 meaning unplugged. What you're suggesting *is* what I'm after, but I'm unwilling to use undocumented API features since they risk disappearing without notice. Regards //Johan On 19 Sep, 22:29, Dianne Hackborn hack...@android.com wrote: What do you mean by in use? You can find out whether you are attached to a power source with the plugged field (0 means not plugged in / on battery, non-zero is the power source), which is generally what things use to determine whether the device is plugged in (so it is okay to do more power drawing operations). On Sat, Sep 19, 2009 at 12:42 PM, Walles johan.wal...@gmail.com wrote: Thanks Mark, that was the hint I needed. What I really wanted to know was whether or not the battery was currently in use, and for anybody else following this thread, here's the method I came up with: /** * Is the battery currently discharging? * * @return True if our battery is discharging. False otherwise. */ private boolean isDischarging() { // Contact the battery manager Intent batteryIntent = registerReceiver(null, new IntentFilter (Intent.ACTION_BATTERY_CHANGED)); if (batteryIntent == null) { Log.w(DrainOMeter.LOGGING_TAG, Failed to talk to the battery manager, assuming we're on battery power); return true; } // Ask about battery charging status int batteryStatus = BatteryManager.BATTERY_STATUS_UNKNOWN; if (batteryIntent != null) { batteryStatus = batteryIntent.getIntExtra(status, BatteryManager.BATTERY_STATUS_UNKNOWN); } if (batteryStatus == BatteryManager.BATTERY_STATUS_UNKNOWN) { Log.w(DrainOMeter.LOGGING_TAG, Failed to get battery charging status, assuming we're on battery power); return true; } return batteryStatus == BatteryManager.BATTERY_STATUS_DISCHARGING; } Cheers //Johan On 18 Sep, 11:54, Mark Murphy mmur...@commonsware.com wrote: Walles wrote: I want to know if my device is currently charging. How do I find that out? I've been looking a bit at the Intents API, but AFAIU I can just subscribe to events from there, and a subscription is not what I'm after. And even if I *did* want updates, I'd still need to know the initial state. I just want to ask a one-shot are we charging question. How can I do that? Register for the broadcast Intent with a null receiver. If you get a non-null return value, then that return value is an Intent from the last sticky broadcast matching your supplied IntentFilter. I believe the battery updates are such a sticky broadcast. By passing null for the receiver, you do not actually register a receiver and so do not need to unregister anything later. For more instructions on this, look up registerReceiver() in the Context class (which is a base class for Activity, Service, etc.). -- Mark Murphy (a Commons Guy)http://commonsware.com| http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.1 Available! -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How do I know whether my device is currently charging?
It will be documented in Eclair. On Sun, Sep 20, 2009 at 11:22 PM, Walles johan.wal...@gmail.com wrote: Is this documented anywhere? I looked here... http://developer.android.com/reference/android/os/BatteryManager.html ... but AFAICS there's nothing about 0 meaning unplugged. What you're suggesting *is* what I'm after, but I'm unwilling to use undocumented API features since they risk disappearing without notice. Regards //Johan On 19 Sep, 22:29, Dianne Hackborn hack...@android.com wrote: What do you mean by in use? You can find out whether you are attached to a power source with the plugged field (0 means not plugged in / on battery, non-zero is the power source), which is generally what things use to determine whether the device is plugged in (so it is okay to do more power drawing operations). On Sat, Sep 19, 2009 at 12:42 PM, Walles johan.wal...@gmail.com wrote: Thanks Mark, that was the hint I needed. What I really wanted to know was whether or not the battery was currently in use, and for anybody else following this thread, here's the method I came up with: /** * Is the battery currently discharging? * * @return True if our battery is discharging. False otherwise. */ private boolean isDischarging() { // Contact the battery manager Intent batteryIntent = registerReceiver(null, new IntentFilter (Intent.ACTION_BATTERY_CHANGED)); if (batteryIntent == null) { Log.w(DrainOMeter.LOGGING_TAG, Failed to talk to the battery manager, assuming we're on battery power); return true; } // Ask about battery charging status int batteryStatus = BatteryManager.BATTERY_STATUS_UNKNOWN; if (batteryIntent != null) { batteryStatus = batteryIntent.getIntExtra(status, BatteryManager.BATTERY_STATUS_UNKNOWN); } if (batteryStatus == BatteryManager.BATTERY_STATUS_UNKNOWN) { Log.w(DrainOMeter.LOGGING_TAG, Failed to get battery charging status, assuming we're on battery power); return true; } return batteryStatus == BatteryManager.BATTERY_STATUS_DISCHARGING; } Cheers //Johan On 18 Sep, 11:54, Mark Murphy mmur...@commonsware.com wrote: Walles wrote: I want to know if my device is currently charging. How do I find that out? I've been looking a bit at the Intents API, but AFAIU I can just subscribe to events from there, and a subscription is not what I'm after. And even if I *did* want updates, I'd still need to know the initial state. I just want to ask a one-shot are we charging question. How can I do that? Register for the broadcast Intent with a null receiver. If you get a non-null return value, then that return value is an Intent from the last sticky broadcast matching your supplied IntentFilter. I believe the battery updates are such a sticky broadcast. By passing null for the receiver, you do not actually register a receiver and so do not need to unregister anything later. For more instructions on this, look up registerReceiver() in the Context class (which is a base class for Activity, Service, etc.). -- Mark Murphy (a Commons Guy)http://commonsware.com| http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.1 Available! -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Location constructors are stubs?
Hi! I'm writing unit tests for a class containing Locations. To create a (mock) Location, I do this: Location from = new Location(Johan); However, the Location(String) constructor throws a RuntimeException saying Stub!. How can I create a mock location? Note that I'm running this on the plain JDK with android.jar in the path, after JUnit but before my own stuff. No device or emulator is involved. The android.jar file is from the platforms/android-1.5 directory of android-sdk-linux_x86-1.6_r1. Regards //Johan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: WebView.loadDataWithBaseURL bug
My work-around works for all cases except one: if the page contains this link: a href=click/a When the user clicks the link, shouldOverrideUrlLloading is not called. On Sep 18, 5:15 pm, Jason Proctor jason.android.li...@gmail.com wrote: you probably want to set the web view client before calling any variant of load(). there are some strange things associated with loadDataWithBaseURL() and base URLs, search the archives. sometimes the WebView loads the base URL instead of the provided data, i've never really got to the bottom of it. another thing you are probably running into is that shouldOverrideUrlLoading() is not called on reloading the same page. that's a nasty bug that's caused me some trouble. sounds like you can work around it by faking a parameter, but that didn't work for me in my case. hth Has anyone seen this? webView.loadDataWithBaseURL(http://www.google.com;, a href=http://www.google.comclick/a, text/html, utf-8, nul); webView.setWebViewClient(new WebViewClient() { public boolean shouldOverrideUrlLloading(WebView w, String url) { System.out.println(url); return true; } }); When user clicks the link, my shouldOverrideUrlLloading() function is not called. Instead, the WebView just goes out to fetch the real www.google.compage. For the time being, my work-around is to append ?foo=bar into the baseURL. Is there a better work around? Thanks -- jason.vp.engineering.particle- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: OnItemClickListener onItemClick in custom adapter not firing
Hi Joy, thanks for your response. I see the OnClickListeners for the button and edittext firing (the one i have registered in the adapter). I don't see the OnItemClickListener in the AdapterTest.class. Thanks again and best, lf.hl On 21 Sep., 02:17, Joy 3crownt...@gmail.com wrote: Hi, You bind onItemClick twice. Did you see any log when item is clicked? On Sun, Sep 20, 2009 at 5:09 AM, lf.hl flod...@googlemail.com wrote: Hi, in a custom ArrayAdapter i don't see onItemClick firing. I would like to pack all the logic in there so i need access to the views in each row of the adapter (2 Buttons,1 EditText). I was looking on the internet for hours to find a real howto. Q1: Is there a tutorial on the net? Q2: Do you see a bug/whats missing? Q3: How to seduce a clicked View in onItemClick? Any help is really really appreciated, lf.hl --This is the activity--- package org.rice; import android.app.Activity; import android.view.View; import android.view.View.OnClickListener; import android.widget.*; import android.os.Bundle; import java.util.*; import android.widget.AdapterView.OnItemClickListener; import android.util.*; public class AdapterTest extends Activity{ private ArrayListFuItem fItems; private ArrayAdapterFuItem aa; private ListView myListView; private void fillit(){ fItems = new ArrayListFuItem(); for(int i = 0; i 5; i++){ FuItem fi = new FuItem(String.valueOf(i), (float)i); fItems.add(fi); } } /** Called when the activity is first created. */ �...@override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); myListView = (ListView)findViewById(R.id.liste); fillit(); int resId = R.layout.row; aa = new FuItemAdapter(this, resId, fItems); myListView.setAdapter(aa); myListView.setChoiceMode(ListView.CHOICE_MODE_SINGLE); myListView.setItemsCanFocus(true); myListView.setOnItemClickListener(new OnItemClickListener() { �...@override public void onItemClick(AdapterView? arg0, View arg1, int arg2, long arg3) { // TODO Auto-generated method stub Log.i(adaptertest, onItemClick fired); } }); } } -Custom Adapter FuItemAdapter--- package org.rice; import android.view.*; import android.view.View.OnClickListener; import android.widget.*; import android.content.Context; import java.util.*; import android.util.*; import android.widget.Button; public class FuItemAdapter extends ArrayAdapterFuItem { int resource; public FuItemAdapter(Context _context, int _resource, ListFuItem _items) { super(_context, _resource, _items); resource = _resource; } �...@override public View getView(int position, View convertView, ViewGroup parent) { LinearLayout fuitemView; FuItem item = getItem(position); String productString = item.getProduct(); String priceString = String.valueOf(item.getPrice()); if(convertView == null){ fuitemView = new LinearLayout(getContext()); String inflater = Context.LAYOUT_INFLATER_SERVICE; LayoutInflater vi; vi = (LayoutInflater)getContext().getSystemService(inflater); vi.inflate(resource, fuitemView, true); } else { fuitemView = (LinearLayout) convertView; } TextView productView = (TextView)fuitemView.findViewById (R.id.product); EditText priceView = (EditText)fuitemView.findViewById(R.id.price); Button down = (Button)fuitemView.findViewById(R.id.down); Button up = (Button)fuitemView.findViewById(R.id.up); down.setOnClickListener(new OnClickListener() { �...@override public void onClick(View v) { Log.i(getClass().getSimpleName(),button onclick fired: ); } }); up.setOnClickListener(new OnClickListener() { �...@override public void onClick(View v) { Log.i(getClass().getSimpleName(),button onclick fired); } }); priceView.setOnClickListener(new OnClickListener() { �...@override
[android-developers] problem to display multi line text..
I am new to android development... How to Display multi lines in a Screen... here i m using StringTokenizeri m displaying in Textviewit displays last text only ..i think it override the text with in it can u tell anybody how to Display a whole String in a Screen.here i want to use textview or anything else...pls suggest me Thanks in advance with regards, Raghav.S This is My Code: txt=(TextView)findViewById(R.id.txt); String str=this.is.a.test.example.1; StringTokenizer st = new StringTokenizer(str,.); while (st.hasMoreTokens()) { txt.setText(st.nextToken()); } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Android 1.6 SDK is here!
is any update for stream of media issue in sdk 1.6?? thanks On 9月16日, 上午6時22分, Xavier Ducrohet x...@android.com wrote: http://android-developers.blogspot.com/2009/09/android-16-sdk-is-here... Enjoy! -- Xavier Ducrohet Android Developer Tools Engineer Google Inc. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Disable WebKit JavaScript security for XMLHttpRequest
On Sep 17, 10:23 pm, Maps.Huge.Info (Maps API Guru) cor...@gmail.com wrote: Use JSON instead. No cross domain security with that method. Sorry I don't understand - how can JSON help here? Retrieving JSON data from the remote side would still need a XMLHttpRequest. The bug I filed was rejected for security reasons - malicious apps can break the security model. Now I'm thinking of a workaround - use Java objects bound to JavaScript to act as a facade for network calls. However, I'm not sure how callbacks can work here - perhaps pass the name of a method to the Java object, which will then be called back with loadUrl? Not sure if it's reentrant. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] about webview.clearCache
hi all, I had a problem about webview.clearCache method, what's the main function about clearCache? is a essential steps for using webview? I used for it in my app when user load his webview everytime, but there are errors some times, like app had not permission to touch cache in the sqlite, so I removed clearCache finally. so what's the role for clearCache? thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Hierarchy Viewer
It is over the adb connection. You can look at the source in the open-source repository... though keep in mind that there are no guarantees the protocol it uses will remain compatible across platform versions. On Fri, Sep 18, 2009 at 1:38 PM, Marcelo Alves malves.i...@gmail.comwrote: Hi everybody, I would like to know how the Hierarchy Viewer tool does to get information from phone screen? Is it use telnet or ADB? I need to use these same information in my own tool. By Marcelo Alves -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: how to add openobex to android
I think too, but for me it is hard to compile for android by ./ configure and make with NDK. Yes you can create *.so file, but you must create makefile for it and it will not be easy, if you will succeed, please write me info. On Jul 23, 11:51 am, lm llming2...@sina.com wrote: I am a new man to build android. I want to add the openobex to android. I have test openobex on PC and it is ok. I don't know how to add it to android. I think maybe I should build the openobex to a .so file and so can let the android framework use it, do you think so? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How can I get Activity object from Intent object or something else
I have an Activity that running on system. I can get the Intent that is used to start the activity. But i don't know how to get the Activity object from the Intent object or something else. Can anyone tell me how to do this??? Note that, I don't use Instrumentation object. Thanks so much... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: switch to another applications programmatically
Thanks Diana Hackborn, I can do my work by getting the RecentRunningTask list and corresponding Intent obejct list. So I can run or switch to any application from my app. Thanks for your help!! On Sep 13, 10:42 pm, Dianne Hackborn hack...@android.com wrote: First of all, don't use am. All it does is call startActivity() from its own environment, so you have just made things 10x harder for yourself, impossible to actually integrate with your UI flow, likely to break in the future, and not gotten to do anything more than startActivity() does. Second, when you start an activity, it starts out at the top of its stack, and its window has focus. You don't need to do anything special. I don't know what you are doing to cause this behavior, but simply calling startActivity() from your own activity will work. Third, please be sure you read the application fundamentals documentation:http://developer.android.com/guide/topics/fundamentals.html On Sun, Sep 13, 2009 at 3:31 AM, HandsomeboyIT handsomebo...@gmail.comwrote: hi all, Can anybody show me how to switch to another Android application programmatically or request focus on a specific application? My situation is that, I have an Activity, and in that activity, I start other UI application by am command. When the program runs, it float to top screen, but it don't have focus. I need to focus to that application's screen programmatically for doing some automatic action. How can I do this? Thanks so much. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] clear issue on Mapview
hi all, I have a mapview, and I draw two point on the same mapview, using mapview.getoverlay().add(point1); mapview.getoverlay().add(point2); and now I want to clear point1, I just can find: mapview.getoverlay().clear() method to clear mapview, but this action will clear point1 and point2, but I just want to clear one point at the time. so how can I do for my requestion?? thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Default Styles?
Thank you for the reply. So I was looking in the right place. Well, my task was to display a title-like text in the activity. I couldn't find a suitable style for it so I used android:backgroud=@android:drawable/ title_bar, as I found in [platform/packages/apps/Contacts.git] / res / layout-finger / view_contact.xml in the Android git, plus a few hand-coded things like color and text size. If there's a better way to do it, please let me know. Thanks. On Sep 20, 7:45 am, Dianne Hackborn hack...@android.com wrote: R.style contains all of the public styles. If it isn't in there, it isn't public. On Sat, Sep 19, 2009 at 4:07 PM, Felix Oghina felix.ogh...@gmail.comwrote: Where can I find default styles for my widgets? Let me give you an example. In the Contacts application, when adding a new contact, at the very bottom there are two buttons that have a particular background. I have traced that to here: http://android.git.kernel.org/?p=platform/packages/apps/Contacts.git;... and it would seem that that background is achieved by using style=@android:style/ButtonBar on a LinearLayout. From what I understand, this is a system-wide theme default for button bars. However, what I am searching for is not a ButtonBar, but similar, so I tried searching for this ButtonBar in the documentation, hoping to find other similar styles I could use. I *thought* I would find it in R.style:http://developer.android.com/reference/android/R.style.html, but it seems I have mistaken. It is not there. Can anyone tell me where I can find such styles? -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] The format of system date is wrong in Chinese
A small application based on cupcake 1.5 import java.util.Calendar; import java.text.DateFormat; private Calendar mCalendar; private java.text.DateFormat mTitleDateFormat; . mTitleDateFormat.format(mCalendar.getTime()); If system language is Chinese, output is: 5,2009 9 10 If system language is English, output is: Thursday,10 September 2009 Why does the system output Chinese date in such strange format? My JDK version is 1.5.0_17 Thanks a lot 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] long-running loadUrl() JavaScript with a callback
Hi, I'm planning to use the JavaScript interface to Java, to connect to Java methods that go to the network (or some other long-running function) and deliver the results via callback. The flow is: 1. User clicks on a link in the WebView, which calls my Java code. 2. My Java code posts a worker Runnable to a Handler, and returns immediately. 3. The worker goes to the network, then makes a callback to the WebView.loadUrl(function('result')) to deliver the result. I made an example that sleeps inside the Runnable. The entire WebView becomes unresponsive! What is the proper way (if any) of implementing a long-running JavaScript call? Is it safe to call loadUrl() from multiple threads? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] The screen was black case, service sleep?
I wrote a service and I registered BroadcastReceiver in it. In the onReceive () method of BroadcastReceiver catagory,I just wrote Intent.ACTION_TIME_TICK.equals(intent.getAction()) to receive the systenm time every minute and deal with everything that I should do in it every minute.But i found a problem that when the mobile phone screen was locked and was completely black,my service seems to be sleep and does not work,and when I light up the screen(it is still in locked condition),the system will automatically run my service.I do not know the reason,I guess if it is because my service is not the system-level service? When the mobile screen is black,Andraid system will hibernate the sevice which is not the system-level service,so if this,I should add my service to system service,but I know how to use android.permission.ADD_SYSTEM_SERVICE? If you can,please send me a example about how to add own service to system-level service.This problem has been troubled me for two weeks.Thank you very much and hoping for reply asap. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 webview recoginze phone number
in current email, phone number can be clickable now, I want to customerize the phone number format, So, May I ask how webview recognize a phone number? Anybody knows where the code is in current android code? Thanks very much Best Regards Xu Tiefeng ___ 好玩贺卡等你发,邮箱贺卡全新上线! http://card.mail.cn.yahoo.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: The screen was black case, service sleep?
The problem (it's not a problem, really - it's designed so) is that your device goes to sleep to save battery when the user is not actively using their device. That means that the main CPU will also power down to some state and for applications the time stops. What you can do is: * Use the AlarmManager to schedule an alarm every minute (be warned - that will drain the battery really fast) * Hold a WakeLock for the CPU - this way the CPU will not shut down and you will continue to receive the TIME_TICK events (this will drain the battery even faster) If you need to do your work every minute and that for a short time (only for a few minutes), then I guess using one of these 2 methods would be acceptable. If you need to do stuff every minute for longer periods of time, I suggest you get rid of that requirement and redesign your app :) Tauno On Mon, Sep 21, 2009 at 12:04 PM, lili mw...@126.com wrote: I wrote a service and I registered BroadcastReceiver in it. In the onReceive () method of BroadcastReceiver catagory,I just wrote Intent.ACTION_TIME_TICK.equals(intent.getAction()) to receive the systenm time every minute and deal with everything that I should do in it every minute.But i found a problem that when the mobile phone screen was locked and was completely black,my service seems to be sleep and does not work,and when I light up the screen(it is still in locked condition),the system will automatically run my service.I do not know the reason,I guess if it is because my service is not the system-level service? When the mobile screen is black,Andraid system will hibernate the sevice which is not the system-level service,so if this,I should add my service to system service,but I know how to use android.permission.ADD_SYSTEM_SERVICE? If you can,please send me a example about how to add own service to system-level service.This problem has been troubled me for two weeks.Thank you very much and hoping for reply asap. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] SimpleCursorAdapter with rawQuery
In the API Demo, there is example on using SimpleCursorAdapter. However, it is using the MediaStore cursor. Is there any method so that I can use other external cursor prepare by SQL database. I don't know what should I input to the from String[]. Thank you in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How to get the InputMethodService to focus on Dialog after dispatch a KeyEvent on Spinner???
I have a Spinner and related Adapter. I use InputMethodService to click on the Spinner. A Dialog appears after click on Spinner. but after the dialog appeared, InputMethodService object can not get focus on the item list on Dialog for doing another event? Is anyone know how to send event to the Adapter's item list using InputMethodService in this case??? Thanks for our 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] about webview
in current email, phone number can be clickable now, I want to customerize the phone number format, So, May I ask how webview recognize a phone number? Anybody knows where the code is in current android code? Thanks very much --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: long-running loadUrl() JavaScript with a callback
I made an example that sleeps inside the Runnable. The entire WebView becomes unresponsive! What is the proper way (if any) of implementing a long-running JavaScript call? Everything is fine except for sleeping in the Runnable. The Runnable is run on the UI thread -- sleeping on the UI thread, like sleeping on the job, is not a good idea. If you want something that will run for a long time, use a background thread, perhaps in the form of an AsyncTask. Is it safe to call loadUrl() from multiple threads? I have not tried it, but I doubt it. If you use AsyncTask, do your loadUrl() in onPostExecute(). -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.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] WebView.loadUrl on a hidden view opens the android browser
Hi I am trying to transition between 2 web views. One is in the foreground and the other already prepares another URL in the background. Everything works fine except for the fact that calling loadURL on the 2nd (invisible) view causes the native browser to open with the specified url, rather than my builtin browser. Any clues? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Use external fonts in android
hi.. i hv tried loading ttf file of the font but it is still not loading. i am also getting error in the console while loading the app onto device.. here is the error .. Starting activity com.test.abc on device [2009-09-21 14:56:32 - test] ActivityManager: DDM dispatch reg wait timeout [2009-09-21 14:56:32 - test] ActivityManager: Can't dispatch DDM chunk 52454151: no handler defined [2009-09-21 14:56:32 - test] ActivityManager: Can't dispatch DDM chunk 48454c4f: no handler defined [2009-09-21 14:56:38 - test] ActivityManager: Starting: Intent { comp= {com.test/com.test.abc} } On Sep 15, 6:12 pm, LambergaR martin.s...@gmail.com wrote: I managed to load .ttf fonts without a problem. Maybe you should try loading a different font? On Sep 15, 2:55 pm, mudit mudit.a...@gmail.com wrote: hello.. i want to use external fonts in my app. i have tried adding new fonts using asset managers but it did not work. Typeface face; face = Typeface.createFromAsset(getAssets(), font.otf); textview.setTypeface(face); but it did not show the text... plz 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: Multiple notifications with one status bar icon
Make that trigger a different intent, not action. On Sep 21, 5:09 am, Bryan bryanw...@gmail.com wrote: Is there a way to have one status bar icon, but multiple entries in the notification pull down? I need to generate a few notifications that each trigger a different action when clicked, but I don't want to fill the status bar with useless icons in the process. Being able to create a notification without an icon at all would work too. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Progress bar not visible with a white background in 1.6 sdk
when i ran my old application in 1.6 i noticed that the progress bar was not showing up on the screen.When i analyzed it further i found the issue.The progress bar is getting activated but its not visible since my background color is also white.When i changed the background color i was able to see the progress bar.Is there no other way to make the progress bar visible other than changing the background color..Shouldn't the progress bar be visible under all background colors?? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Cannot upload Promotional Graphic to Android Market
For what it's worth, I ran into the same problem yesterday with not being able to upload a promo image. Changing browsers made no difference. In the end I converted it into a high quality JPEG and that worked fine. Tom. 2009/9/8 Streets Of Boston flyingdutc...@gmail.com I meant that the 'images not sticking' problem does not occur on FireFox. I still cannot upload a PNG as a 'promo image'. On Sep 8, 9:40 am, Streets Of Boston flyingdutc...@gmail.com wrote: Try it on any other browser than IE8, if that's the one you're using. When i used FireFox, all went fine. On Sep 8, 8:24 am, jsdf jasons...@gmail.com wrote: Problem still exists. And, per Streets of Boston, my 2 full screenshots are not 'sticking' over time either. I don't think the Android Market guys actually tested this properly before publishing it. On Sep 4, 10:46 pm, String sterling.ud...@googlemail.com wrote: I've created and uploaded JPGs with no trouble, so it certainly can work. Try saving your file with different options - let us know if you find what's causing the trouble. String On Sep 4, 11:54 pm, Don Oleary donole...@gmail.com wrote: Also cannot upload any image. Getting the error Graphic must be a PNG or JPEG image file. Regards Don On Fri, Sep 4, 2009 at 5:44 PM, Streets Of Boston flyingdutc...@gmail.comwrote: Same here. In addition; i cannot upload any image (screenshots). They are there for a while, then a bit later they have disappeared. On Sep 4, 9:59 am,jsdfjasons...@gmail.com wrote: I've created 4 separate .png files with the appropriate specs (180w x 120h, PNG, full bleed, no border art) for 4 projects. I cannot upload any of them to my projects. In each case, I receive the error: The promotional graphic must be a PNG or JPEG image file. Is anyone else seeing the same issue? Thanks, jsdf- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: how to use gluUnProject
Have you checked the MatrixGrabber? I tried to use the MatrixGrabber, but I got an class Cast Exception in the MatrixGrabber Row 56: private void getMatrix(GL10 gl, int mode, float[] mat) { MatrixTrackingGL gl2 = (MatrixTrackingGL) gl; ...} Does anyone know how to use it? On 8 Sep., 15:53, Streets Of Boston flyingdutc...@gmail.com wrote: --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: OpenGL 2D Game Framework
Definitely a good idea Fred, something else that I put into the TODO list, thanks. 1.6 wasn't out when I was working the audio part of the engine, so it never crossed my mind. Also, I've been working on a game from the engine myself, and I've made a nifty path following modifier, that will get take a sprite and follow it smoothly (using natural cubic splines) along a series of x/y points, rotating if it needs to. If anyones interested, it'll be in the next update of the engine on the site in a couple of days :) On Sep 20, 3:48 pm, Fred Grott(Android Expert) fred.gr...@gmail.com wrote: how about using the new sound track engine in Android 1.6? JetBoy? On Sep 20, 8:28 am, rich...@stickycoding.com rich...@stickycoding.com wrote: Alright, thanks for the suggestions you sent me Lance, it did make a noticeable difference. I also changed a lot of things that were causing garbage, and added in a new particle engine. For anyone who's nosey, you can take a look here at the new featureshttp://www.youtube.com/watch?v=jWYL-L7HnEE I seem to be having some problems with the sound however. I can use MediaPlayer to play music, and framerate doesn't really drop. Or I can use SoundPool for effects, and framerate doesn't really drop. But if I use them at the same time (to have Music, and Sound Effects) the drop in framerate seems to greatly exceed the two alone combined. Is there a reason for this, or any solution? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] OpenGL ES - How to map 2D-X-Y-screen Coordinates to 3D-X-Y-Z Object
Does anyone know how to map 2D-X-Y screen coordinates to 3D-X-Y-Z Object coordinates in a openGL World (Or 3D-X-Y-Z to 2D-X-Y)? What I want is to determine on which 3D-Object a user clicked, when he touches the phone screen (onTouchEvent). Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Route between two GeoPoints/ lat-lon pairs
Hello, i am using the android 1.6 sdk. i search for a function / api, where i can find a route between 2 points. The DrivingDirections library doesn't exist!? So if there is a function or an api for that, please let me know. I take a look in the google-addon for android, but i don't find something for my problem. Currently, I get location updates as often as possible (requestLocationUpdates(..,0,0,..) Is the only way to connect all this points to a route the reverse Geocodring (to get the street names) and draw a line from point A to Point B on the map (i mean to use an Overlay and draw a straight line between the points)? On straight routes that would be no problem, but in curves/turns? What I want is, that i only get the GPS-points. Then some functions should reconstruct the route with all curves/turns. Thanks, Stefan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 use Attribute android:keyPreviewLayout ??
How can I use Attribute android:keyPreviewLayout ?? It always make a err message!! my XML file like that com.example.android.softkeyboard.LatinKeyboardView xmlns:android=http://schemas.android.com/apk/res/android; android:id=@+id/keyboard android:keyPreviewOffset=50px android:keyPreviewLayout=@drawable/logo-- Is it right?? android:keyTextColor=#ff android:keyBackground =@drawable/test android:layout_alignParentBottom=true android:layout_width=fill_parent android:layout_height=wrap_content / --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to 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 an app which will install other .apk
I have just tried this code but something is not just as I wanted. The user shoud confirm that he want to install the new version when this application is already install. Is it possible to force the installation without any user confirmation? On Sep 17, 10:36 am, DaminouU dam.le...@gmail.com wrote: OK ! Thank you. I will try this solution. It should work ! On 16 sep, 19:32, Jack Ha jack...@t-mobile.com wrote: One way you can do is to first save the .apk file in /sdcard and then install it with the following code: Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(Uri.fromFile(new File(/sdcard/ app1.apk)), application/vnd.android.package-archive); startActivity(intent); -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The coverage you need at the price you want The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Sep 16, 10:05 am, DaminouU dam.le...@gmail.com wrote: Hi, I want to create an application which will be able to install another one. Actually a server will send me the .apk file. Then I want my application installing this .apk file and running it. This activity will be a kind of 'script' for installing and running a new apk file... Is it possible? How can I do? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 read img files
Hi guys, I need some information about Android filesystem. I'm using emulator and I want to open system.dd file, which has been created by the dd tool. I used the following command: dd if=/dev/mtd/mtd0 of=/sdcard/system.dd bs=2048 Now, how can I read this file? There are any tools able to support the yaffs2 in order to read the contents? Thanks a lot, Francesco --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Hierarchy Viewer
What this link repository?? You know? 2009/9/21 Dianne Hackborn hack...@android.com It is over the adb connection. You can look at the source in the open-source repository... though keep in mind that there are no guarantees the protocol it uses will remain compatible across platform versions. On Fri, Sep 18, 2009 at 1:38 PM, Marcelo Alves malves.i...@gmail.comwrote: Hi everybody, I would like to know how the Hierarchy Viewer tool does to get information from phone screen? Is it use telnet or ADB? I need to use these same information in my own tool. By Marcelo Alves -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Please help me !
please help me is a useless topic title. You are not going tom get valuable help this way. Please trya clear title that rel;ates to ty7our problem. and in the text describe what you ahve tried or read until this point, and why that may not be working. This is not a 'code my app' forum On Sep 20, 12:03 pm, Nine quachtoanch...@gmail.com wrote: I want to display a overlay in maps ( as Overlay of MyLocation - The circle which can flash ). How to do ? Thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Please help me !
*Try this!* package org.apache.maps; import android.graphics.Canvas; import android.graphics.Paint; import com.google.android.maps.Overlay; import com.google.android.maps.Point; import com.google.googlenav.Placemark; import com.google.googlenav.Search; public class MyOverlay extends Overlay { BrowseMap mMap; Paint paint1 = new Paint(); Paint paint2 = new Paint(); public MyOverlay(BrowseMap map) { mMap = map; paint2.setARGB(255, 255, 255, 255); } public void draw(Canvas canvas, PixelCalculator pixelCalculator, boolean b) { super.draw(canvas, pixelCalculator, b); Search search = mMap.getSearch(); if (search != null) { for (int i = 0; i search.numPlacemarks(); i++) { Placemark placemark = search.getPlacemark(i); int[] screenCoords = new int[2]; Point point = new Point(placemark.getLocation().getLatitude(), placemark.getLocation().getLongitude()); pixelCalculator.getPointXY(point, screenCoords); canvas.drawCircle(screenCoords[0], screenCoords[1], 9, paint1); canvas.drawText(Integer.toString(i + 1), screenCoords[0] - 4, screenCoords[1] + 4, paint2); } } } } On Mon, Sep 21, 2009 at 9:37 AM, Smelly Eddie ollit...@gmail.com wrote: please help me is a useless topic title. You are not going tom get valuable help this way. Please trya clear title that rel;ates to ty7our problem. and in the text describe what you ahve tried or read until this point, and why that may not be working. This is not a 'code my app' forum On Sep 20, 12:03 pm, Nine quachtoanch...@gmail.com wrote: I want to display a overlay in maps ( as Overlay of MyLocation - The circle which can flash ). How to do ? Thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How to Force browser activity to close after passing control
So I read through the SDK docs and I thought that calling a new activity(browser) as part of a task (myTask) will mean that activity* (browser) will close when a user closes the task (myTask) But I am left with a browser window. here is my scenario (in sudo code); **Start myTask Activity1 **MyTask startsActivity(Browser) **Browser uses CallBack Url to pass control to MyTask Activity1 (this seems to create a new Task(myTask), which may be my problem) **User closes MyTask **browser window remains with prior URL -- Question 1: What is the cleanest way to ensure that when a user closes my app, any outside activities called will be closed to. Question 2: Does a callback URl start a new Task, or use one in the stack if available? Regards, Eddie --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: OpenGL ES - How to map 2D-X-Y-screen Coordinates to 3D-X-Y-Z Object
Search for gluUnProject in this discussion group. You'll find the answer there. On Sep 21, 7:18 am, androidDeveloper stepmas...@googlemail.com wrote: Does anyone know how to map 2D-X-Y screen coordinates to 3D-X-Y-Z Object coordinates in a openGL World (Or 3D-X-Y-Z to 2D-X-Y)? What I want is to determine on which 3D-Object a user clicked, when he touches the phone screen (onTouchEvent). Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: how to use gluUnProject
Be sure that the 'gl' you use in your app is actually a MatrixTrackingGL, a wrapper around the GL10 instance returned by the opengl api. Look at the API Demoes source code that comes with the Android SDK. Look at the 'Kube.java' class. On Sep 21, 7:09 am, androidDeveloper stepmas...@googlemail.com wrote: Have you checked the MatrixGrabber? I tried to use the MatrixGrabber, but I got an class Cast Exception in the MatrixGrabber Row 56: private void getMatrix(GL10 gl, int mode, float[] mat) { MatrixTrackingGL gl2 = (MatrixTrackingGL) gl; ...} Does anyone know how to use it? On 8 Sep., 15:53, Streets Of Boston flyingdutc...@gmail.com wrote: --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] To add Image in Listview....
how can i add image to my listview dynamically Thanks in advance.. with Regards, Raghav.S Here is My Code: .final String[] options1 = new String[] {My Wedding To Do List,My Reminders,My Appointments ,My Vendors,My Gift Tracker,My Wedding Budget Calculator,My Vows,My Images,My Invitations,My Honeymoon}; (new ArrayAdapterString(this, android.R.layout.simple_list_item_1,options1)); getListView().setTextFilterEnabled(true); } protected void onListItemClick(ListView parent, View v, int position, long id) { super.onListItemClick(parent, v, position, id); if(position == 0) { Toast.makeText(getBaseContext(),You Clicked,Toast.LENGTH_SHORT).show(); } else if(position == 1) { Intent second = new Intent(this,secondpage.class); startActivity(second); } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: To add Image in Listview....
how can i add image to my listview dynamically One way is to extend your adapter class and implement getView(), so you can take control over the process of creating and customizing rows. Here is a free excerpt from one of my books that describes how to do this: http://commonsware.com/Android/excerpt.pdf -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.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: OpenGL and pause/resume
well, I did put those lines in the onPause/onResume methods but still have the black screen with this error in the logcat: ERROR/SurfaceComposerClient(15353): using an invalid surface id=0, identity=1431 should be 1435 Doesn't seem exactly the same error... can anybody help please ? On 30 août, 09:59, Cor cg0...@gmail.com wrote: In the mean time I found this was a classic RTFM case ;-) If you use GLSurfaceView you have to call view.onPause() and view.onResume() respectively in the activities onPause() and anResume () methods --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Image scaling by BitmapFactory.decodeResource()
Even with if one specifies inScaled=false, there's a surprise lurking: 1) Using BitmapFactory.decodeResource(), I load a background bitmap (which I don't want scaled), create a mutable copy of it and wrap it with a canvas. 2) Using Bitmap.create() I create a bitmap (into which I render a flower) 3) Using the canvas I then draw the bitmap from (2) onto the bitmap from (1). The surprise is that the bitmap in (2) is automatically given a density of 240, whereas the bitmap in (1) is automatically given a density of 160. The result is that the drawing operation (3) renders the bitmap at 2/3rds of the size I first expected. My application generates these picture for sharing via email etc. so the device density is an irrelevance in this instance. I can temporarily resolve the problem by allocating an inDensity of 240 for (1), but I can't find anything in the documentation which actually specifies this. What is the correct approach to follow for 1.6 while maintaining compatibility with 1.5? Tom 2009/9/18 Tom Gibara m...@tomgibara.com I just published a simple class for dealing with this minor compatibility issue; it seems to be working well for my application and it might be useful for anyone else in the same situation. http://blog.tomgibara.com/post/190539066/android-unscaled-bitmaps Tom. http://blog.tomgibara.com/post/190539066/android-unscaled-bitmaps 2009/9/17 Tom Gibara m...@tomgibara.com Hmm, interesting... Just had a chance to try this out on 1.5. If I move my bitmaps into a drawable-nodpi directory then the application compiles and executes, but I don't see the images. Inspection with the debugger (plus logging just to make sure) indicates that the bitmaps, when loaded from nodpi always have a width and height of 1px. Move them back to the basic drawable directory and it all works perfectly again. Shame, looks like it was *almost* implemented :) Tom. 2009/9/17 Romain Guy romain...@google.com Give it a try, 1.5 already had all the scaling code based on display's density. I don't know about nodpi specifically but it's worth the try. On Thu, Sep 17, 2009 at 11:46 AM, Tom Gibara m...@tomgibara.com wrote: Duh, I misread the docs for the inScaled flag. Thanks for pointing that out. The drawable-nodpi/ sounds perfect, but I'm guessing I can't use that and remain compatible with API 3, since I don't see nodpi listed the documentation for resources in 1.5. Tom. 2009/9/17 Romain Guy romain...@google.com private Bitmap loadBitmap(int resId) { BitmapFactory.Options options = new BitmapFactory.Options(); options.inTargetDensity = 1; options.inDensity = 1; return BitmapFactory.decodeResource(context.getResources(), resId, options); } That's the wrong way to do it. You're assigning your bitmap a density of 1dpi, which can have bad consequences. There's a much simpler way to do it: just set options.inScaled = false. But the right way to do it really is to place the assets in the right directory: drawable-ldpi/ for 120dpi displays drawable-mdpi/ for 160dpi displays drawable-hdpi/ for 240dpi displays and in your case: drawable-nodpi/ for assets that should not be scaled. I have two related queries: Is there a simpler way of doing this? Is there a way to support android:minSdkVersion=3 without jumping through the hoop of creating two implementations (for API 3 and API 4) of an image loading interface and selecting one at runtime? Tom. -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: WebView.loadUrl on a hidden view opens the android browser
I am trying to transition between 2 web views. One is in the foreground and the other already prepares another URL in the background. Everything works fine except for the fact that calling loadURL on the 2nd (invisible) view causes the native browser to open with the specified url, rather than my builtin browser. Any clues? Are you sure it's not just that your second URL is one that does a redirect? If you do not have a WebViewClient defined to otherwise control URL loading, loading a URL into a WebView, where the URL triggers a redirect, will cause the redirected URL to open in the built-in Browser. To avoid this, create a subclass of WebViewClient, implement shouldOverrideUrlLoading(), and attache an instance of that WebViewClient to the WebView. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.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] Evaluate a javascript expression in android
Is it possible to reference the javax.script.ScriptEngine library when developing an android application? If not is there anyway possible to evaluate a javascript expression 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: To add Image in Listview....
Might also want to look here: http://developer.android.com/guide/samples/ApiDemos/src/com/example/android/apis/view/List14.html On Sep 21, 8:50 am, ragavendran s sraghav.ra...@gmail.com wrote: how can i add image to my listview dynamically Thanks in advance.. with Regards, Raghav.S Here is My Code: .final String[] options1 = new String[] {My Wedding To Do List,My Reminders,My Appointments ,My Vendors,My Gift Tracker,My Wedding Budget Calculator,My Vows,My Images,My Invitations,My Honeymoon}; (new ArrayAdapterString(this, android.R.layout.simple_list_item_1,options1)); getListView().setTextFilterEnabled(true); } protected void onListItemClick(ListView parent, View v, int position, long id) { super.onListItemClick(parent, v, position, id); if(position == 0) { Toast.makeText(getBaseContext(),You Clicked,Toast.LENGTH_SHORT).show(); } else if(position == 1) { Intent second = new Intent(this,secondpage.class); startActivity(second); } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 use gluUnProject
Thanks. I found the error. The Code example is found in the ApiDemos com.example.android.apis.graphics.spritetext SpriteTextActivity. On 21 Sep., 14:56, Streets Of Boston flyingdutc...@gmail.com wrote: --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Using maps with a postcode
Is this possible with the current Maps implementation? I want my map to navigate to a location dependent on the postcode, just like you would on the google maps website. Or at least to retrieve the latitude and longitude from the postcode. Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: OpenGL 2D Game Framework
Hi Richard, What is the terms conditions for using it? I mean copyright etc... I'm developing some games ( my area of interest is AI type games ), but I might be able to take some fragments of code for animations, placement of objects etc. But for commercial side, I don't want to get into something that has some weired licensing ... No doubt this framework has some very very good stuff that possibly can be used as cutpaste or simply dropping those class definition files ... -pro On Sep 18, 6:08 am, rich...@stickycoding.com rich...@stickycoding.com wrote: I've been working on a game framework for a little while, and while its far from perfect, I've put the current version online. To be honest, I haven't used much OpenGL in the past. Before last week I had never tried using it. If anyone would like to take a look, please do, I'd appreciate all the help possible on speeding it up. There are many features I have in mind and am planning at the minute, but so far it supports: # Texture and Sprite management # Text, using TTF fonts # Organised layers # Two audio management classes, one optimized for music, the other for sound effects # Sprite dynamics (acceleration, terminal velocity, collisions) # Animation # Handlers to manage events fired through movement, animation, screen touches, accelerometer input, device shaking and collisions # Several minor features aimed at speeding development, such as screen settings and vibration The code is athttp://code.google.com/p/rokon/ Again, I'd very much appreciate advice or help with any bugs you can see, thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: OnItemClickListener onItemClick in custom adapter not firing
You array adapter has extended ArrayAdapterFuItem: public class FuItemAdapter extends ArrayAdapterFuItem Your ArrayAdapter is expecting type FuItem, your overridden OnItemClick function isn't being called because the AdapterView's type isn't explicit maybe? So try AdapterViewFuItem arg0 instead of AdapterView? arg0 I'm a C programmer first so I could be totally off. I'm always hammering strangely shaped pegs into the wrong holes here. :) On Sep 21, 2:47 am, lf.hl flod...@googlemail.com wrote: Hi Joy, thanks for your response. I see the OnClickListeners for the button and edittext firing (the one i have registered in the adapter). I don't see the OnItemClickListener in the AdapterTest.class. Thanks again and best, lf.hl On 21 Sep., 02:17, Joy 3crownt...@gmail.com wrote: Hi, You bind onItemClick twice. Did you see any log when item is clicked? On Sun, Sep 20, 2009 at 5:09 AM, lf.hl flod...@googlemail.com wrote: Hi, in a custom ArrayAdapter i don't see onItemClick firing. I would like to pack all the logic in there so i need access to the views in each row of the adapter (2 Buttons,1 EditText). I was looking on the internet for hours to find a real howto. Q1: Is there a tutorial on the net? Q2: Do you see a bug/whats missing? Q3: How to seduce a clicked View in onItemClick? Any help is really really appreciated, lf.hl --This is the activity--- package org.rice; import android.app.Activity; import android.view.View; import android.view.View.OnClickListener; import android.widget.*; import android.os.Bundle; import java.util.*; import android.widget.AdapterView.OnItemClickListener; import android.util.*; public class AdapterTest extends Activity{ private ArrayListFuItem fItems; private ArrayAdapterFuItem aa; private ListView myListView; private void fillit(){ fItems = new ArrayListFuItem(); for(int i = 0; i 5; i++){ FuItem fi = new FuItem(String.valueOf(i), (float)i); fItems.add(fi); } } /** Called when the activity is first created. */ �...@override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); myListView = (ListView)findViewById(R.id.liste); fillit(); int resId = R.layout.row; aa = new FuItemAdapter(this, resId, fItems); myListView.setAdapter(aa); myListView.setChoiceMode(ListView.CHOICE_MODE_SINGLE); myListView.setItemsCanFocus(true); myListView.setOnItemClickListener(new OnItemClickListener() { �...@override public void onItemClick(AdapterView? arg0, View arg1, int arg2, long arg3) { // TODO Auto-generated method stub Log.i(adaptertest, onItemClick fired); } }); } } -Custom Adapter FuItemAdapter--- package org.rice; import android.view.*; import android.view.View.OnClickListener; import android.widget.*; import android.content.Context; import java.util.*; import android.util.*; import android.widget.Button; public class FuItemAdapter extends ArrayAdapterFuItem { int resource; public FuItemAdapter(Context _context, int _resource, ListFuItem _items) { super(_context, _resource, _items); resource = _resource; } �...@override public View getView(int position, View convertView, ViewGroup parent) { LinearLayout fuitemView; FuItem item = getItem(position); String productString = item.getProduct(); String priceString = String.valueOf(item.getPrice()); if(convertView == null){ fuitemView = new LinearLayout(getContext()); String inflater = Context.LAYOUT_INFLATER_SERVICE; LayoutInflater vi; vi = (LayoutInflater)getContext().getSystemService(inflater); vi.inflate(resource, fuitemView, true); } else { fuitemView = (LinearLayout) convertView; } TextView productView = (TextView)fuitemView.findViewById (R.id.product); EditText priceView = (EditText)fuitemView.findViewById(R.id.price); Button down = (Button)fuitemView.findViewById(R.id.down); Button up = (Button)fuitemView.findViewById(R.id.up);
[android-developers] using tesseract on android
hello.. i am working on a android project that uses tesseract OCR engines..i hv been searching on internet from past few days about any support for tesseract for android platform..but i didnt get any help...Plz help me about how i do use tesseract for android platform...or how do i install it on android.. any kind of help is highly appriciated... plz help thanx in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: OpenGL 2D Game Framework
I tried it out and noticed that animation and movement jerks once a second. Anyone else get that? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Request to official ADC2 team.
+ On 9月15日, 午前3:40, Mobidev android.mobi...@gmail.com wrote: . Once upon a time, we had this little group…http://groups.google.com/group/android-challengeAndroid Challenge: Discuss the Android Developer Challenge, including questions on contest details. You can also seek other developers to join a team effort. …then came this message…http://groups.google.com/group/android-challenge/browse_thread/thread... …and the group was closed for ever. A humble request toADC2team to officially start and moderate a newADC2group similar to the previous android-challenge group.ADC2 messages are scattered in android-developers and android-discuss groups.ADC2discussions does not fit in either of these groups. There will be hundreds of queries, comments, news and PR pitches once theADC2judging app goes live. So please could you start aADC2 discussion group at the earliest. Thanks. P.S. Droids of the planet please vote with '+' or '–' for this request. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: OpenGL 2D Game Framework
Probably some GC going on, I also noticed it but it seemed less frequent than once per second. On Sep 21, 7:45 am, Phred phr...@gmail.com wrote: I tried it out and noticed that animation and movement jerks once a second. Anyone else get that? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: using tesseract on android
On Mon, Sep 21, 2009 at 16:36, mudit mudit.a...@gmail.com wrote: hello.. i am working on a android project that uses tesseract OCR engines..i hv been searching on internet from past few days about any support for tesseract for android platform..but i didnt get any help...Plz help me about how i do use tesseract for android platform...or how do i install it on android.. check : http://groups.google.com/group/android-discuss/browse_thread/thread/3bd4e2551f1382e6?hl=en http://www.itwizard.ro/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: OpenGL 2D Game Framework
I noticed on the google code page http://code.google.com/p/rokon/ that the license is GPL 3, which means anyone who uses it must open source their app. Richard, have you given some thought to changing the license to something more permissive? Either way, impressive work. Good job. On Sep 21, 10:21 am, pro proka...@gmail.com wrote: Hi Richard, What is the terms conditions for using it? I mean copyright etc... I'm developing some games ( my area of interest is AI type games ), but I might be able to take some fragments of code for animations, placement of objects etc. But for commercial side, I don't want to get into something that has some weired licensing ... No doubt this framework has some very very good stuff that possibly can be used as cutpaste or simply dropping those class definition files ... -pro On Sep 18, 6:08 am, rich...@stickycoding.com rich...@stickycoding.com wrote: I've been working on a game framework for a little while, and while its far from perfect, I've put the current version online. To be honest, I haven't used much OpenGL in the past. Before last week I had never tried using it. If anyone would like to take a look, please do, I'd appreciate all the help possible on speeding it up. There are many features I have in mind and am planning at the minute, but so far it supports: # Texture and Sprite management # Text, using TTF fonts # Organised layers # Two audio management classes, one optimized for music, the other for sound effects # Sprite dynamics (acceleration, terminal velocity, collisions) # Animation # Handlers to manage events fired through movement, animation, screen touches, accelerometer input, device shaking and collisions # Several minor features aimed at speeding development, such as screen settings and vibration The code is athttp://code.google.com/p/rokon/ Again, I'd very much appreciate advice or help with any bugs you can see, thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: using tesseract on android
i am working on a android project that uses tesseract OCR engines..i hv been searching on internet from past few days about any support for tesseract for android platform..but i didnt get any help...Plz help me about how i do use tesseract for android platform...or how do i install it on android.. any kind of help is highly appriciated... Tesseract is not Java code. However, its C/C++ code appears to have been ported to ARM, and it runs on various embedded systems so it cannot be too big or too CPU-intensive. You will want to look at the NDK and determine how to create a wrapper for it to allow you to call into Tesseract code from your Java-based Android project: http://developer.android.com/sdk/ndk/1.5_r1/index.html -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.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] Misunderstand about MediaPlayer play the rtsp streaming media.
I use the WIFI to connect to the internet.And I use a wifi link named linksys,it plays ok. while I use another wifi link named dlink,it was fail.The speed oflinksys is 1.2Mbps and the bitrate of the dlink is just 700Kbps.Does the opencore have the speed limited while MediaPlayer play the rtsp? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Android 1.6 SDK is here!
I do understand that sources are available at source.android.com, but it would save people time if a src JAR were bundled with the SDK download. http://code.google.com/p/android/issues/detail?id=979 This seems like a reasonable request. I know I've personally spent many hours on previous SDKs trying to learn how to check out the source and configure it properly in Eclipse. On Sep 16, 1:15 am, Romain Guy romain...@google.com wrote: Guys, is there any particular reason for you not to include sources in 1.6 as well? Sources are available at source.android.com. -- Romain Guy Android framework engineer romain...@android.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] An approach and very **drafty** sample code for utilizing models for storing widget state..
I have been experimenting with widgets for a few days, and I needed a simple abstract means of saving the widget state. I want to be able to do something like the following: private void updateAppWidget(String name, String dob) { //create a widget model with its own data BDayWidgetModel m = new BDayWidgetModel(mAppWidgetId,name,dob); //paint it updateAppWidget(this,AppWidgetManager.getInstance(this),m); //save it for next time m.save(this); } To accomodate this I have used a widget model abstraction where a derived widget model will identiy some of its members as persistable and knows how to set them back when retrieved. This allowed me to quickly accomodate all kinds of widget models and not think about persistence model all the time. Anyway, if you want to get to the source code you can use the following link http://www.knowledgefolders.com/akc/display?url=DisplayNoteIMPURLreportId=3307ownerUserId=satya Now this is a very drafty work around or framework, however you deem to call it. I can see a handfull of variants that can make this lot bettter, but this is quick and dirty for your experimental work. Hope this is useful to someone Satya --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Bug in GL10.texSubImage2D?
Thank you for that elaborate response. Your assumptions were all correct (and I _did_ do a little too much work when I called texImage2D, I only really needed to do that once, not every time I updated the texture). I now make a Canvas, which I draw my dynamic bitmap to, and just bind that texture with texImage2D without using texSubImage2D. This works perfectly, however, I feel a slight lag (although I haven't done any performance tests on it) when I change the texture, that I didn't notice before. I am certain my textures are at most 100x100 but usually smaller on one dimension. As I don't replace the entire texture, but only a portion of it, texSubImage2D might be the faster choice - if only it worked. Also, I didn't get any GL errors (gl.getError()) when using texSubImage2D. So what's left for me is this: * Is drawing the image to a canvas using drawBitmap the fastest way to make a npot texture pot? * Is texSubImage2D broken, in which case I should report it? Regards, Mark Gjøl On Sep 21, 2:32 am, Robert Green rbgrn@gmail.com wrote: I'm a little confused by what you're doing. You're first calling texImage2D, which uploads mImg to vram as your texture. The very next call you make is texSubImage2D with an offset of 0 and 0, which uploads texture to vram, overwriting mImg. I'm assuming that: 1) mImg is 128x128 2) You first upload mImg to allocate a space as big as mImg 3) None of your textures are greater than mImg's width or height I'm going to suggest you change your code to do the following: 1) Create a bitmap of 128x128 or whatever size is appropriate for each dynamic texture, unless you have many different images you want to use. 2) Draw your texture to that bitmap 3) Upload that texture using regular texImage2D (in my tests, it's faster for full-size updates than using texSubImage2D). 4) If using one scratchpad bitmap, just erase it and reuse. Remember to .recycle() when done with it. basically, I suggest that you only upload once to vram and do any pre- processing on the client-side using a Bitmap or many Bitmaps depending on your app/game. That's how I do it. You can texImage2D the same textureId as many times as you like. Also, I recommend using GL_NICEST for perspective correction when dealing with large projected quads. It's not as fast as GL_FASTEST but for big triangles, it's the only way to guarantee they won't get really weird when cut off at near-Z. I have renderer classes that render game objects for my games. My renderers all look like this: public MyRenderer(GL10 gl) { // read geometry from disk resource reInit(gl); } public void reInit(GL10 gl) { // create VBOIds // upload VBOs // create textureIds // upload textures } public void draw(GL10 gl, GameObject obj) { // bind VBOs and TextureIds // transform for obj // draw elements } so if I wanted a dynamic texture, I'd just add in this: public void setTexture(GL10 gl, Bitmap texture) { // bind to appropriate textureId // upload whichTex } though I'd never let the main renderer hang on to bitmaps that an object render will be drawing - I would be managing that in the object renderer, so probably passing a sort of pointer or configuration, usually in the form of an int constant, like: public static final int TEXTURE_HAPPY_FACE = 0; public static final int TEXTURE_ANGRY_FACE = 1; public void setTexture(GL10 gl, int whichTex) { // bind to appropriate textureId // upload bitmap associated with whichTex if (whichTex == TEXTURE_HAPPY_FACE) { // upload happy face bitmap that we loadad probably in our constructor or somewhere before runtime. } } I know I'm not solving your exact problem, but I think if you followed this, you wouldn't have it anymore. If you want to stick with what you've got, throw some debug statements in there to print out the image size and the texture coordinates so you can make sure that it's not just a problem with those. If they look exactly right, Just make sure you're not doing something goofy like uploading an image that's bigger than the original. On Sep 20, 4:53 pm, Mark Gjøl bitflips...@gmail.com wrote: I am developing an application that dynamically changes the texture of an object. The textures I download from the internet and are of fairly random aspect ratios. I apply these textures to a 2^nth texture using GLUtils.texSubImage2D supplying the bitmap containing the texture, and only use the part of the constructed texture that holds the newly applied data. This works fine when using textures with a greater width than height. However, when using tall images, I sometimes get images that are skewed. That is, it seems as if the texture is copied to the new texture, but with the width being one off, so each line just one pixel too short. This happens consistently when using the same images, however it does not happen for all tall images. Code
[android-developers] Re: OpenGL 2D Game Framework
The library looks great (after a few hours of playing with it), definitely has some improvements that could be made, but very well laid out and easy to work with. However, the GPLv3 does make game development a bit of an issue, if the games need to be released as GPLv3 as well... - Dan On Mon, Sep 21, 2009 at 10:53 AM, Andrew Shu talklit...@gmail.com wrote: I noticed on the google code page http://code.google.com/p/rokon/ that the license is GPL 3, which means anyone who uses it must open source their app. Richard, have you given some thought to changing the license to something more permissive? Either way, impressive work. Good job. On Sep 21, 10:21 am, pro proka...@gmail.com wrote: Hi Richard, What is the terms conditions for using it? I mean copyright etc... I'm developing some games ( my area of interest is AI type games ), but I might be able to take some fragments of code for animations, placement of objects etc. But for commercial side, I don't want to get into something that has some weired licensing ... No doubt this framework has some very very good stuff that possibly can be used as cutpaste or simply dropping those class definition files ... -pro On Sep 18, 6:08 am, rich...@stickycoding.com rich...@stickycoding.com wrote: I've been working on a game framework for a little while, and while its far from perfect, I've put the current version online. To be honest, I haven't used much OpenGL in the past. Before last week I had never tried using it. If anyone would like to take a look, please do, I'd appreciate all the help possible on speeding it up. There are many features I have in mind and am planning at the minute, but so far it supports: # Texture and Sprite management # Text, using TTF fonts # Organised layers # Two audio management classes, one optimized for music, the other for sound effects # Sprite dynamics (acceleration, terminal velocity, collisions) # Animation # Handlers to manage events fired through movement, animation, screen touches, accelerometer input, device shaking and collisions # Several minor features aimed at speeding development, such as screen settings and vibration The code is athttp://code.google.com/p/rokon/ Again, I'd very much appreciate advice or help with any bugs you can see, thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: OpenGL 2D Game Framework
Dan, that's what I was thinking as well (regarding the GPLv3). On Sep 21, 9:42 am, Dan Sherman impact...@gmail.com wrote: The library looks great (after a few hours of playing with it), definitely has some improvements that could be made, but very well laid out and easy to work with. However, the GPLv3 does make game development a bit of an issue, if the games need to be released as GPLv3 as well... - Dan On Mon, Sep 21, 2009 at 10:53 AM, Andrew Shu talklit...@gmail.com wrote: I noticed on the google code pagehttp://code.google.com/p/rokon/that the license is GPL 3, which means anyone who uses it must open source their app. Richard, have you given some thought to changing the license to something more permissive? Either way, impressive work. Good job. On Sep 21, 10:21 am, pro proka...@gmail.com wrote: Hi Richard, What is the terms conditions for using it? I mean copyright etc... I'm developing some games ( my area of interest is AI type games ), but I might be able to take some fragments of code for animations, placement of objects etc. But for commercial side, I don't want to get into something that has some weired licensing ... No doubt this framework has some very very good stuff that possibly can be used as cutpaste or simply dropping those class definition files ... -pro On Sep 18, 6:08 am, rich...@stickycoding.com rich...@stickycoding.com wrote: I've been working on a game framework for a little while, and while its far from perfect, I've put the current version online. To be honest, I haven't used much OpenGL in the past. Before last week I had never tried using it. If anyone would like to take a look, please do, I'd appreciate all the help possible on speeding it up. There are many features I have in mind and am planning at the minute, but so far it supports: # Texture and Sprite management # Text, using TTF fonts # Organised layers # Two audio management classes, one optimized for music, the other for sound effects # Sprite dynamics (acceleration, terminal velocity, collisions) # Animation # Handlers to manage events fired through movement, animation, screen touches, accelerometer input, device shaking and collisions # Several minor features aimed at speeding development, such as screen settings and vibration The code is athttp://code.google.com/p/rokon/ Again, I'd very much appreciate advice or help with any bugs you can see, thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Hierarchy Viewer
What this link repository?? You know? http://source.android.com -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.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: Is it possible to extend resources xml with custom views?
Hi.. Following this topic, If i customized a view in A application and want to reuse in other B or C applications, as i know, the resource file ( the default background image and string... in custom view class ) can't be used by other apps. Advanced, If we want to release this custom view class to other android platform, how to deal this case? Best regards On 8月31日, 上午6時07分, Romain Guy romain...@google.com wrote: Yes you can, there are examples in the SDK (ApiDemos, Home.) On Sun, Aug 30, 2009 at 1:51 PM, Daberm.a.dabrow...@gmail.com wrote: Does anybody knows if (and how ) I can write a custom view/widget and then use it in resources in layout defintions? All the best, Michał Dąbrowski -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Fwd: [android-porting] How to add multiple frame buffer support in Android?
please help him -- Forwarded message -- From: Pankaj dubepankaj1...@gmail.com Date: 2009/9/16 Subject: [android-porting] How to add multiple frame buffer support in Android? To: android-porting android-port...@googlegroups.com Hi all, We are looking for one serious change in the Android's SurfaceFlinger, as of now Android supports only one display thorugh framebuffer 0 (/ dev/graphics/fb0), but we want to add support for multiple frame buffer (fb0/fb1/fb2). After looking into the surfaceflinger and related module we came to know that we need to change the surfaceflinger, following are some of the changes we have found to be done (although I am not quite sure about these) 1: From SurfaceFlinger::readyToRun() we have to create secondary displays and initialize them. 2: Make size of mGraphicsPlane (array of GraphicsPlane) as 2 (or n=no of display) 3: From DisplayHardware::init while creating the EGLDisplayHardware pass the dpy value and open the corresponding fb (0 or 1) depending on dpy value. But what I am not getting is that does we need to change the initialization of EGLDisplay depending on this dpy values. Basically what changes related with egl we need to do if we want to initialize multiple displays. In surfaceFlinger.cpp in many of the APIs (such as threadLoop, handlePageFlip), the reference of HardwareDisplay is obtained from graphicsPlane(0), so what if we have mulitple graphics plane? If any body have worked or have any idea about this please share ... or correct me if I am wrong somewhere.. Thanks Pankaj -- அன்புடன் அருண் -- http://ubuntu-tam.org http://lists.ubuntu.com/ubuntu-l10n-tam http://lists.ubuntu.com/ubuntu-tam -- --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Android Dev Phone 1 Out Of Stock :-(
It was frustrating to pay $25 only to find out that the ADP 1 is out of stock. The page says it will be available early September ! I guess thats not true as September is ending now. Does anyone know when will the device be available ? -Thanks much AJs --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] is there anything wrong with the function camera.takePicture()???
when i use the Camera class to make a little app to get a bitmap,but when it run,there'll be a problem: . 09-21 12:56:06.913: ERROR/AndroidRuntime(6083): at android.hardware.Camera.takePicture(Camera.java:362) . is anything wrong with this function takePicture(Camera.ShutterCallback shutter, Camera.PictureCallback raw, Camera.PictureCallback jpeg)? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Animation Problem
I know its too late but Thanks for the reply. Basically what I want is a combination of Translate and rotate animation. I dont know if i chose the right thing as i'm very new to android. I want to animate a object on a random curve (like a freehand drawn curve which has no specific shape).So for this i chose a animation set of translate and rotate animatinos. I hope it makes sense. and also i want to capture clicks on the object while it animates. Do you think you can help me? Probably i chose the wrong approach kindly correct me if so. Actually if you have a little idea of iPhone development, this kind of animation can be achieved by making a image animate on a Path. And this path can be created by us by supplying random values. Its a cake walk in iPhone. On Aug 11, 10:36 pm, jhoffman keshis...@gmail.com wrote: I'm not sure about the coordinates thing, but if you are trying to use rotateAnimation to rotate something such that it looks like it is spinning in-place, then 0,0 are not the coordinates you want. The coordinates are a 'pivot point'; you could think of them as the 'middle' of the rotation. If you want an object to rotate or spin without moving up/down/left/ right, then what you actually want is: RotateAnimation spin = new RotateAnimation(0.0f, 360.0f,Animation.RELATIVE_TO_SELF, 0.5f,Animation.RELATIVE_TO_SELF, 0.5f); This gives the middle of the image as the 'pivot' so it doesn't move in an arc. Hope this helps! On Aug 11, 1:59 am, HVT vikramhiman...@gmail.com wrote: Hello All, I'm new to Android and trying to develop an app that has loads of animation. Its a small game. Currently i have a object (image) moving around the canvas. I used animationto animate it around the screen. But the problem here is i dont have the XY coordinates of that object while its animating. I want to get the coordinates of the bitmap whenever i want during the animation. I think if there was some way where i can read the presentation layer probably i could get the cordinates of the object. Please help me guys i'm stuck here now for like a week. My another problem is with rotateanimation, i some how dont seem to understand its functionality. I have played with it for a couple of days but no luck, i'm still new to it and dont get anything. The object makes big arcs even if the x,y values are 0,0 and the object jumps around when i try to give it random values. Any help would be highly appreciated. Thanks in advance. HVT --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Searchable Dictionary Example: R.raw.definitions cannot be resolved
Hi there, I am trying to compile the Searchable Dictionary example on my Eclipse (OS: XP) http://developer.android.com/guide/samples/SearchableDictionary/index.html but it complians about R.raw.temp cannot be resolved at line 92 of Dictionary.java file: InputStream inputStream = context.getResources().openRawResource (R.raw.temp); Has anyone had similar problem and any solution please? Many thanks, Huan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Android market application on emulator
Hi,I can also see the market app, but when I sign in with a google account , an error go out, You don't have a network connection. hmm.. On Sep 12, 4:32 am, dhr dima.hris...@gmail.com wrote: Finally managed to make it work. Instead of copying the image file directly to the avd directory, had to copy image to /platforms/ android-1.5/images the recreated the avd. Now android market is on the emulator! On Sep 11, 6:39 pm, dhr dima.hris...@gmail.com wrote: Looking for the same thing. This is what I found so far:http://forum.xda-developers.com/archive/index.php/t-529170.htmlAfter copying system.img to the avd folder and running the simulator, a message appears on the screen. It says Welcome toAndroidDev Phone 1. Tap theandroidto begin And two buttons below. Clicking everywhere does not help. If you find out what to do next please post it here. On Sep 7, 11:56 am, amit singh amitsing...@gmail.com wrote: Any pointers people? Thanks :) On Sep 4, 3:48 pm, amit singh amitsing...@gmail.com wrote: How do I get theAndroidmarketapplicationonemulator? I dont have the actual device. I searched forums - but no one seems to have discussed this. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How to update expandable view when adapter's data changed
I have an activity that extends ExpandableListActivity. I use SimpleCursorTreeAdapter to fill ExpandableListView. My layout contains list view and empty view. On app start ExpandableListActivity automatically chooses the right view to display. My steps: 1. App starts, there is no data. (empty view on the screen) 2. Insert some data into db. 3. Call adapter.notifyDataSetChanged(); But empty view is still on the screen and there is no any item in my list view. Then I restart app: 5. List view appears. I expand all groups and scroll to the bottom. 6. I click on the item in the list. New activity appears. 7. Click back button. All groups are collapsed and we are at the top of the screen. Scroll position and expanded groups are not remembered. 8. Delete all data from db and call adapter.notifyDataSetChanged(); 9. Child views have disappeared, but top-level groups are still visible. Questions: 1. What can I do to replace empty view with list view? 2. What can I do to do to save state of groups and scroll position of the list view? Code: public class MainActivity extends ExpandableListActivity { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); dbHelper = new DBOpenHelper(this); rubricsDbAdapter = new RubricsDBAdapter(dbHelper); rubricsDbAdapter.open(); itemsDbAdapter = new ItemsDBAdapter(dbHelper); itemsDbAdapter.open(); rubricsCursor = rubricsDbAdapter.getAllItemsCursor(); startManagingCursor(rubricsCursor); // Cache the ID column index rubricIdColumnIndex = rubricsCursor.getColumnIndexOrThrow (RubricsDBAdapter.KEY_ID); // Set up our adapter mAdapter = new MyExpandableListAdapter(rubricsCursor, this, android.R.layout.simple_expandable_list_item_1, android.R.layout.simple_expandable_list_item_1, new String[] {RubricsDBAdapter.KEY_NAME}, new int[] {android.R.id.text1}, new String[] {ItemsDBAdapter.KEY_NAME}, new int[] {android.R.id.text1}); setListAdapter(mAdapter); } public boolean onChildClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id) { Intent i = new Intent(this, ItemViewActivity.class); i.putExtra(ItemsDBAdapter.KEY_ID, id); startActivity(i); return super.onChildClick(parent, v, groupPosition, childPosition, id); } private void updateMyData() { int i; int k; long rubricId; for (i = 1; i = 5; i++) { rubricId = rubricsDbAdapter.insert(rubric + i); for (k = 1; k = 5; k++) { itemsDbAdapter.insert(item + i + - + k, rubricId); } } mAdapter.notifyDataSetChanged(); } private void deleteMyData() { rubricsDbAdapter.deleteAll(); itemsDbAdapter.deleteAll(); mAdapter.notifyDataSetChanged(); } public class MyExpandableListAdapter extends SimpleCursorTreeAdapter { public MyExpandableListAdapter(Cursor cursor, Context context, int groupLayout, int childLayout, String[] groupFrom, int[] groupTo, String[] childrenFrom, int[] childrenTo) { super(context, cursor, groupLayout, groupFrom, groupTo, childLayout, childrenFrom, childrenTo); } @Override protected Cursor getChildrenCursor(Cursor notebookCursor) { // Given the group, we return a cursor for all the children within that group long id = notebookCursor.getLong(rubricIdColumnIndex); Cursor itemsCursor = itemsDbAdapter.getRubricItemsCursor (id); startManagingCursor(itemsCursor); return itemsCursor; } } } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Animation
Hello All, I'm facing a problem while clicking the objects while they animate. Please help me identify the click on the objects while they are animating. My requirement is to randomly move a ball around the screen and the user should be able to click this ball any time. Also this ball changes colours. For this is i have 3 different images of different colours and I want to create a frame by frame animation between them while they are animating. This makes it 2 animations at a time. a frame-by-frame animated image/ object has to animated may be a /translate animation and this should be click able. Please help me fix this. I have stuck on this part for almost over a month now. Thanks, HVT --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] DHCP request failed wifi with WEP2 enterprise
I got a problem when I try to connect the wifi with WEP2 enterprise. In the log, I found it failed when doing DHCP request. I don't know why. Is any place I can get detail log. Or anything wrong with my config, Or it is not supported by Android 1.5 Here is my config in /data/misc/wifi/wpa_supplicant.conf --- ctrl_interface=tiwlan0 update_config=1 network={ ssid=TP-LINK key_mgmt=NONE group=WEP104 WEP40 auth_alg=OPEN SHARED wep_key0=1AYS priority=1 disabled=1 } network={ ssid=IBM identity=x...@xxx.com password=XX scan_ssid=1 proto=WPA2 key_mgmt=WPA-EAP eap=LEAP } - Ouput log - get by adb logcat - /WifiMonitor( 69): Event [CTRL-EVENT-STATE-CHANGE id=1 state=7] /WifiMonitor( 69): Event [CTRL-EVENT-CONNECTED - Connection to 00:1e:bd:65:39:a0 completed (auth) id=1 id_str=]] /WifiStateTracker( 69): Changing supplicant state: GROUP_HANDSHAKE == COMPLETED /WifiStateTracker( 69): New network state is CONNECTED /WifiStateTracker( 69): DhcpHandler: DHCP request started /SettingsWifiEnabler( 190): Received network state changed to NetworkInfo: type: WIFI[], state: CON ECTING/OBTAINING_IPADDR, reason: (unspecified), extra: (none), roaming: false, failover: false, isAv ilable: true /WifiStateTracker( 69): DhcpHandler: DHCP request failed: DHCP result was failed /WifiMonitor( 69): Event [CTRL-EVENT-STATE-CHANGE id=1 state=8] /WifiStateTracker( 69): Changing supplicant state: COMPLETED == DORMANT /WifiStateTracker( 69): Deconfiguring interface and stopping DHCP /WifiMonitor( 69): Event [CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys] /WifiMonitor( 69): Event [CTRL-EVENT-STATE-CHANGE id=-1 state=8] /WifiStateTracker( 69): New network state is DISCONNECTED /WifiStateTracker( 69): Changing supplicant state: DORMANT == DORMANT /SettingsWifiEnabler( 190): Received network state changed to NetworkInfo: type: WIFI[], state: DIS ONNECTED/FAILED, reason: (unspecified), extra: (none), roaming: false, failover: false, isAvailable: true /GpsLocationProvider( 69): updateNetworkState unavailable /WifiMonitor( 69): Event [CTRL-EVENT-STATE-CHANGE id=-1 state=1] /WifiStateTracker( 69): Changing supplicant state: DORMANT == INACTIVE /GpsLocationProvider( 69): updateNetworkState unavailable --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Query...
How can apply motion like touch screen animation in android... I apply the following code ViewFlipper vf = (ViewFlipper) findViewById(R.id.details); // Set an animation from res/anim: I pick push left out vf.setAnimation(AnimationUtils.loadAnimation(view.getContext(), R.anim.push_left_out)); vf.showPrevious(); But by using this I cant get the output like sequence in motion. So what would be the actul code? -Regards, Nisha --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 it possible to extend resources xml with custom views?
Hi, Following this topic, if i customized a view in A application, and want to re-use this view in other B or C... apps. As i know the resource ( the default background image or string in custom view ) can't be used in other apps. Advanced, if i want to release this view to other android platform, how to deal this case? Best regards On 8月31日, 上午6時14分, Mark Murphy mmur...@commonsware.com wrote: Daber wrote: Does anybody knows if (and how ) I can write a custom view/widget and then use it in resources in layout defintions? In terms of if, yes, it is very doable. In terms of how, I suspect there is at least one of the API demos on the subject, though I can't remember which one off the top of my head. Here's one blog post series I found in a Google Search: http://whyandroid.com/android/tutorial/43-tutorial/93-android-tutoria... (there's a few more posts in the series) and this: http://www.curious-creature.org/2009/03/01/android-layout-tricks-3-op... (doesn't discuss techniques, but the one example project has a custom widget) It's covered in some of the Android books, including (*cough*) two of mine. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, $35/Year --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 split a screen into two?
How do I run two apps by splitting a screen into two? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] updateTimeMillis not called for home screen widgets in 1.6
Hi, I came accross the issue that my widgets aren't working anymore when I use the updateTimeMillis is used for home screen widgets. Same code works fine on 1.5 but on 1.6 it's just not calling the onUpdate() method any more. The bug, that onDelete isn't called seems to be fixed. Could the other bug result in the other bugfix? Does anyone else have this problem or even better: a solution for it? I know it's better to use the AlarmManager to give the user the chance to configure the update periode, but still: This should be working, shouldn't it? Thx for your replies, Norbert --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 split a screen into two? One running with an application and the other with another application?
Does anyone has an idea of how to split the screen into two? Is it possible for me to run an application in one screen and another app in other screen? Any help in this regard will be of great help. Karthik --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] bug in FileInputStream for some chars?
Hi, I am trying to parse an xml file from the /sdcard/... directory using the XmlPullParser. For a file containing a mixture of Czech and Japanese (czech national chars + kana + kanji) I am getting exception: position:END_TAG so that it looks that the parser cannot recognize tags properly. I have tried a few configurations: 1) no android, java and the xpp3-1.1.4b_all.tgz - works for all cases, also other parsers are ok 2) android and the xml as a resource stream inside the archive - works 3) android and the xml located at the sdcard - FAILS! (also it seems it depends on the order of chars inside the xml) All files are published at ezach.cz/parsertest.tgz, the xml is android/ test/test.xml. I will appreciate any help as I am getting a bit frustrated and cannot fully enjoy my new phone with Android :-) Thanks, Jan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Where did platform/packages/apps/Sync.git go?
Does anyone know the answer to this? Has Google made it proprietary, like their G-Mail application? On Sep 18, 1:09 pm, Matt matthew.quig...@gmail.com wrote: I noticed that the Data Synchronization app was removed from the Donut branch; all of the files were deleted. However, the Donut device still has Data Synchronization in its Settings. So where did the com.android.sync package go to? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Making UPNP work for Android
Hi Guys, I am in this BIG BIG problem...getting UPNP working on my computer and for many reasons...it doesn't seem to be working... Any body has any clue on how to get it working? Are there any one who has any kind of code that could help me on this? I believe Andromote is the only person who has done it...but dunno how did he do it? Before I ask this great great help..I want to explain what all I have done... I am supposed to build an android remote to control a UPNP device... and I have done some research on UPNPtoolkits on Java...there were about 2 or 3 (Clink, SBBI, libupnp, etc.,) and the one which I seem to be more comfortable is the CyberGarage's clink upnp toolkit ( http://cgupnpjava.sourceforge.net/). Clink uses xerces xml reader/converter... I followed the pdf file he attached ( http://sourceforge.net/projects/cgupnpjava/files/) and went through the samples... However looking and using them on a java app... it worked fine and did good too..however the similar code failed on Android.. When I ran it on Android...I was able to do the Discover but could not get the devices list...and thats the one I need... Can someone help me do this part? I believe I just need to achieve on how to get the correct device from UPNP...Once I have the UPNP, I believe I can always get the actions... CAN SOMEONE PLEASE HELP ME? *My Environment:* Windows XP and Android 1.5 1.1 ( but I am working this on 1.1) Thanks and Regards Satish N Kota --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Widgets changes with 1.6?
Hi BoD, I'm having the same issue with my widget. It's working fine in 1.5 I'm wondering if this has to do with the bugfix for the onDelete()- Call in 1.5. Norbert --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 force soft keyboard to be visible?
I have exactly the same requirement. Running on a Hero, which only has a soft keyboard. The above code is copied exactly, yet it doesnt work. The keyboard is not shown no matter where I put the code, before or after SetContentView(). This seems like a pretty standard thing to want to do, is there some other way of doing this? Thanks in advance.. James On Sep 19, 8:42 am, Dianne Hackborn hack...@android.com wrote: The G1 has a keyboard, so it works as I said -- the IME is not shown by default. This is a policy decision of the platform. On a myTouch, since it doesn't have a keyboard, the IME will be shown by default in various cases (for example when you enter the edit contacts screen) when the app has indicated that is desired with the input options. On Fri, Sep 18, 2009 at 4:13 PM, Mike Collins mike.d.coll...@gmail.comwrote: The behavior I'm talking about is on a locked G1 with 1.5, I did not expect the emulator to be very useful. The behavior on a myTouch (locked, 1.5) is really bizarre. I'm beginning to think that I'm going to pull all the soft keyboard code out and let the user do the extra work. mike -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them.- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to split a screen into two? One running with an application and the other with another application?
Does anyone has an idea of how to split the screen into two? Is it possible for me to run an application in one screen and another app in other screen? That is not presently possible in Android. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.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: OpenGL 2D Game Framework
Yes, the description in Google Code for the project says powerful enough to create a highly polished commercial game. But you can't exactly create a commercial game with code licensed under the GPL, right? On Sep 21, 11:46 am, nEx.Software email.nex.softw...@gmail.com wrote: Dan, that's what I was thinking as well (regarding the GPLv3). On Sep 21, 9:42 am, Dan Sherman impact...@gmail.com wrote: The library looks great (after a few hours of playing with it), definitely has some improvements that could be made, but very well laid out and easy to work with. However, the GPLv3 does make game development a bit of an issue, if the games need to be released as GPLv3 as well... - Dan On Mon, Sep 21, 2009 at 10:53 AM, Andrew Shu talklit...@gmail.com wrote: I noticed on the google code pagehttp://code.google.com/p/rokon/that the license is GPL 3, which means anyone who uses it must open source their app. Richard, have you given some thought to changing the license to something more permissive? Either way, impressive work. Good job. On Sep 21, 10:21 am, pro proka...@gmail.com wrote: Hi Richard, What is the terms conditions for using it? I mean copyright etc... I'm developing some games ( my area of interest is AI type games ), but I might be able to take some fragments of code for animations, placement of objects etc. But for commercial side, I don't want to get into something that has some weired licensing ... No doubt this framework has some very very good stuff that possibly can be used as cutpaste or simply dropping those class definition files ... -pro On Sep 18, 6:08 am, rich...@stickycoding.com rich...@stickycoding.com wrote: I've been working on a game framework for a little while, and while its far from perfect, I've put the current version online. To be honest, I haven't used much OpenGL in the past. Before last week I had never tried using it. If anyone would like to take a look, please do, I'd appreciate all the help possible on speeding it up. There are many features I have in mind and am planning at the minute, but so far it supports: # Texture and Sprite management # Text, using TTF fonts # Organised layers # Two audio management classes, one optimized for music, the other for sound effects # Sprite dynamics (acceleration, terminal velocity, collisions) # Animation # Handlers to manage events fired through movement, animation, screen touches, accelerometer input, device shaking and collisions # Several minor features aimed at speeding development, such as screen settings and vibration The code is athttp://code.google.com/p/rokon/ Again, I'd very much appreciate advice or help with any bugs you can see, thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Problem running on 1.6 SDK.
I found the problem. My view (CheckableRelativeLayout) was inadvertently declared abstract. Apparently this isn't a problem for the 1.5 platform but is a problem for the 1.6 platform. Depending on when carriers release 1.6, this change could cause my app to start acting unreliably before the ADC2 judging is complete. Is there anything that can be done about this? On Sep 21, 2:33 am, Spencer Riddering spen...@leankeen.com wrote: I'm testing my app with the new 1.6 SDK, and I ran into the error below. The InstantiationException doesn't give me much details. I'm wondering if anyone can give me a tip for how to debug this type of situation. Also, if someone could point me to the source for PhoneLayoutInflater I'd appreciate it. Note: This application works well using the 1.5 SDK. I've tested the 1.5 SDK version a lot in preparation for the ADC2. This problem occurs on a 1.6 Platform, HVGA, API Level 4, Google APIs AVD. I'll describe the code a bit, and give the actual lines which are involved. First, I've sub-classed RelativeLayout. I've only dynamically added a view to the layout after inflation is complete. This RelativeLayout sub-class is used in a ListView. Here are the bits that actually do stuff: package com.flingtap.done; public CheckableRelativeLayout(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); try{ TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.CheckableRelativeLayout, defStyle, 0); mRadioButtonResourceId = a.getResourceId (R.styleable.CheckableRelativeLayout_radioButton, 0); if( 0 == mRadioButtonResourceId ){ throw new RuntimeException(You must supply a radioButton attribute.); } a.recycle(); }catch(Exception exp){ Log.e(TAG, ERR00019, exp); } } protected void onFinishInflate() { Log.v(TAG, onFinishInflate() called); super.onFinishInflate(); try{ View radioButtonView = findViewById(mRadioButtonResourceId); assert null != radioButtonView; mRadioButton = (RadioButton) radioButtonView; assert null != mRadioButton; setMinimumHeight(mRadioButton.getHeight()); }catch(Exception exp){ Log.e(TAG, ERR0001A, exp); } } I've put a break point at the first line of both the CheckableRelativeLayout constructor and onFinishInflate method, but neither method seems to be reached. I instantiate this class from an XML layout like so: com.flingtap.done.CheckableRelativeLayout xmlns:android=http://schemas.android.com/apk/res/android; xmlns:app=http://schemas.android.com/apk/res/com.flingtap.done; android:layout_width=fill_parent android:layout_height=?android:attr/listPreferredItemHeight android:drawSelectorOnTop=false app:radioButton=@+id/priority_options_list_item_radio_button android:paddingLeft=6dip android:paddingRight=6dip resources declare-styleable name=CheckableRelativeLayout attr name=radioButton format=reference/ /declare-styleable .. I also added a Java exception breakpoint for InflateException and I get this stack: PhoneLayoutInflater(LayoutInflater).createView(String, String, AttributeSet) line: 516 PhoneLayoutInflater(LayoutInflater).createViewFromTag(String, AttributeSet) line: 564 PhoneLayoutInflater(LayoutInflater).inflate(XmlPullParser, ViewGroup, boolean) line: 385 ... I searched the GIT repository for the PhoneLayoutInflater, but could not find it. Anyone know where I can find the source for this PhoneLayoutInflater? Finally, here is the error: 09-21 00:41:58.154: DEBUG/AndroidRuntime(773): Shutting down VM 09-21 00:41:58.154: WARN/dalvikvm(773): threadid=3: thread exiting with uncaught exception (group=0x4001aa28) 09-21 00:41:58.234: ERROR/AndroidRuntime(773): Uncaught handler: thread main exiting due to uncaught exception 09-21 00:41:58.264: ERROR/AndroidRuntime(773): android.view.InflateException: Binary XML file line #7: Error inflating class java.lang.reflect.Constructor 09-21 00:41:58.264: ERROR/AndroidRuntime(773): at android.view.LayoutInflater.createView(LayoutInflater.java:512) 09-21 00:41:58.264: ERROR/AndroidRuntime(773): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:564) 09-21 00:41:58.264: ERROR/AndroidRuntime(773): at android.view.LayoutInflater.inflate(LayoutInflater.java:385) 09-21 00:41:58.264: ERROR/AndroidRuntime(773): at android.view.LayoutInflater.inflate(LayoutInflater.java:320) 09-21 00:41:58.264: ERROR/AndroidRuntime(773): at com.flingtap.done.LeanAdapter.newView(LeanAdapter.java:48) 09-21 00:41:58.264: ERROR/AndroidRuntime(773): at
[android-developers] Re: is there anything wrong with the function camera.takePicture()???
when i use the Camera class to make a little app to get a bitmap,but when it run,there'll be a problem: . 09-21 12:56:06.913: ERROR/AndroidRuntime(6083): at android.hardware.Camera.takePicture(Camera.java:362) . is anything wrong with this function takePicture(Camera.ShutterCallback shutter, Camera.PictureCallback raw, Camera.PictureCallback jpeg)? That method works, at least on Android 1.5r3 (have not tried on Android 1.6 since I have no Android 1.6 device). -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to force soft keyboard to be visible?
All I can say is the edit contacts activity in the standard platform does this just fine, using the standard API. Either you are doing something different than it, or HTC's IME has some different behavior, but I don't know much about either of those. Do note that normally the system will not show the IME by default if it has to use panning on the target window (instead of resize), and the only way to get around this would be to explicitly show the IME when you receive focus. On Mon, Sep 21, 2009 at 6:13 AM, James W jpbwebs...@gmail.com wrote: I have exactly the same requirement. Running on a Hero, which only has a soft keyboard. The above code is copied exactly, yet it doesnt work. The keyboard is not shown no matter where I put the code, before or after SetContentView(). This seems like a pretty standard thing to want to do, is there some other way of doing this? Thanks in advance.. James On Sep 19, 8:42 am, Dianne Hackborn hack...@android.com wrote: The G1 has a keyboard, so it works as I said -- the IME is not shown by default. This is a policy decision of the platform. On a myTouch, since it doesn't have a keyboard, the IME will be shown by default in various cases (for example when you enter the edit contacts screen) when the app has indicated that is desired with the input options. On Fri, Sep 18, 2009 at 4:13 PM, Mike Collins mike.d.coll...@gmail.com wrote: The behavior I'm talking about is on a locked G1 with 1.5, I did not expect the emulator to be very useful. The behavior on a myTouch (locked, 1.5) is really bizarre. I'm beginning to think that I'm going to pull all the soft keyboard code out and let the user do the extra work. mike -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them.- Hide quoted text - - Show quoted text - -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to force soft keyboard to be visible?
Oh also it doesn't show by default if the IME needs to run in fullscreen (typically because the device is in landscape). Both of these are because showing the IME is these cases is much more disruptive than showing it when the target window can resize nicely to show all of its important UI in conjunction with the IME. On Mon, Sep 21, 2009 at 10:15 AM, Dianne Hackborn hack...@android.comwrote: All I can say is the edit contacts activity in the standard platform does this just fine, using the standard API. Either you are doing something different than it, or HTC's IME has some different behavior, but I don't know much about either of those. Do note that normally the system will not show the IME by default if it has to use panning on the target window (instead of resize), and the only way to get around this would be to explicitly show the IME when you receive focus. On Mon, Sep 21, 2009 at 6:13 AM, James W jpbwebs...@gmail.com wrote: I have exactly the same requirement. Running on a Hero, which only has a soft keyboard. The above code is copied exactly, yet it doesnt work. The keyboard is not shown no matter where I put the code, before or after SetContentView(). This seems like a pretty standard thing to want to do, is there some other way of doing this? Thanks in advance.. James On Sep 19, 8:42 am, Dianne Hackborn hack...@android.com wrote: The G1 has a keyboard, so it works as I said -- the IME is not shown by default. This is a policy decision of the platform. On a myTouch, since it doesn't have a keyboard, the IME will be shown by default in various cases (for example when you enter the edit contacts screen) when the app has indicated that is desired with the input options. On Fri, Sep 18, 2009 at 4:13 PM, Mike Collins mike.d.coll...@gmail.com wrote: The behavior I'm talking about is on a locked G1 with 1.5, I did not expect the emulator to be very useful. The behavior on a myTouch (locked, 1.5) is really bizarre. I'm beginning to think that I'm going to pull all the soft keyboard code out and let the user do the extra work. mike -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them.- Hide quoted text - - Show quoted text - -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Animation
Don't use animations. This is not what they are for. They are for performing transitions between different states of a UI, not for writing game-like interactions. On Mon, Sep 21, 2009 at 1:56 AM, HVT vikramhiman...@gmail.com wrote: Hello All, I'm facing a problem while clicking the objects while they animate. Please help me identify the click on the objects while they are animating. My requirement is to randomly move a ball around the screen and the user should be able to click this ball any time. Also this ball changes colours. For this is i have 3 different images of different colours and I want to create a frame by frame animation between them while they are animating. This makes it 2 animations at a time. a frame-by-frame animated image/ object has to animated may be a /translate animation and this should be click able. Please help me fix this. I have stuck on this part for almost over a month now. Thanks, HVT -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] fit text on 1 line
Hey, I am working on a project and i need to fit a text (string) on line at a textView. I know I can work with maxLines but if the text does not fit the view, it has to end with ... so for example directed by brad pitt an... So can users see that it is not the end of the text they are seeing but that there is more ;) How can I do that? Thanx, Wouter --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: OpenGL 2D Game Framework
You can technically. Nothing prevents your from selling the game you make, you do have to release all of the source however, which makes doing anything that you might want hidden (network protocols, etc) a bit tougher. :) - Dan On Mon, Sep 21, 2009 at 1:07 PM, polyclefsoftware dja...@gmail.com wrote: Yes, the description in Google Code for the project says powerful enough to create a highly polished commercial game. But you can't exactly create a commercial game with code licensed under the GPL, right? On Sep 21, 11:46 am, nEx.Software email.nex.softw...@gmail.com wrote: Dan, that's what I was thinking as well (regarding the GPLv3). On Sep 21, 9:42 am, Dan Sherman impact...@gmail.com wrote: The library looks great (after a few hours of playing with it), definitely has some improvements that could be made, but very well laid out and easy to work with. However, the GPLv3 does make game development a bit of an issue, if the games need to be released as GPLv3 as well... - Dan On Mon, Sep 21, 2009 at 10:53 AM, Andrew Shu talklit...@gmail.com wrote: I noticed on the google code pagehttp://code.google.com/p/rokon/that the license is GPL 3, which means anyone who uses it must open source their app. Richard, have you given some thought to changing the license to something more permissive? Either way, impressive work. Good job. On Sep 21, 10:21 am, pro proka...@gmail.com wrote: Hi Richard, What is the terms conditions for using it? I mean copyright etc... I'm developing some games ( my area of interest is AI type games ), but I might be able to take some fragments of code for animations, placement of objects etc. But for commercial side, I don't want to get into something that has some weired licensing ... No doubt this framework has some very very good stuff that possibly can be used as cutpaste or simply dropping those class definition files ... -pro On Sep 18, 6:08 am, rich...@stickycoding.com rich...@stickycoding.com wrote: I've been working on a game framework for a little while, and while its far from perfect, I've put the current version online. To be honest, I haven't used much OpenGL in the past. Before last week I had never tried using it. If anyone would like to take a look, please do, I'd appreciate all the help possible on speeding it up. There are many features I have in mind and am planning at the minute, but so far it supports: # Texture and Sprite management # Text, using TTF fonts # Organised layers # Two audio management classes, one optimized for music, the other for sound effects # Sprite dynamics (acceleration, terminal velocity, collisions) # Animation # Handlers to manage events fired through movement, animation, screen touches, accelerometer input, device shaking and collisions # Several minor features aimed at speeding development, such as screen settings and vibration The code is athttp://code.google.com/p/rokon/ Again, I'd very much appreciate advice or help with any bugs you can see, thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Android 1.6 SDK is here!
I am personally pretty opposed to including source in the formal -SDK- for a couple reasons: 1. The source is not documentation. You should be coding your application against the SDK specification in the documentation, not whatever some current implementation is in the platform. 2. Yes, the documentation can be improved. It is important to get feedback on where the pain points are in the documentation, rather than providing source code to cover up those problems. On Mon, Sep 21, 2009 at 8:36 AM, Eric M. Burke burke.e...@gmail.com wrote: I do understand that sources are available at source.android.com, but it would save people time if a src JAR were bundled with the SDK download. http://code.google.com/p/android/issues/detail?id=979 This seems like a reasonable request. I know I've personally spent many hours on previous SDKs trying to learn how to check out the source and configure it properly in Eclipse. On Sep 16, 1:15 am, Romain Guy romain...@google.com wrote: Guys, is there any particular reason for you not to include sources in 1.6 as well? Sources are available at source.android.com. -- Romain Guy Android framework engineer romain...@android.com -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: fit text on 1 line
Hey, I am working on a project and i need to fit a text (string) on line at a textView. I know I can work with maxLines but if the text does not fit the view, it has to end with ... so for example directed by brad pitt an... So can users see that it is not the end of the text they are seeing but that there is more ;) android:ellipsize=end at least used to work for this... -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.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: webview crashes
i'm also seeing some occasional WebView crashes with multiple views up. seems to have calmed down without any code changes from me. my app contains a regular ListView which has a dynamic number of WebViews in it depending on various factors. most of the time it works splendidly, and WebView even tells the layout manager when it's changing size, so i don't have to guess. points there! but every now and again.. bang. hi all, I'm getting fairly regular crashes using WebView's in the underlying C code (sigsegv's). There isn't a _whole_ lot of rhyme or reason to it, but one thing that is somewhat suspicious is that I have more than one webview active (only one is one the screen at any one time, but if this has anything to do with my problem it may not matter since it appears that webkit widgets run asynchronously from the main UI thread). Here's the stack dump. I've looked through the archives and it appears that there are other dumps, but it's really hard to tell from my vantagepoint whether they have anything to do with one another. This is pretty easily reproducible (especially with one particular url of mine) so it should be relatively easy to track down. Thanks, Mike I/DEBUG ( 32): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** I/DEBUG ( 32): Build fingerprint: 'tmobile/kila/dream/trout:1.5/CRC1/150275:user/ota-rel-keys,release-keys' I/DEBUG ( 32): pid: 911, tid: 922 com.phresheez.phresheez I/DEBUG ( 32): signal 11 (SIGSEGV), fault addr 000c I/DEBUG ( 32): r0 445d986c r1 445d9998 r2 445d9998 r3 00534318 I/DEBUG ( 32): r4 r5 004548c8 r6 445d9998 r7 007f I/DEBUG ( 32): r8 445d9da0 r9 41046e18 10 41046e04 fp 0001 I/DEBUG ( 32): ip aa3dbb38 sp 445d97f0 lr aa181c7b pc aa0bdd48 cpsr 2030 W/InputManagerService( 59): Window already focused, ignoring focus gain of: com.android.internal.view.iinputmethodclient$stub$pr...@432ca120 I/DEBUG ( 32): #00 pc 000bdd48 /system/lib/libwebcore.so I/DEBUG ( 32): #01 pc 00181c78 /system/lib/libwebcore.so I/DEBUG ( 32): #02 pc 00182c56 /system/lib/libwebcore.so I/DEBUG ( 32): #03 pc 0018e66e /system/lib/libwebcore.so I/DEBUG ( 32): #04 pc 0018ba62 /system/lib/libwebcore.so I/DEBUG ( 32): #05 pc 0018c0d0 /system/lib/libwebcore.so I/DEBUG ( 32): #06 pc 0018c7ae /system/lib/libwebcore.so I/DEBUG ( 32): #07 pc 0017de08 /system/lib/libwebcore.so I/DEBUG ( 32): #08 pc 00180402 /system/lib/libwebcore.so I/DEBUG ( 32): #09 pc 001853ce /system/lib/libwebcore.so I/DEBUG ( 32): #10 pc 0018540c /system/lib/libwebcore.so I/DEBUG ( 32): #11 pc 00186146 /system/lib/libwebcore.so I/DEBUG ( 32): #12 pc 00186408 /system/lib/libwebcore.so I/DEBUG ( 32): #13 pc 001867d6 /system/lib/libwebcore.so I/DEBUG ( 32): #14 pc 00186832 /system/lib/libwebcore.so I/DEBUG ( 32): #15 pc 00186874 /system/lib/libwebcore.so I/DEBUG ( 32): #16 pc 00259d04 /system/lib/libwebcore.so I/DEBUG ( 32): #17 pc e3b4 /system/lib/libdvm.so I/DEBUG ( 32): #18 pc 00040a8a /system/lib/libdvm.so I/DEBUG ( 32): #19 pc 00013118 /system/lib/libdvm.so I/DEBUG ( 32): #20 pc 00017b1c /system/lib/libdvm.so I/DEBUG ( 32): #21 pc 00017560 /system/lib/libdvm.so I/DEBUG ( 32): #22 pc 000520ec /system/lib/libdvm.so I/DEBUG ( 32): #23 pc 0005210a /system/lib/libdvm.so I/DEBUG ( 32): #24 pc 00047144 /system/lib/libdvm.so I/DEBUG ( 32): #25 pc f880 /system/lib/libc.so I/DEBUG ( 32): #26 pc f3f4 /system/lib/libc.so I/DEBUG ( 32): stack: I/DEBUG ( 32): 445d97b0 005574c0 [heap] I/DEBUG ( 32): 445d97b4 003f I/DEBUG ( 32): 445d97b8 I/DEBUG ( 32): 445d97bc a9a9a475 I/DEBUG ( 32): 445d97c0 001a6d30 [heap] I/DEBUG ( 32): 445d97c4 aa1e37b1 /system/lib/libwebcore.so I/DEBUG ( 32): 445d97c8 445d9814 I/DEBUG ( 32): 445d97cc aa1e41b9 /system/lib/libwebcore.so I/DEBUG ( 32): 445d97d0 445d97d8 I/DEBUG ( 32): 445d97d4 aa1dec3d /system/lib/libwebcore.so I/DEBUG ( 32): 445d97d8 aa3db598 I/DEBUG ( 32): 445d97dc 445d9824 I/DEBUG ( 32): 445d97e0 00557620 [heap] I/DEBUG ( 32): 445d97e4 aa1dee0d /system/lib/libwebcore.so I/DEBUG ( 32): 445d97e8 df002777 I/DEBUG ( 32): 445d97ec e3a070ad I/DEBUG ( 32): #00 445d97f0 445d9da0 I/DEBUG ( 32): 445d97f4 aa3db598 I/DEBUG ( 32): 445d97f8 aa3db598 I/DEBUG ( 32): 445d97fc 445d9998 I/DEBUG ( 32): 445d9800 445d9998 I/DEBUG ( 32): 445d9804 445d986c I/DEBUG ( 32): 445d9808 0003 I/DEBUG
[android-developers] Re: Please help me !
we have this thing called Google now. a simple search led me to this article -- http://developer.android.com/guide/tutorials/views/hello-mapview.html -- which was enough for me to get Maps and Overlays going. hth I want to display a overlay in maps ( as Overlay of MyLocation - The circle which can flash ). How to do ? Thanks in advance. -- jason.vp.engineering.particle --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---