[android-developers] is the setStyle Method or similar available now..or still it is status quo?
Can i set a style from one TextView to another? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Alaram Manager after 5 min
gotcha, tx RK On Sat, Jul 7, 2012 at 11:31 AM, TreKing treking...@gmail.com wrote: On Fri, Jul 6, 2012 at 5:21 AM, Rahul Kaushik rahulkaushi...@gmail.comwrote: I need to call AlarmReceiver Call after evry 5 min but it is getting caaled after every sec pls tell wt am doing wrong You are not calculating 5 minutes in milliseconds correctly. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] java.lang.nullpointerexception in ServerSocket.accept()
I am trying to receive images over a network, I set up a server as follows ... public class IServerActivity extends Activity { ServerSocket ss = null; Bitmap bp ; Thread myCommsThread = null; protected static final int MSG_ID = 0x1337; public static final int SERVERPORT = 6000; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); //TextView tv = (TextView) findViewById(R.id.TextView01); this.myCommsThread = new Thread(new CommsThread()); this.myCommsThread.start(); } @Override protected void onStop() { super.onStop(); try { // make sure you close the socket upon exiting ss.close(); } catch (IOException e) { e.printStackTrace(); } } Handler myUpdateHandler = new Handler() { public void handleMessage(Message msg) { switch (msg.what) { case MSG_ID: ImageView iv = (ImageView) findViewById(R.id.imageView01); iv.setImageBitmap(bp);; break; default: break; } super.handleMessage(msg); } }; class CommsThread implements Runnable { public void run() { Socket s = null; try { ss = new ServerSocket(SERVERPORT ); } catch (IOException e) { e.printStackTrace(); } while (!Thread.currentThread().isInterrupted()) { Message m = new Message(); m.what = MSG_ID; try { if (s == null) s = ss.accept(); bp= BitmapFactory.decodeStream(s.getInputStream()); myUpdateHandler.sendMessage(m); } catch (IOException e) { e.printStackTrace(); } } } } But it shows an error at runtime java.lang.NullPointerException E/AndroidRuntime(3047):atExample.IServer.IServerActivity$CommsThread.run(IServerActivity.java:68) It shows null pointer exception at *s=ss.accept();* line. please help I don't know what is going wrong. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] is the setStyle Method or similar available now..or still it is status quo?
No the style needs to be supplied when the view is constructed; I don't expect this to change any time soon. On Sun, Jul 8, 2012 at 11:17 PM, maccoy maccoy2...@gmail.com wrote: Can i set a style from one TextView to another? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] is the setStyle Method or similar available now..or still it is status quo?
Hi What you're saying? Button style=@style/MyButton android:id=@+id/button1 android:text=Button01 android:layout_width=wrap_content android:layout_height=wrap_content/Button 2012/7/9 Dianne Hackborn hack...@android.com: No the style needs to be supplied when the view is constructed; I don't expect this to change any time soon. On Sun, Jul 8, 2012 at 11:17 PM, maccoy maccoy2...@gmail.com wrote: Can i set a style from one TextView to another? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to encrypt a username and password ?
Your question is about programming in general. Anyway, this might be a starting point for you: http://developer.android.com/reference/java/security/interfaces/package-summary.html BTW, it's a very bad practice to store the username and password locally. You should store them on your server instead. - Ali Chousein https://play.google.com/store/apps/details?id=com.apps.social_nav https://play.google.com/store/apps/details?id=com.apps.weather_buddy http://www.paygol.com/android/implementation On Monday, July 9, 2012 6:21:31 AM UTC+2, mohammed Nuhail wrote: I am doing chat Application in Android... I have to encrypt and decrypt username and password and stored it in database. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: [ASK] about get location using GPS
You can use the DDMS for sending mock location information to your emulator. Alternatively you can use the command line. Issue the following commands: 1. telnet localhost 5554 (5554 is the port number of the emulator. You can see this on the top left corver of the emulator. If you have multiple emulators running, their port numbers are going to be 5554, 5556, 5558, etc etc) 2. geo fix longitude latitude altitude (The altitude above is optional, you can skip it if you want) Hope it helps. - Ali Chousein https://play.google.com/store/apps/details?id=com.apps.social_nav https://play.google.com/store/apps/details?id=com.apps.weather_buddy http://www.paygol.com/android/implementation On Monday, July 9, 2012 5:53:55 AM UTC+2, Alfa wrote: it's work fine. thanks. i just cant use gps on emulator. cos i dont know about emulator control. when i set the location use emulator control, it works fine. thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How to encrypt a username and password ?
yea man i mean to say that only i am storing in the server. thanks!! On Mon, Jul 9, 2012 at 1:26 PM, Ali Chousein ali.chous...@gmail.com wrote: Your question is about programming in general. Anyway, this might be a starting point for you: http://developer.android.com/reference/java/security/interfaces/package-summary.html BTW, it's a very bad practice to store the username and password locally. You should store them on your server instead. - Ali Chousein https://play.google.com/store/apps/details?id=com.apps.social_nav https://play.google.com/store/apps/details?id=com.apps.weather_buddy http://www.paygol.com/android/implementation On Monday, July 9, 2012 6:21:31 AM UTC+2, mohammed Nuhail wrote: I am doing chat Application in Android... I have to encrypt and decrypt username and password and stored it in database. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Lock orientation once the app started?
Yes, one approach is to do it using android:screenOrientation=portrait|landscape in the manifest. Once I wrote a short blog sharing my experiences on how to handle screen orientation. This approach is also explained in it: http://android-screen-layout.blogspot.be/ - Ali Chousein https://play.google.com/store/apps/details?id=com.apps.social_nav https://play.google.com/store/apps/details?id=com.apps.weather_buddy http://www.paygol.com/android/implementation On Monday, July 9, 2012 5:24:11 AM UTC+2, limtc wrote: Is it possible to allow the app to start in either landscape or portrait, but ONCE the app started does not allow rotation? 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 add date and time on captured image
Hi all, I have used this code print date and time on image. but not working pls help on this . ExifInterface exif = new ExifInterface(filename); exif.setAttribute(ExifInterface.TAG_DATETIME, (new Date(System.currentTimeMillis())).toString()); exif.saveAttributes(); -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] ViewFlipper
hi, This is my logic, switch (vf.getCurrentView().getId()) { case R.id.LinearLayout03: if (v == next) { vf.showNext(); } break; case R.id.LinearLayout04: if (v == next) { vf.showNext(); } else if (v == previous) { vf.showPrevious(); } break; case R.id.LinearLayout05: if (v == next) { vf.showNext(); } else if (v == previous) { vf.showPrevious(); } break; On Sun, Jul 8, 2012 at 9:09 PM, Narendra Singh Rathore nsr.curi...@gmail.com wrote: On Sun, Jul 8, 2012 at 3:31 PM, chandur mani chandur.ind...@gmail.comwrote: Thanks to all. I got it , through my logical itself. Ok Chandur, thats good. Will you please tell us how did you do 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Issues extending ListView in Android
Guys, thank you for clarification, I really appreciate it. But what about protected methods: protected void attachViewToParent(View child, int index, LayoutParams params) protected boolean addViewInLayout(View child, int index, LayoutParams params, boolean preventRequestLayout) they are not marked as final, still I can't override them. Thank you, Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] what is the layout of google+ app?
i want build something like that. i need a main feed, and a slide menu on the left that will change the main screen. it's need to work on android 2.1 to 4.1 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] unable to open the local database in android
I have service in android,from that service i started an activity.I called the method inside the activity from service.In that method,i open the database and tried to insert the values.Without using database,its working fine.But my app getting force closed when i used database plugin(java file)--service--Activity(here i try to insert the data in database) **service.java** public class MyService extends Service { @Override public IBinder onBind(Intent intent) { return null; } @Override public void onCreate() { Log.d(TAG, onCreate); } @Override public void onDestroy() { Log.d(TAG, onDestroy); } public void onStart(Intent intent, int startid) { Timer mTimer = new Timer(user); mTimer.scheduleAtFixedRate(new mainTask(), 5000,6);//1 hour=3600 s } private class mainTask extends TimerTask { public void run() { toastHandler.sendEmptyMessage(0); } } private final Handler toastHandler = new Handler() { public void handleMessage(Message msg) { StorageHelper s=new StorageHelper(); String a= s.UpdateValues(userid); } }; } **Activity.java** public class StorageHelper extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } public String UpdateValues(int userid) { try { DBAdapter1 database=new DBAdapter1(this); database.open(); long id=database.insert(71,4,yes); database.close(); } catch (SQLException e) { } return success; } } **Note** when i open the database in oncreate its working,But inside the updatavalues() database cannot open to insert. try { DBAdapter1 database=new DBAdapter1(this); database.open(); long id=database.insert(71,4,yes); database.close(); } catch (SQLException e) { } i got two type of force close Error number 1 07-09 15:16:27.859: E/AndroidRuntime(1211): FATAL EXCEPTION: main 07-09 15:16:27.859: E/AndroidRuntime(1211): java.lang.NullPointerException 07-09 15:16:27.859: E/AndroidRuntime(1211): at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java: 203) 07-09 15:16:27.859: E/AndroidRuntime(1211): at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java: 98) 07-09 15:16:27.859: E/AndroidRuntime(1211): at com.app.mobilyzer.DBAdapter1.open(DBAdapter1.java:68) 07-09 15:16:27.859: E/AndroidRuntime(1211): at com.app.mobilyzer.StorageHelper.UpdateValues(StorageHelper.java:33) 07-09 15:16:27.859: E/AndroidRuntime(1211): at com.app.mobilyzer.MyService$1.handleMessage(MyService.java:121) 07-09 15:16:27.859: E/AndroidRuntime(1211): at android.os.Handler.dispatchMessage(Handler.java:99) 07-09 15:16:27.859: E/AndroidRuntime(1211): at android.os.Looper.loop(Looper.java:123) 07-09 15:16:27.859: E/AndroidRuntime(1211): at android.app.ActivityThread.main(ActivityThread.java:4627) 07-09 15:16:27.859: E/AndroidRuntime(1211): at java.lang.reflect.Method.invokeNative(Native Method) 07-09 15:16:27.859: E/AndroidRuntime(1211): at java.lang.reflect.Method.invoke(Method.java:521) 07-09 15:16:27.859: E/AndroidRuntime(1211): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:868) 07-09 15:16:27.859: E/AndroidRuntime(1211): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 07-09 15:16:27.859: E/AndroidRuntime(1211): at dalvik.system.NativeStart.main(Native Method) Error number 2 07-09 15:16:36.889: E/AndroidRuntime(1237): FATAL EXCEPTION: main 07-09 15:16:36.889: E/AndroidRuntime(1237): java.lang.RuntimeException: Unable to start service com.app.mobilyzer.MyService@44fc6280 with null: java.lang.NullPointerException 07-09 15:16:36.889: E/AndroidRuntime(1237): at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3063) 07-09 15:16:36.889: E/AndroidRuntime(1237): at android.app.ActivityThread.access$3600(ActivityThread.java:125) 07-09 15:16:36.889: E/AndroidRuntime(1237): at
Re: [android-developers] Re: Lock orientation once the app started?
Ya it is right...you have to put android:screenOrientation=portrait|landlandscape in each activity... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Media Player full screen like youtube
Hi, I am not looking for making the screen to full screen. I am looking for video toggle between fullscreen and normal screen like youtube. On Fri, Jul 6, 2012 at 12:11 PM, TreKing treking...@gmail.com wrote: On Fri, Jul 6, 2012 at 12:24 AM, master revanth.andr...@gmail.com wrote: I there any API to make full screen mediaplayer. Try this first: http://lmgtfy.com/?q=android+set+fullscreen - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Calender view
How To get calender view ? Thanks Jagadeesh -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Lock orientation once the app started?
Actually, that won't work. This is because we do not know what orientation is in when the app started. My current solution is to detect what orientation it is in, then setRequestedOrientation to the current orientation. This works nicely. 在 2012年7月9日星期一UTC+8下午7时14分20秒,abhijeet tomar写道: Ya it is right...you have to put android:screenOrientation=portrait|landlandscape in each activity... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Lock orientation once the app started?
My original reply was deleted by someone, not sure why. But anyway, that won't work. This is because we do not know what orientation is in when the app started. My solution is to detect res.getConfiguration().orientation, then setRequestedOrientation to the current orientation. This works nicely. It can works in both orientations, and once the app started, the orientation won't changed. 在 2012年7月9日星期一UTC+8下午4时10分45秒,Ali Chousein写道: Yes, one approach is to do it using android:screenOrientation=portrait|landscape in the manifest. Once I wrote a short blog sharing my experiences on how to handle screen orientation. This approach is also explained in it: http://android-screen-layout.blogspot.be/ - Ali Chousein https://play.google.com/store/apps/details?id=com.apps.social_nav https://play.google.com/store/apps/details?id=com.apps.weather_buddy http://www.paygol.com/android/implementation On Monday, July 9, 2012 5:24:11 AM UTC+2, limtc wrote: Is it possible to allow the app to start in either landscape or portrait, but ONCE the app started does not allow rotation? 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] Android vs. Everyone: Live! July 12!
At last month's It's really time to get serious about PhoneGap meeting, hosted by our sister group All Things Mobile, I threw down the gauntlet: build a tip calculator in your respective platform to induce dialog about its merits. They have willing participants for iOS, Windows Mobile and PhoneGap. I will be carrying the mantle for Android. This should create some interesting compare and contrast discussion. Come help represent the green! Viva-la-Android! Details At: http://www.meetup.com/cincy-android/events/71138762/ Bill Mote -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] creating Bitmap from pixel data *without* copying the data
Hello, I have a bunch of pixel data in an int[] that I want to turn into a Bitmap instance. The problem is, the pixel data is so big it barely fits into memory. I thought it would be no problem, surely I can pass the int[] to a Bitmap factory method which simply wraps it in a Bitmap instance. Unfortunately, this does not seem to be the case - createBitmap(int[] colors, int width, int height, Bitmap.Config config) seems to allocate its own int[] and copy the passed in int[] into it, which fails if there is no memory for another copy. I simply need to turn the image stored in the int[] to a .png on external storage so actually any of the following would be good enough for me: - as mentioned above, a way to create a Bitmap so that it doesn't try to allocate another useless copy of the data - an accessor on Bitmap to return the Bitmap's pixel store as an int[] (that way I wouldn't have to allocate my own int[] and would be able to write directly into the Bitmap-owned memory) - a way of accessing (an equivalent of) Bitmap.compress() functionality without having a Bitmap Amazingly, none of the above seems to be available! Bitmaps tend to be large objects in memory, surely there must be ways to handle them in a memory-efficient manner... Cheers! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Testing Android inapp subscription: You already own this subscription
I am testing Android inapp subscription with a test account, after I entered a real credit card to buy, the subscription is ok, but I cannot find the token in the json response. So in the developer console, I cancelled the order, when I try to re-subscribe again, it now show me the alert You already own this subscription. When I click the Detail in the box, it opened the Play Store app, but showing Item not found Anyone experienced this error before? 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: creating Bitmap from pixel data *without* copying the data
Bitmap behaves like that because it allocates memory on the native heap for storing its bitmap data, meaning: it cannot use your Java int array and must make a copy instead. For getting around that problem you should reconsider what you are doing. Try to break your big (memory) problem into several smaller sub-problems. I don't know where your pixel int array originally comes from, but at some point you must have it either loaded from somewhere or constructed. You could instead operate directly on an already allocated Bitmap object and modify its pixel data instead of having you int array as a step in between. So if you are loading your int array from a file for example, just apply that data directly to the Bitmap. If that array is constructed by your code, then change the algorithm to store its calculations directly in the Bitmap object. But maybe you do not need a Bitmap object at all. If you want to draw on a Canvas object, then you could make use of the following method instead, which takes a Java int array as argument: canvas.drawBitmap (int[] colors, int offset, int stride, float x, float y, int width, int height, boolean hasAlpha, Paint paint)http://developer.android.com/reference/android/graphics/Canvas.html#drawBitmap%28int[],%20int,%20int,%20float,%20float,%20int,%20int,%20boolean,%20android.graphics.Paint%29 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Calender view
What do you mean with how to get? Beginning with API level 11 you can use: http://developer.android.com/reference/android/widget/CalendarView.html For earlier versions: http://code.google.com/p/android-calendar-view/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: unable to open the local database in android
I think that's hard to tell without knowing what your class DbAdapter1 does in its constructor and open method. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: creating Bitmap from pixel data *without* copying the data
On Mon, Jul 9, 2012 at 4:53 PM, Nobu Games dev.nobu.ga...@gmail.com wrote: Bitmap behaves like that because it allocates memory on the native heap for storing its bitmap data, meaning: it cannot use your Java int array and must make a copy instead. One thing though that puzzles me about this is, there have been discussions indicating that the native Bitmap memory doesn't count towards an application's heap limit (I think someone from Google mentioned it too at last year's I/O?). However, I'm still getting OOM, and I'm pretty sure it my app's heap limit and not the lack of RAM in the device that I'm having trouble with (the device is HTC Desire with pretty much nothing else running on it so there should be plenty of RAM available to the OS). I wouldn't mind the copy if it didn't contribute to my app's heap size... For getting around that problem you should reconsider what you are doing. Try to break your big (memory) problem into several smaller sub-problems. I tried to approach it like that but the ultimate goal is a .png stored on internal/external storage. It's mainly the encoding-into-PNG step that I don't know how to handle in a piecemeal fashion. I'm no PNG expert but I think that in order to produce a .png file, all image data that are supposed to go into it need to be in-core at the same time. I don't know where your pixel int array originally comes from, but at some point you must have it either loaded from somewhere or constructed. It's read in from a GL ES off-screen rendering surface. You could instead operate directly on an already allocated Bitmap object and modify its pixel data instead of having you int array as a step in between. That's the only way I see at this point to achieve the goal at all - I'd *love* to avoid this though as we're discussing image resolutions like 2400x1440 here - filling each of those pixels by calling setPixel() on it is going to take forever (and that adds to the fact that off-screen rendering in ES 1.1 doesn't seem to be fast by itself). That's why I wanted an int[], so that I can do bulk blits. So if you are loading your int array from a file for example, just apply that data directly to the Bitmap. As an ugly work-around, I considered taking my int[], writing it out to a file and releasing its memory. Then use one of the decodeBitmap() functions to turn the file into a Bitmap. Not sure though if decodeBitmap() handles raw pixel data, or if it insists on a PNG, JPEG or similar. Thanks for your reply! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: creating Bitmap from pixel data *without* copying the data
I had to work on a bitmap intensive app last year and ran into all these problems. First of all, you are right. You can allocate almost whatever native heap you want. On our test devices it was almost up to a GB for example. No matter what Google says, by my own and obviously your observation bitmaps behave differently though. I was curious and just looked up the source code for the native pixel data allocation. It looks like a method called GraphicsJNI::allocateJavaPixelRefhttp://source-android.frandroid.com/frameworks/base/core/jni/android/graphics/Graphics.cppis to blame for that. Allocation is not really completely done in native heap, but Java memory is being requested via the JNI method NewByteArray. As far as I know that allocated array resides on the native heap until it is released and copied back to Java. That probably only happens when you alter the pixel data from Java. Which means that the get and setPixel methods must be really slow because in worst case they can cause heavy copy operations between JVM and native code for each access. In any case, allocation of bitmaps does depend on the available Java heap space, even though that space is not necessarily claimed when your Java code does not access the raw pixel data. The only other option that comes to my mind for speeding up things would be writing some NDK code and using a PNG library for encoding the pixel data in native code. Passing that int array to that native code is straightforward. With a trick you can even access the original Java int array directly without waiting for a copy. This is possible with the JNI function GetPrimitiveArrayCriticalhttp://docs.oracle.com/javase/1.4.2/docs/guide/jni/jni-12.html#GetPrimitiveArrayCritical. There is no guarantee, though that direct access works in any case. The documentation of that function explains the limits pretty well. On Monday, July 9, 2012 10:26:57 AM UTC-5, Latimerius wrote: On Mon, Jul 9, 2012 at 4:53 PM, Nobu Games dev.nobu.ga...@gmail.com wrote: Bitmap behaves like that because it allocates memory on the native heap for storing its bitmap data, meaning: it cannot use your Java int array and must make a copy instead. One thing though that puzzles me about this is, there have been discussions indicating that the native Bitmap memory doesn't count towards an application's heap limit (I think someone from Google mentioned it too at last year's I/O?). However, I'm still getting OOM, and I'm pretty sure it my app's heap limit and not the lack of RAM in the device that I'm having trouble with (the device is HTC Desire with pretty much nothing else running on it so there should be plenty of RAM available to the OS). I wouldn't mind the copy if it didn't contribute to my app's heap size... For getting around that problem you should reconsider what you are doing. Try to break your big (memory) problem into several smaller sub-problems. I tried to approach it like that but the ultimate goal is a .png stored on internal/external storage. It's mainly the encoding-into-PNG step that I don't know how to handle in a piecemeal fashion. I'm no PNG expert but I think that in order to produce a .png file, all image data that are supposed to go into it need to be in-core at the same time. I don't know where your pixel int array originally comes from, but at some point you must have it either loaded from somewhere or constructed. It's read in from a GL ES off-screen rendering surface. You could instead operate directly on an already allocated Bitmap object and modify its pixel data instead of having you int array as a step in between. That's the only way I see at this point to achieve the goal at all - I'd *love* to avoid this though as we're discussing image resolutions like 2400x1440 here - filling each of those pixels by calling setPixel() on it is going to take forever (and that adds to the fact that off-screen rendering in ES 1.1 doesn't seem to be fast by itself). That's why I wanted an int[], so that I can do bulk blits. So if you are loading your int array from a file for example, just apply that data directly to the Bitmap. As an ugly work-around, I considered taking my int[], writing it out to a file and releasing its memory. Then use one of the decodeBitmap() functions to turn the file into a Bitmap. Not sure though if decodeBitmap() handles raw pixel data, or if it insists on a PNG, JPEG or similar. Thanks for your reply! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: creating Bitmap from pixel data *without* copying the data
Bitmap allocations always count towards your heap limit. Until Android 3.0, Bitmaps were allocated on the native heap but counted against your maximum Dalvik heap. Starting with Android 3.0, Bitmaps are allocated directly on the native heap. On Mon, Jul 9, 2012 at 8:26 AM, Latimerius l4t1m3r...@googlemail.comwrote: On Mon, Jul 9, 2012 at 4:53 PM, Nobu Games dev.nobu.ga...@gmail.com wrote: Bitmap behaves like that because it allocates memory on the native heap for storing its bitmap data, meaning: it cannot use your Java int array and must make a copy instead. One thing though that puzzles me about this is, there have been discussions indicating that the native Bitmap memory doesn't count towards an application's heap limit (I think someone from Google mentioned it too at last year's I/O?). However, I'm still getting OOM, and I'm pretty sure it my app's heap limit and not the lack of RAM in the device that I'm having trouble with (the device is HTC Desire with pretty much nothing else running on it so there should be plenty of RAM available to the OS). I wouldn't mind the copy if it didn't contribute to my app's heap size... For getting around that problem you should reconsider what you are doing. Try to break your big (memory) problem into several smaller sub-problems. I tried to approach it like that but the ultimate goal is a .png stored on internal/external storage. It's mainly the encoding-into-PNG step that I don't know how to handle in a piecemeal fashion. I'm no PNG expert but I think that in order to produce a .png file, all image data that are supposed to go into it need to be in-core at the same time. I don't know where your pixel int array originally comes from, but at some point you must have it either loaded from somewhere or constructed. It's read in from a GL ES off-screen rendering surface. You could instead operate directly on an already allocated Bitmap object and modify its pixel data instead of having you int array as a step in between. That's the only way I see at this point to achieve the goal at all - I'd *love* to avoid this though as we're discussing image resolutions like 2400x1440 here - filling each of those pixels by calling setPixel() on it is going to take forever (and that adds to the fact that off-screen rendering in ES 1.1 doesn't seem to be fast by itself). That's why I wanted an int[], so that I can do bulk blits. So if you are loading your int array from a file for example, just apply that data directly to the Bitmap. As an ugly work-around, I considered taking my int[], writing it out to a file and releasing its memory. Then use one of the decodeBitmap() functions to turn the file into a Bitmap. Not sure though if decodeBitmap() handles raw pixel data, or if it insists on a PNG, JPEG or similar. Thanks for your reply! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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] Re: Lock orientation once the app started?
Can any of you who implemented that approach give me an example when and how this is wanted or useful? I don't mean that as a criticism. I'm just wondering why to give the user control over the orientation just on Activity startup and not beyond. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Lock orientation once the app started?
This method has a problem in Android 2.2 which cannot detect the difference between portrait and reverse portrait, for example. Later versions of Android maybe OK with it though. On Jul 9, 8:10 am, limtc thyech...@gmail.com wrote: My original reply was deleted by someone, not sure why. But anyway, that won't work. This is because we do not know what orientation is in when the app started. My solution is to detect res.getConfiguration().orientation, then setRequestedOrientation to the current orientation. This works nicely. It can works in both orientations, and once the app started, the orientation won't changed. 在 2012年7月9日星期一UTC+8下午4时10分45秒,Ali Chousein写道: Yes, one approach is to do it using android:screenOrientation=portrait|landscape in the manifest. Once I wrote a short blog sharing my experiences on how to handle screen orientation. This approach is also explained in it: http://android-screen-layout.blogspot.be/ - Ali Chousein https://play.google.com/store/apps/details?id=com.apps.social_nav https://play.google.com/store/apps/details?id=com.apps.weather_buddy http://www.paygol.com/android/implementation On Monday, July 9, 2012 5:24:11 AM UTC+2, limtc wrote: Is it possible to allow the app to start in either landscape or portrait, but ONCE the app started does not allow rotation? Thanks! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: creating Bitmap from pixel data *without* copying the data
On Mon, Jul 9, 2012 at 6:17 PM, Romain Guy romain...@android.com wrote: Bitmap allocations always count towards your heap limit. Until Android 3.0, Bitmaps were allocated on the native heap but counted against your maximum Dalvik heap. Starting with Android 3.0, Bitmaps are allocated directly on the native heap. Cool, so now we now why I'm running OOM. However, what are the best practices handling Bitmap data that don't fit into memory twice? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: creating Bitmap from pixel data *without* copying the data
On Mon, Jul 9, 2012 at 6:16 PM, Nobu Games dev.nobu.ga...@gmail.com wrote: As far as I know that allocated array resides on the native heap until it is released and copied back to Java. That probably only happens when you alter the pixel data from Java. Which means that the get and setPixel methods must be really slow because in worst case they can cause heavy copy operations between JVM and native code for each access. I tried in the meantime to fill my large Bitmap by calling setPixel() on each of its pixels and the running time is in the order of tens seconds. The only other option that comes to my mind for speeding up things would be writing some NDK code and using a PNG library for encoding the pixel data in native code. Passing that int array to that native code is straightforward. With a trick you can even access the original Java int array directly without waiting for a copy. This is possible with the JNI function GetPrimitiveArrayCritical. There is no guarantee, though that direct access works in any case. The documentation of that function explains the limits pretty well. I don't use NDK in this app, was meant to be pure Java, however as there are other (performance) problems with bulk GL data handling that apparently cannot be solved without native code, I might consider NDK as well. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 do users find new apps?
In the old Android Market store, uploading a new app would automatically show up in the Just In tab. In the new Google Play Store, it seems that they have removed this tab and replaced it with Top apps only. I'm wondering how developers nowadays are suppose to get *organic *downloads from people simply browsing the app store. This new system doesn't seem to give a chance for new apps to make any impressions in front of a big audience. Is the only way now through advertising and self-promotion of the apps? Thank you! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] transfer the incoming call to the voice mail programatically
hi, please anyone can told me how to transfer incoming call directly into the voice mail. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] what is the layout of google+ app?
i want build something like that. Great, so get started... i need a main feed, and a slide menu on the left that will change the main screen. it's need to work on android 2.1 to 4.1 Well, time to get to work then... When you run into a specific problem, go ahead and try asking again. In the meantime, here are some links you may find useful: - http://developer.android.com/guide/topics/ui/declaring-layout.html - http://catb.org/esr/faqs/smart-questions.html Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Mon, Jul 9, 2012 at 4:03 AM, Eyal Berman bermane...@gmail.com wrote: i want build something like that. i need a main feed, and a slide menu on the left that will change the main screen. it's need to work on android 2.1 to 4.1 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Android app with google calender
Here's a developer guide with code snippets: http://developer.android.com/guide/topics/providers/calendar-provider.html On Mon, Jul 2, 2012 at 2:40 AM, Ali Chousein ali.chous...@gmail.com wrote: Certainly it is possible. Take a look at the CalendarContract interface: http://developer.android.com/reference/android/provider/CalendarContract.html - Ali Chousein https://play.google.com/store/apps/details?id=com.apps.social_nav https://play.google.com/store/apps/details?id=com.apps.weather_buddy http://www.paygol.com/android/implementation -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to add date and time on captured image
Exif data is meta-data... That means it is data that is stored with the image, but is not displayable. If you want to put the date and time on the image, then you will need to modify the actual image... Try using Google, it is your friend: http://lmgtfy.com/?q=android+put+date+and+time+on+image Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Mon, Jul 9, 2012 at 3:09 AM, android developer android.developer4...@gmail.com wrote: Hi all, I have used this code print date and time on image. but not working pls help on this . ExifInterface exif = new ExifInterface(filename); exif.setAttribute(ExifInterface.TAG_DATETIME, (new Date(System.currentTimeMillis())).toString()); exif.saveAttributes(); -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] java.lang.nullpointerexception in ServerSocket.accept()
Well, apparently your ServerSocket is null... Likely you are getting the IOException... If you hit that exception then ss would be null. Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Mon, Jul 9, 2012 at 1:08 AM, Akki akshay.iitr@gmail.com wrote: ss -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Ping in android
Does your application have internet permission? On Tue, Jul 3, 2012 at 6:30 PM, Michael Leung michaelchi...@gmail.comwrote: Hi all, I have used isReachable() in InetAddress for Ping. But that is only working in local network unless root my phone. Does anyone work this problem out before? -- Regards, Michael Leung http://www.itblogs.info - My IT Blog http://diary.skynovel.info - My Blog http://www.michaelleung.info - My Homepage -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: creating Bitmap from pixel data *without* copying the data
A quick search turns up quite a few Java PNG encoders with various license conditions. Encoding a PNG will not require copying the PNG again so grab one with source, a license you like, and if necessary modify it to write directly to an output stream. On Monday, July 9, 2012 3:31:24 PM UTC+1, Latimerius wrote: Hello, I have a bunch of pixel data in an int[] that I want to turn into a Bitmap instance. The problem is, the pixel data is so big it barely fits into memory. I thought it would be no problem, surely I can pass the int[] to a Bitmap factory method which simply wraps it in a Bitmap instance. Unfortunately, this does not seem to be the case - createBitmap(int[] colors, int width, int height, Bitmap.Config config) seems to allocate its own int[] and copy the passed in int[] into it, which fails if there is no memory for another copy. I simply need to turn the image stored in the int[] to a .png on external storage so actually any of the following would be good enough for me: - as mentioned above, a way to create a Bitmap so that it doesn't try to allocate another useless copy of the data - an accessor on Bitmap to return the Bitmap's pixel store as an int[] (that way I wouldn't have to allocate my own int[] and would be able to write directly into the Bitmap-owned memory) - a way of accessing (an equivalent of) Bitmap.compress() functionality without having a Bitmap Amazingly, none of the above seems to be available! Bitmaps tend to be large objects in memory, surely there must be ways to handle them in a memory-efficient manner... Cheers! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Lock orientation once the app started?
I could see a use in a finger paint app: you would want to lock the orientation once the use has started the drawing. On Monday, July 9, 2012 5:32:30 PM UTC+1, Nobu Games wrote: Can any of you who implemented that approach give me an example when and how this is wanted or useful? I don't mean that as a criticism. I'm just wondering why to give the user control over the orientation just on Activity startup and not beyond. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Tab Widget issue
Hello to all, I create 3 intents of activities(which i add to TabHost) in my main TabActivity. So far, so good... I also have refresh and logout button with onClick method. When this button is clicked say refresh i want to refresh item of intent activity. Where are these buttons? What is item? I just put an public method there, it's working fine if i say print any message there, but as I called some process method to get data from web service it;s not work. You put a public method where? What do you mean by called some process method to get data from web service? What do you mean by it;s not work? Care to elaborate at all? To intent i use intentAccount.putExtra(test, Hello); AccountActivity r = new AccountActivity(); r.update(); When do you use this? Why are you creating a new instance of AccountActivity every time? any one have idea what can done in this case ? Not from what you've posted... We aren't mind readers. Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Sun, Jul 8, 2012 at 7:35 PM, shubh shubhampatn...@gmail.com wrote: https://lh3.googleusercontent.com/-GIBSiBEMAlI/T_oyu0qVfiI/AHk/SuUYVqU4YdE/s1600/tab.jpg Hello to all, I create 3 intents of activities(which i add to TabHost) in my main TabActivity. I also have refresh and logout button with onClick method. When this button is clicked say refresh i want to refresh item of intent activity. I just put an public method there, it's working fine if i say print any message there, but as I called some process method to get data from web service it;s not work. To intent i use intentAccount.putExtra(test, Hello); AccountActivity r = new AccountActivity(); r.update(); and this is my update method in account Activity public void update(){ System.out.println(ACCOUNT :) ); } any one have idea what can done in this case ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
RE: [android-developers] Re: Calender view
Hi Iam able to show calendar view by week selection ,I cant able to add functionality based on selection on week wise Can you any tell me.i Done Googling I got ,but week selection I couldn't able to add week selection thing . http://w2davids.wordpress.com/android-simple-calendar/ I followed this but couldn't able to add from day to next week day selection able to do any one knows Please guide me. From: android-developers@googlegroups.com [mailto:android-developers@googlegroups.com] On Behalf Of Nobu Games Sent: Monday, July 09, 2012 8:26 PM To: android-developers@googlegroups.com Subject: [android-developers] Re: Calender view What do you mean with how to get? Beginning with API level 11 you can use: http://developer.android.com/reference/android/widget/CalendarView.html For earlier versions: http://code.google.com/p/android-calendar-view/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] forceclose problem after startActivity()
Do you have access to the stacktrace? Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Sun, Jul 8, 2012 at 12:03 AM, yves...@gmail.com yves...@gmail.comwrote: We have an app on the market for a while now, mostly it works great. But recently we got a couple report that it force closes on some devices, since we don't have those devices to debug the problem, I hope I can ask the question here and maybe someone can share some lights about what we should do. The basic problem is that we have an activity A, which has a button for people to configure some information. So, we have an Activity B which collects those information. So, user click the button and Activity B will pop up, after users finish the settings, they click finish button or cancel button there and Activity B closes and Activity A has a onActivityResult call which collect which button was clicked and will adjust some information. But this force closes on some devices after user click either button. We added some debug code in onActivityResult but it finished the call to the end without crashing, so, we have no idea what other function should be called after that. We don't have onResume function in Activity A because we thought since we don't care about it, it should just use the default implementation. And we do have onSaveInstanceState function. So, one user who has this problem is willing to test anything or we can add debug code to anywhere, but since onActivityResult returns okay, we have no idea what to do next. Any suggestions about how to figure this out without the actual device to hook up the debugger? Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Gif image not display properly in android
Hello all, I have loading gif image. i am extract frames and the use frame by frame by animation. But sometimes the gif image is struck and is not animating. anybody please help regarding this issue. -- WITH REGARDS ARUN KUMAR P D +91-9994794759 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: creating Bitmap from pixel data *without* copying the data
Could you use setPixels(int[]) instead? On Mon, Jul 9, 2012 at 9:52 AM, Latimerius l4t1m3r...@googlemail.comwrote: On Mon, Jul 9, 2012 at 6:16 PM, Nobu Games dev.nobu.ga...@gmail.com wrote: As far as I know that allocated array resides on the native heap until it is released and copied back to Java. That probably only happens when you alter the pixel data from Java. Which means that the get and setPixel methods must be really slow because in worst case they can cause heavy copy operations between JVM and native code for each access. I tried in the meantime to fill my large Bitmap by calling setPixel() on each of its pixels and the running time is in the order of tens seconds. The only other option that comes to my mind for speeding up things would be writing some NDK code and using a PNG library for encoding the pixel data in native code. Passing that int array to that native code is straightforward. With a trick you can even access the original Java int array directly without waiting for a copy. This is possible with the JNI function GetPrimitiveArrayCritical. There is no guarantee, though that direct access works in any case. The documentation of that function explains the limits pretty well. I don't use NDK in this app, was meant to be pure Java, however as there are other (performance) problems with bulk GL data handling that apparently cannot be solved without native code, I might consider NDK as well. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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] Can you send parcelable across processes without aidl ?
Can you send parcelable across processes without aidl ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Media Player full screen like youtube
On Mon, Jul 9, 2012 at 6:26 AM, Revanth kumar revanth.andr...@gmail.comwrote: I am looking for video toggle between fullscreen and normal screen like youtube. OK. What have you tried so far? - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] upload app to google store ..
On Sat, Jul 7, 2012 at 2:42 AM, ala hammad 3la2.7am...@gmail.com wrote: i want to ask how much time need to confirm my app from google store ?? What do you mean to confirm your app? Google doesn't do any confirmation. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Can you send parcelable across processes without aidl ?
Why don't you want to use AIDL? You can use a Messenger: http://developer.android.com/reference/android/os/Messenger.html, or send the information via intent. kris On Mon, Jul 9, 2012 at 2:28 PM, Agus agus.sant...@gmail.com wrote: Can you send parcelable across processes without aidl ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Can you send parcelable across processes without aidl ?
Yes but only if the receiving process knows how to unparcel the object. On Jul 9, 2012 11:29 AM, Agus agus.sant...@gmail.com wrote: Can you send parcelable across processes without aidl ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Calender view
Ok, your question is hard to understand, but I assume you are the same guy who was asking several times all over the past week for how to create a calendar week selection view, so I think you want to have a widget that allows the user to pick a week of the year. The Java Calendarhttp://developer.android.com/reference/java/util/Calendar.htmlclass should give you enough material for figuring out the steps necessary. Another question you may want to answer yourself is: how do you want to present your week of the year selection? You can get an idea for that by playing around with the Windows 7 date selection widget, which does a pretty good job. I would implement that as a separate view instead of trying to extend the existing calendar view of your choice with that function, because that may turn out to be too complicated. But the most elegant solution would be adapting that android calendar view source code for your needs. You could create a ListView or GridView and set a custom Adapter that lists the week of the year. When showing that view you need to set the current selection to the current week (or any pre-selected week). The current week can be retrieved with a Calendar object: Calendar cal = new GregorianCalendar(); int weekOfYear = cal.get(Calendar.WEEK_OF_YEAR); If you want to select the week of month instead then change WEEK_OF_YEAR to WEEK_OF_MONTH. In that case you need to have just 4 buttons anyway and don't need to bother with a ListView and an adapter. On Monday, July 9, 2012 1:13:10 PM UTC-5, jags wrote: Hi Iam able to show calendar view by week selection ,I cant able to add functionality based on selection on week wise Can you any tell me.i Done Googling I got ,but week selection I couldn’t able to add week selection thing . http://w2davids.wordpress.com/android-simple-calendar/ I followed this but couldn’t able to add from day to next week day selection able to do any one knows Please guide me. *From:* android-developers@googlegroups.com [mailto: android-developers@googlegroups.com] *On Behalf Of *Nobu Games *Sent:* Monday, July 09, 2012 8:26 PM *To:* android-developers@googlegroups.com *Subject:* [android-developers] Re: Calender view What do you mean with how to get? Beginning with API level 11 you can use: http://developer.android.com/reference/android/widget/CalendarView.html For earlier versions: http://code.google.com/p/android-calendar-view/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
RE: [android-developers] Re: Calender view
Thanks for that good solution. From: android-developers@googlegroups.com [mailto:android-developers@googlegroups.com] On Behalf Of Nobu Games Sent: Tuesday, July 10, 20hi12 12:26 AM To: android-developers@googlegroups.com Subject: Re: [android-developers] Re: Calender view Ok, your question is hard to understand, but I assume you are the same guy who was asking several times all over the past week for how to create a calendar week selection view, so I think you want to have a widget that allows the user to pick a week of the year. The Java Calendar http://developer.android.com/reference/java/util/Calendar.html class should give you enough material for figuring out the steps necessary. Another question you may want to answer yourself is: how do you want to present your week of the year selection? You can get an idea for that by playing around with the Windows 7 date selection widget, which does a pretty good job. I would implement that as a separate view instead of trying to extend the existing calendar view of your choice with that function, because that may turn out to be too complicated. But the most elegant solution would be adapting that android calendar view source code for your needs. You could create a ListView or GridView and set a custom Adapter that lists the week of the year. When showing that view you need to set the current selection to the current week (or any pre-selected week). The current week can be retrieved with a Calendar object: Calendar cal = new GregorianCalendar(); int weekOfYear = cal.get(Calendar.WEEK_OF_YEAR); If you want to select the week of month instead then change WEEK_OF_YEAR to WEEK_OF_MONTH. In that case you need to have just 4 buttons anyway and don't need to bother with a ListView and an adapter. On Monday, July 9, 2012 1:13:10 PM UTC-5, jags wrote: Hi Iam able to show calendar view by week selection ,I cant able to add functionality based on selection on week wise Can you any tell me.i Done Googling I got ,but week selection I couldn't able to add week selection thing . http://w2davids.wordpress.com/android-simple-calendar/ I followed this but couldn't able to add from day to next week day selection able to do any one knows Please guide me. From: android-developers@googlegroups.com [mailto:android-developers@googlegroups.com] On Behalf Of Nobu Games Sent: Monday, July 09, 2012 8:26 PM To: android-developers@googlegroups.com Subject: [android-developers] Re: Calender view What do you mean with how to get? Beginning with API level 11 you can use: http://developer.android.com/reference/android/widget/CalendarView.html For earlier versions: http://code.google.com/p/android-calendar-view/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Bluetooth chat bug?
I added some code like this to help me see which device is involved in this chicanery: String device_name = device.getName(); if (device_name == null) device_name = no name + device.getAddress(); On Saturday, July 7, 2012 8:14:26 AM UTC-5, Jons Jean wrote: Same thing I face in past . . .it looks it is due to cache of bluetooth something like this .. What Happend according to me Bluetooth 1st search for devices then get its name . . After searching devices when android bluetooth API try to get its name it goes out of range . . that gives null .. . if anyone explain more on this ? On Sat, Jul 7, 2012 at 11:58 AM, gjs garyjamessi...@gmail.com wrote: Hi, And by that logic device might be null as well... Maybe check the source code. Regards On Jul 7, 5:12 am, bob b...@coolfone.comze.com wrote: I'm looking at the Bluetooth chat example: // When discovery finds a device if (BluetoothDevice.ACTION_FOUND.equals(action)) { // Get the BluetoothDevice object from the Intent BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE); // If it's already paired, skip it, because it's been listed already if (device.getBondState() != BluetoothDevice.BOND_BONDED) { mNewDevicesArrayAdapter.add(device.getName() + \n + device.getAddress()); } // When discovery is finished, change the Activity title } I think there is a bug here because it assumes device.getName() does not return null, when in fact it might. What do you guys think? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- --- *Regards :* *Muhammad Nasir Aftab* --- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: OutOfMemoryException
Hello, The framework (and support library) contains a class that you might find useful LruCache ;) I will also highlight this training section http://developer.android.com/training/displaying-bitmaps/index.html BTW, if your know your application will use a lot of memory, you should query for heap size at runtime using 'ActivityManager.getMemoryClass()' Regards On Friday, July 6, 2012 6:16:17 PM UTC+2, Android Developer wrote: Hi, I am working in a avatar like application that has lots of images more than 1000 where user can change any image at runtime. But its frequently running out of heap space and then crashed. I checked this. http://developer.android.com/training/displaying-bitmaps/index.html But it didnt solve my problem. Even i have worker thread to update the image to UI. *Stack Trace : 07-06 21:54:45.707: E/AndroidRuntime(14405): java.lang.OutOfMemoryError 07-06 21:54:45.707: E/AndroidRuntime(14405): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) 07-06 21:54:45.707: E/AndroidRuntime(14405): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:483) 07-06 21:54:45.707: E/AndroidRuntime(14405): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:351) 07-06 21:54:45.707: E/AndroidRuntime(14405): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:773) 07-06 21:54:45.707: E/AndroidRuntime(14405): at android.content.res.Resources.loadDrawable(Resources.java:1935) 07-06 21:54:45.707: E/AndroidRuntime(14405): at android.content.res.Resources.getDrawable(Resources.java:664) 07-06 21:54:45.707: E/AndroidRuntime(14405): at android.widget.ImageView.resolveUri(ImageView.java:542) 07-06 21:54:45.707: E/AndroidRuntime(14405): at android.widget.ImageView.setImageResource(ImageView.java:315) 07-06 21:54:45.707: E/AndroidRuntime(14405): at android.os.AsyncTask.finish(AsyncTask.java:602) 07-06 21:54:45.707: E/AndroidRuntime(14405): at android.os.AsyncTask.access$600(AsyncTask.java:156) 07-06 21:54:45.707: E/AndroidRuntime(14405): at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:615) 07-06 21:54:45.707: E/AndroidRuntime(14405): at android.os.Handler.dispatchMessage(Handler.java:99) 07-06 21:54:45.707: E/AndroidRuntime(14405): at android.os.Looper.loop(Looper.java:137) 07-06 21:54:45.707: E/AndroidRuntime(14405): at android.app.ActivityThread.main(ActivityThread.java:4424) 07-06 21:54:45.707: E/AndroidRuntime(14405): at java.lang.reflect.Method.invokeNative(Native Method) 07-06 21:54:45.707: E/AndroidRuntime(14405): at java.lang.reflect.Method.invoke(Method.java:511) 07-06 21:54:45.707: E/AndroidRuntime(14405): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) 07-06 21:54:45.707: E/AndroidRuntime(14405): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) 07-06 21:54:45.707: E/AndroidRuntime(14405): at dalvik.system.NativeStart.main(Native Method) *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
Re: [android-developers] Re: creating Bitmap from pixel data *without* copying the data
On Mon, Jul 9, 2012 at 8:22 PM, Romain Guy romain...@android.com wrote: Could you use setPixels(int[]) instead? I considered passing my int[] to setPixels() but (correct me if I'm wrong) that wouldn't remove the problem where at some point, the bitmap data has to exist in two copies. However, I probably could use setPixels(int[]) and pass subimages several times until the whole bitmap is filled. Yes, I'll check that out, sounds like a good idea. Thanks! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] is the setStyle Method or similar available now..or still it is status quo?
I am saying there are no plans for a setStyle() method, which has nothing to do with XML. On Mon, Jul 9, 2012 at 12:29 AM, HideCheck hidech...@gmail.com wrote: Hi What you're saying? Button style=@style/MyButton android:id=@+id/button1 android:text=Button01 android:layout_width=wrap_content android:layout_height=wrap_content/Button 2012/7/9 Dianne Hackborn hack...@android.com: No the style needs to be supplied when the view is constructed; I don't expect this to change any time soon. On Sun, Jul 8, 2012 at 11:17 PM, maccoy maccoy2...@gmail.com wrote: Can i set a style from one TextView to another? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 encrypt a username and password ?
On 9 Juli, 06:21, mohammed Nuhail nuhail...@gmail.com wrote: I am doing chat Application in Android... I have to encrypt and decrypt username and password and stored it in database. You are using asmack I suppose for the chat application. You get all that you need for chat applications with XMPP. And you don't need to re-implement security etc. (and it works with Gtalk and Facebook talk). Anyway, you might want to have a look at AccountManager: http://developer.android.com/reference/android/accounts/AccountManager.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
Re: [android-developers] Re: creating Bitmap from pixel data *without* copying the data
On Mon, Jul 9, 2012 at 8:02 PM, RichardC richard.crit...@googlemail.com wrote: A quick search turns up quite a few Java PNG encoders with various license conditions. Encoding a PNG will not require copying the PNG again so grab one with source, a license you like, and if necessary modify it to write directly to an output stream. Thanks, this didn't occur to me. Just took a quick look, haven't found anything suitable (should be free and take int[] on input) yet but I'll try a more thorough search later. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Socket Time out
Can you put tcpdump on the device to see if traffic is flowing? Could you replace the ip addr with something on your local network to see if that works? R On Sat, Jun 30, 2012 at 1:03 AM, Anand Gangadharan anand.gangadha...@gmail.com wrote: *The setup* I have at home a wifi router under which I have my devices(couple of laptops,TV, Android phone and tablet). The router is connected to a cable modem provided by my ISP and all the devices share this connection. *Problem* Recently my ISP came up with an additional security system.On first connect(could be from any device) I need to authenticate myself with a username/password to my ISP website. I checked the system and they were intercepting the first http connection from my side and redirecting my browser to their login page. Some how my android browsers are not able to show this login page. I need to connect using my laptop and only later android devices can connect to internet. *My Solution* I wrote a small java application to over come this problem. It tries to connect to google.com. Intercept the redirect request and finally post my username password. The application is working fine with my laptop and I hooked it with windows start up and everything is great. Android devices still are not very happy with this app. On debugging I find that my very first socket connections is getting timed out and my application fails. *Technical Details* *Device *- Motorola Defy Plus *Android version* - 2.3.3 *Exception Socket* - Time out *Code* public class SocketHttp { public static Socket connect(String ip) throws Exception { Socket socket = new Socket(ip, 80); return socket; } . } As I have not logged in to my ISP I am not depending on the DNS service and directly hardcoding a google.com IP.I have added uses-permission android:name=android.permission.INTERNET / in the Android Manifest. The code works correctly if the ISP login is completed using my lap top. Any idea what is going wrong? Regards Anand G -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Lock orientation once the app started?
This is precisely what happened! 在 2012年7月10日星期二UTC+8上午2时08分32秒,RichardC写道: I could see a use in a finger paint app: you would want to lock the orientation once the use has started the drawing. On Monday, July 9, 2012 5:32:30 PM UTC+1, Nobu Games wrote: Can any of you who implemented that approach give me an example when and how this is wanted or useful? I don't mean that as a criticism. I'm just wondering why to give the user control over the orientation just on Activity startup and not beyond. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Lock orientation once the app started?
This is the problem I am facing now. :( It is the same for Android 3 (HTC Jetstream) and Android 4 (Galaxy Note) that I am using. Detected portrait and set it to portrait and the result is a reverse portrait if you are holding it wrong. 在 2012年7月10日星期二UTC+8上午12时36分03秒,RLScott写道: This method has a problem in Android 2.2 which cannot detect the difference between portrait and reverse portrait, for example. Later versions of Android maybe OK with it though. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Lock orientation once the app started?
I am doing a painting program for kids. - you wanted to show the kids the correct orientation when you enter the app, if you happened to hold a tablet in landscape, it is expected that the program started in landscape. - but once you started painting, nothing is more wrong (at least to all the test subjects) than the painting accidentally rotate... and kids hand are not steady! 在 2012年7月10日星期二UTC+8上午12时32分30秒,Nobu Games写道: Can any of you who implemented that approach give me an example when and how this is wanted or useful? I don't mean that as a criticism. I'm just wondering why to give the user control over the orientation just on Activity startup and not beyond. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] forceclose problem after startActivity()
No, I don't. Is there an easy way to gather this information from a user? I can put some debug code on this user's machine. On Mon, Jul 9, 2012 at 11:14 AM, Justin Anderson magouyaw...@gmail.com wrote: Do you have access to the stacktrace? Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Sun, Jul 8, 2012 at 12:03 AM, yves...@gmail.com yves...@gmail.com wrote: We have an app on the market for a while now, mostly it works great. But recently we got a couple report that it force closes on some devices, since we don't have those devices to debug the problem, I hope I can ask the question here and maybe someone can share some lights about what we should do. The basic problem is that we have an activity A, which has a button for people to configure some information. So, we have an Activity B which collects those information. So, user click the button and Activity B will pop up, after users finish the settings, they click finish button or cancel button there and Activity B closes and Activity A has a onActivityResult call which collect which button was clicked and will adjust some information. But this force closes on some devices after user click either button. We added some debug code in onActivityResult but it finished the call to the end without crashing, so, we have no idea what other function should be called after that. We don't have onResume function in Activity A because we thought since we don't care about it, it should just use the default implementation. And we do have onSaveInstanceState function. So, one user who has this problem is willing to test anything or we can add debug code to anywhere, but since onActivityResult returns okay, we have no idea what to do next. Any suggestions about how to figure this out without the actual device to hook up the debugger? Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] forceclose problem after startActivity()
What I usually do is adding app-internal logging all over the place. The log lines go into a text file, so you don't depend on the system log and don't need to fluff up your app with another really sensitive permission. For covering crashes you can set a custom UncaughtExceptionHandlerhttp://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Thread.html#setDefaultUncaughtExceptionHandler%28java.lang.Thread.UncaughtExceptionHandler%29for logging the stack trace. Make sure to use the default uncaught exception handler for processing that exception (or at least kill the app process), otherwise your app thinks that everything is alright. On Monday, July 9, 2012 6:03:18 PM UTC-5, yve...@gmail.com wrote: No, I don't. Is there an easy way to gather this information from a user? I can put some debug code on this user's machine. On Mon, Jul 9, 2012 at 11:14 AM, Justin Anderson magouyaw...@gmail.com wrote: Do you have access to the stacktrace? Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Sun, Jul 8, 2012 at 12:03 AM, yves...@gmail.com yves...@gmail.com wrote: We have an app on the market for a while now, mostly it works great. But recently we got a couple report that it force closes on some devices, since we don't have those devices to debug the problem, I hope I can ask the question here and maybe someone can share some lights about what we should do. The basic problem is that we have an activity A, which has a button for people to configure some information. So, we have an Activity B which collects those information. So, user click the button and Activity B will pop up, after users finish the settings, they click finish button or cancel button there and Activity B closes and Activity A has a onActivityResult call which collect which button was clicked and will adjust some information. But this force closes on some devices after user click either button. We added some debug code in onActivityResult but it finished the call to the end without crashing, so, we have no idea what other function should be called after that. We don't have onResume function in Activity A because we thought since we don't care about it, it should just use the default implementation. And we do have onSaveInstanceState function. So, one user who has this problem is willing to test anything or we can add debug code to anywhere, but since onActivityResult returns okay, we have no idea what to do next. Any suggestions about how to figure this out without the actual device to hook up the debugger? Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Google I/O 2012 video session on Game development
Does anyone know where they've put videos for Ten Things Game Developers Should Know by Dan Galpin, Ian Lewis ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Google I/O 2012 video session on Game development
On Mon, Jul 9, 2012 at 8:00 PM, andronica ptyag...@gmail.com wrote: Does anyone know where they've put videos for Ten Things Game Developers Should Know by Dan Galpin, Ian Lewis ? They may not have converted that one yet. There are a handful from the Android track that I am waiting for. I am hoping that these are merely delayed, not lost. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.8 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Ping in android
On Jul 9, 1:42 pm, Robert Greenwalt rgreenw...@google.com wrote: Does your application have internet permission? If that were the problem, creating AF_INET sockets would fail, even before trying to use 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] AndroidManifest -- exported item permissions
Marks latest post ( http://commonsware.com/blog/2012/07/09/dont-advertise-intent-filters-that-are-not-yours.html ) made me think of this question. Google added a bunch of LINT warnings for not having required permissions for items (activites/services/etc) exported by your app. What's the intention here? What kind of permission can I request for an Appwidget receiver for example? I hate having unresolved LINT warning, especially when there is no way of fixing them that I can see. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Problem optimizing views for having a fast scroll
Thanks for Garreau and other There is a topic that I'm interested in. I also check why cacheColorHint interrupt the performance. #00 means transparent to background, so the View must blend to back gourd very frame. It's terrible for performance. Some reference for more information: http://stackoverflow.com/questions/8345677/getting-black-screen-while-scrolling-in-listview-in-android * * On Wednesday, July 4, 2012 11:20:19 PM UTC+8, jean-francois garreau wrote: I finally found the source of all my GC ! it comes from my activity xml layout... Indeed for my expandView, I use this : ExpandableListView android:id=@+id/resultListResult android:layout_width=fill_parent android:layout_height=fill_parent android:cacheColorHint=# / And if I remove this : android:cacheColorHint=# the animation is very smooth ! Thanks for your help Le mardi 3 juillet 2012 13:23:24 UTC+2, Kostya Vasilyev a écrit : A custom view, assuming it's at the root of your item layout, is just as good as a view holder. Here is what you can do: - Override onFinishInflate in your item layout root view - Call this.findViewById to find children - Store them as member variables - Access in the adapter's getView, like itemView.mText1, itemView.mText2 -- rather than doing itemView.findViewById(...) -- K 2012/7/3 jean-francois garreau jean.francois.garr...@gmail.com I already saw that presentation and I can't use the ViewHolder pattern because i need a customView. So I'm looking for a way to optimize my CustomView because I don't know what I'm doing wrong with this view that causing thoses GC -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Google I/O 2012 video session on Game development
I'm also waiting for session slides or video. Steve On Tuesday, July 10, 2012 8:00:28 AM UTC+8, andronica wrote: Does anyone know where they've put videos for Ten Things Game Developers Should Know by Dan Galpin, Ian Lewis ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] AndroidManifest -- exported item permissions
On Tue, Jul 10, 2012 at 10:40 AM, Zsolt Vasvari zvasv...@gmail.com wrote: Marks latest post ( http://commonsware.com/blog/2012/07/09/dont-advertise-intent-filters-that-are-not-yours.html ) made me think of this question. Google added a bunch of LINT warnings for not having required permissions for items (activites/services/etc) exported by your app. What's the intention here? What kind of permission can I request for an Appwidget receiver for example? I hate having unresolved LINT warning, especially when there is no way of fixing them that I can see. Then intention is to catch things that are exported by default and make you think about if that's what you really wanted (content providers are public by default, etc.). If you really want them exported, you can add an annotation, etc. to mark them as such. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] AndroidManifest -- exported item permissions
How do you add an annotation to an XML document LINT recognizes? On Tuesday, July 10, 2012 9:46:13 AM UTC+8, Nikolay Elenkov wrote: On Tue, Jul 10, 2012 at 10:40 AM, Zsolt Vasvari zvasv...@gmail.com wrote: Marks latest post ( http://commonsware.com/blog/2012/07/09/dont-advertise-intent-filters-that-are-not-yours.html ) made me think of this question. Google added a bunch of LINT warnings for not having required permissions for items (activites/services/etc) exported by your app. What's the intention here? What kind of permission can I request for an Appwidget receiver for example? I hate having unresolved LINT warning, especially when there is no way of fixing them that I can see. Then intention is to catch things that are exported by default and make you think about if that's what you really wanted (content providers are public by default, etc.). If you really want them exported, you can add an annotation, etc. to mark them as such. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] AndroidManifest -- exported item permissions
On Tue, Jul 10, 2012 at 12:21 PM, Zsolt Vasvari zvasv...@gmail.com wrote: How do you add an annotation to an XML document LINT recognizes? There is a 'tools:ignore' or some such attribute, it should show up as a quickfix in the editor. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] C2DM Registration Issue
c2dm is deprecated. use GCM. http://developer.android.com/guide/google/gcm/index.html On Mon, Apr 23, 2012 at 11:40 PM, gaurang patel gapin...@gmail.com wrote: Hi All... I am developing an app to get notification using android c2dm. I have filled up the registration form with all required details to the following link: https://developers.google.com/android/c2dm/signup I got one email on my contact gmail id that ..Information on production-level quota will be sent to your 'Contact email' address when your registration has been processed four days are already passed but i did not get any confirmation from google. I tried to execute a c2dm client app to get registration id from c2dm but it gives null as registration_id. Although i configured and signed in gmail account on my device, when i run the application gives null registratin_id and AUTHENTICATION_FAILED error. Please provide some guidance on this. Thanks in Advanced, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] TTS AND MEDIAPALYER
Dear All http://stackoverflow.com/questions/11406365/java-io-ioexceptionprepared-failedstatus-0x1 Please help to reslove this!!! -- Thanks Regards Deepa M -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 the setStyle Method or similar available now..or still it is status quo?
What i am trying to do is newTextView =(TextView)getLayoutInflater().inflate(R.layout.styledtextvew1, null); I have xml like the following..when the style is applied the weight and gravity does not..is this the normal behaviour because I am trying to do it at runtime? TextView xmlns:android=http://schemas.android.com/apk/res/android; android:layout_weight=1 android:gravity=center style=@style/rowText0 / style name=rowText0 parent=@android:style/TextAppearance.Medium item name=android:textColor#FF/item item name=android:textSize14dip/item /style On Monday, July 9, 2012 11:47:01 AM UTC+5:30, maccoy wrote: Can i set a style from one TextView to another? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Drawing app
I want to develop a drawing app to allow users to draw simple shapes using gestures. Is there any framework out there that can be used? I am having a look at LibGdx but it is mainly for gaming, will it do the job? Sandeep -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en