[android-developers] Image download problem
Hi. I have some question regarding image downloading from the server. In my application i had to continually call one method in which image download code is placed But java.net.MalformedURLException is there when i call image download method continually so any suggestion why i get java.net.MalformedURLException in my code. try { URL aURL = new URL(url); URLConnection conn = aURL.openConnection(); conn.connect(); InputStream is = conn.getInputStream(); BufferedInputStream bis = new BufferedInputStream(is); int i = bis.available(); if(i!=0) { bm = BitmapFactory.decodeStream(bis); setOriginalImage(bm); bm = resizeBitmap(bm, 30, 30); } /* bm = BitmapFactory.decodeStream(bis); setOriginalImage(bm); bm = resizeBitmap(bm, 30, 30);*/ bis.close(); is.close(); } catch (IOException e) { Log.e(TAG, Error getting bitmap, e); } catch(Exception e) { e.printStackTrace(); } retrun bm; here is my code -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Paypal integration in my Application
Hi. In my application i need to integrate paypal payment gateway. But My main concerned is can Android market approved my application with PAYPAL gateway ? Because In Android market uses Google Checkout for Payment Gateway So can i use Paypal payment gateway in my application ? can Android market approved my application with Paypal payment gateway? please do needful. Regards jaimin. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: skype ,gtalk intent
hi jeff. Uri imUri = new Uri.Builder().scheme(imto).authority(aim).appendPath (u...@example.com).build(); Intent intent = new Intent(Intent.ACTION_SENDTO, imUri); i have try above code that u have gave me for chatscreen intent but i am not successful to do the task to open the chatscreen of gtalk and skype so can u plz give me the code of gtalk and skype. thanks jaimin. On Nov 3, 3:51 am, Jeff Sharkey jshar...@android.com wrote: You should really avoid specifying direct ComponentNames, as they can change in the future, or the user may install a different client to handle those protocols. Here's a quick example of how to launch a chat with someone using AIM when a client is installed: Uri imUri = new Uri.Builder().scheme(imto).authority(aim).appendPath(u...@example.com).build();Intentintent= newIntent(Intent.ACTION_SENDTO, imUri); You can substitute gtalk or msn for launching other clients. j On Sun, Nov 1, 2009 at 8:53 PM, jaimin mehta jaimin.r.me...@gmail.com wrote: hi. i have some problem regardingskypeandgtalkintent i have application in which i display a list of onlineskype,gtalk contacts. Now when ever i click my onlineskypeorgtalkcontacts it should display a defaultskypeorgtalkchat window with that Contacts So basically i want to know is there anyintentto call Chat screen of SkypeandGtalkonline Contacts Right now i haveintentto callskypeandgtalkdefault application login screen GTALK- Intenti = newIntent(Intent.ACTION_MAIN); i.setComponent(new ComponentName(com.google.android.talk, com.google.android.talk.SigningInActivity)); startActivity(i); SKYPE- Intenti = newIntent(Intent.ACTION_MAIN); i.setComponent( new ComponentName( com.skype.android.lite, com.skype.android.lite.SkypeActivity ) ); startActivity(i); but i want to display chat screen of bothSkypeandGtalk can any body help me in my issue plz its urgent thanks jaimin. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Jeff Sharkey jshar...@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: skype ,gtalk intent
Thanks for the help. Let me try that option and tell u if it is working for me or not Thanks jaimin. On Nov 3, 3:51 am, Jeff Sharkey jshar...@android.com wrote: You should really avoid specifying direct ComponentNames, as they can change in the future, or the user may install a different client to handle those protocols. Here's a quick example of how to launch a chat with someone using AIM when a client is installed: Uri imUri = new Uri.Builder().scheme(imto).authority(aim).appendPath(u...@example.com).build();Intentintent= newIntent(Intent.ACTION_SENDTO, imUri); You can substitute gtalk or msn for launching other clients. j On Sun, Nov 1, 2009 at 8:53 PM, jaimin mehta jaimin.r.me...@gmail.com wrote: hi. i have some problem regardingskypeandgtalkintent i have application in which i display a list of onlineskype,gtalk contacts. Now when ever i click my onlineskypeorgtalkcontacts it should display a defaultskypeorgtalkchat window with that Contacts So basically i want to know is there anyintentto call Chat screen of SkypeandGtalkonline Contacts Right now i haveintentto callskypeandgtalkdefault application login screen GTALK- Intenti = newIntent(Intent.ACTION_MAIN); i.setComponent(new ComponentName(com.google.android.talk, com.google.android.talk.SigningInActivity)); startActivity(i); SKYPE- Intenti = newIntent(Intent.ACTION_MAIN); i.setComponent( new ComponentName( com.skype.android.lite, com.skype.android.lite.SkypeActivity ) ); startActivity(i); but i want to display chat screen of bothSkypeandGtalk can any body help me in my issue plz its urgent thanks jaimin. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Jeff Sharkey jshar...@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] skype ,gtalk intent
hi. i have some problem regarding skype and gtalk intent i have application in which i display a list of online skype,gtalk contacts. Now when ever i click my online skype or gtalk contacts it should display a default skype or gtalk chat window with that Contacts So basically i want to know is there any intent to call Chat screen of Skype and Gtalk online Contacts Right now i have intent to call skype and gtalk default application login screen GTALK - Intent i = new Intent(Intent.ACTION_MAIN); i.setComponent(new ComponentName(com.google.android.talk, com.google.android.talk.SigningInActivity)); startActivity(i); SKYPE - Intent i = new Intent(Intent.ACTION_MAIN); i.setComponent( new ComponentName( com.skype.android.lite, com.skype.android.lite.SkypeActivity ) ); startActivity(i); but i want to display chat screen of both Skype and Gtalk can any body help me in my issue plz its urgent thanks jaimin. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] lucene api
hi i am new to android . i have developed a application in that application i want a feature of global search in xml file now i want to use Lucene api for global search can i use in android? if yes than plz tell me how can i implements that in my android code thanx jaimin. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: lucene api
Thanx for the reply but i want to search in my xml file and it contains 90 chapters.when i type word or text to search i want to search in all the 90 chapters in my xml file and display chapters which contain match word or text . so can i use lucene for that task to index my xml file? or any other sugestion? plz its urgent and i couldn't find any solution. thanks jaimin. On Sep 18, 2:18 am, Yusuf Saib (T-Mobile USA) yusuf.s...@t- Mobile.com wrote: What do you mean by global search? Do you want to search all your app's local files? Files on the SD card? The internet? Suspicious characters at the airport? Yusuf Saib Android ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Sep 16, 11:45 pm, jaimin mehta jaimin.r.me...@gmail.com wrote: hi i am new to android . i have developed a application in that application i want a feature of global search in xml file now i want to use Lucene api for global search can i use in android? if yes than plz tell me how can i implements that in my android code thanx jaimin. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Jaimin's Birthday Calendar
Hi I'm setting up a birthday calendar and need your help. Just click on the link below and enter your birthday details. (It's quick, easy, and you can keep your age a secret.) http://www.birthdayalarm.com/bd2/85580695a218396311b1478139796c627209871d1386 Thanks Jaimin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] out of memory exception in gridview
hi i am new to android. i have an application in that i download 105 images. now i than i display those images in gridview thumbnail size . it images are display but it take some time to display images in gridview and even take long time to scrolldown to view below images. can any one helpm me on that issue i want to display images in faster time and also decrease the time to scroll down to view below images so plz can anyone tell me solution for that issue. i use bitmap for save the images --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] change seekbar progress color
hi i am new to android . i want to change the color of progress of seekbar form orange that is default ot something different. i tried something like this: here is my code ?xml version=1.0 encoding=utf-8? layer-list xmlns:android=http://schemas.android.com/apk/res/ android item android:id=@android:id/background shape corners android:radius=5dip / gradient android:startColor=#ff9d9e9d android:centerColor=#ff5a5d5a android:centerY=0.75 android:endColor=#ff747674 android:angle=270 / /shape /item item android:id=@android:id/progress clip shape corners android:radius=5dip / gradient android:startColor=#d300 android:centerColor=#b600 android:centerY=0.75 android:endColor=#cb00 android:angle=270 / /shape /clip /item /layer-list SeekBar android:id=@+id/seek android:layout_width=400dip android:progressDrawable=@drawable/progress_horizontal android:layout_height=wrap_content android:layout_below=@+id/btngrid android:layout_marginTop = 10dip android:layout_marginLeft = 30dip android:max=10 android:progress=1 / but it did nothing .so anybody can help me on this problem plz its urgent. thanks jaimin. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: display thumbnail images from sdcard
i put some thumbnail images into sdcard but same result no images display in emulator On Aug 7, 11:30 am, Aki akxuc...@gmail.com wrote: Maybe There are no thumbnails. Open Gallery App and it will make thumbnails. On 8月7日, 午後2:00, jaimin jaiminmeht...@gmail.com wrote: hi thanx for the reply you suggest me to specify the sdcard image but i don't know how to specify sdcard images. On Jul 28, 9:53 pm, Jack Ha jack...@t-mobile.com wrote: Your code seems to work fine. Did you see any errors in the logcat output? Did you specify the sdcard image? -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Jul 28, 3:45 am, jaimin jaiminmeht...@gmail.com wrote: hi. i can not view any image in my emulator screen can anyone please tell me where i am doing wrong in my code. this is my code ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=image.Thumbnails android:versionCode=1 android:versionName=1.0.0 uses-permission android:name=android.permission.MOUNT_UNMOUNT_FILESYSTEMS / application android:icon=@drawable/icon android:label=@string/app_name activity android:name=.ImageThumbnailsActivity android:label=@string/app_name intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER/ /intent-filter /activity activity android:name=.ViewImage intent-filter action android:name=android.intent.action.VIEW / category android:name=android.intent.category.DEFAULT / /intent-filter /activity /application /manifest package image.Thumbnails; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.provider.MediaStore; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.BaseAdapter; import android.widget.GridView; import android.widget.ImageView; import android.widget.AdapterView.OnItemClickListener; public class ImageThumbnailsActivity extends Activity { /** Called when the activity is first created. */ private Cursor imagecursor, actualimagecursor; private int image_column_index, actual_image_column_index; GridView imagegrid; private int count; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); init_phone_image_grid(); } private void init_phone_image_grid() { String[] img = { MediaStore.Images.Thumbnails._ID }; imagecursor = managedQuery( MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI, img, null, null, MediaStore.Images.Thumbnails.IMAGE_ID + ); image_column_index = imagecursor .getColumnIndexOrThrow(MediaStore.Images.Thumbnails._ID); count = imagecursor.getCount(); imagegrid = (GridView) findViewById(R.id.PhoneImageGrid); imagegrid.setAdapter(new ImageAdapter(getApplicationContext ())); imagegrid.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView parent, View v, int position, long id) { System.gc(); String[] proj = { MediaStore.Images.Media.DATA }; actualimagecursor = managedQuery( MediaStore.Images.Media.EXTERNAL_CONTENT_URI, proj, null, null, null); actual_image_column_index = actualimagecursor .getColumnIndexOrThrow(MediaStore.Images.Media.DATA); actualimagecursor.moveToPosition(position); String i = actualimagecursor.getString (actual_image_column_index); System.gc(); Intent intent = new Intent (getApplicationContext(), ViewImage.class); intent.putExtra(filename, i); startActivity(intent); } }); } public class ImageAdapter extends BaseAdapter { private
[android-developers] Re: display thumbnail images from sdcard
thanks for the help i will tell u after i successfully run that code. On Aug 7, 12:10 pm, Aki akxuc...@gmail.com wrote: this is mythumbnailtest code,i hope it help you. public void printThumbnails(){ Uri uri=MediaStore.Images.Thumbnails.getContentUri(external); Cursor cursor=MediaStore.Images.Thumbnails.queryMiniThumbnails (getContentResolver(), uri, MediaStore.Images.Thumbnails.MINI_KIND, null); int count=cursor.getColumnCount(); for(int i=0;icount;i++){ System.out.print(cursor.getColumnName(i)+,); } System.out.println(); cursor.moveToFirst(); while(true){ for(int i=0;icount;i++){ System.out.print(cursor.getString(i)+,); } System.out.println(); if(cursor.isLast()){ break; }else{ cursor.moveToNext(); } } } On 8月7日, 午後3:48, jaimin jaiminmeht...@gmail.com wrote: i put somethumbnailimages into sdcard but same result no images display in emulator On Aug 7, 11:30 am, Aki akxuc...@gmail.com wrote: Maybe There are no thumbnails. Open Gallery App and it will make thumbnails. On 8月7日, 午後2:00, jaimin jaiminmeht...@gmail.com wrote: hi thanx for the reply you suggest me to specify the sdcardimagebut i don't know how to specify sdcard images. On Jul 28, 9:53 pm, Jack Ha jack...@t-mobile.com wrote: Your code seems to work fine. Did you see any errors in the logcat output? Did you specify the sdcardimage? -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Jul 28, 3:45 am, jaimin jaiminmeht...@gmail.com wrote: hi. i can not view anyimagein my emulator screen can anyone please tell me where i am doing wrong in my code. this is my code ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=image.Thumbnails android:versionCode=1 android:versionName=1.0.0 uses-permission android:name=android.permission.MOUNT_UNMOUNT_FILESYSTEMS / application android:icon=@drawable/icon android:label=@string/app_name activity android:name=.ImageThumbnailsActivity android:label=@string/app_name intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER/ /intent-filter /activity activity android:name=.ViewImage intent-filter action android:name=android.intent.action.VIEW / category android:name=android.intent.category.DEFAULT / /intent-filter /activity /application /manifest packageimage.Thumbnails; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.provider.MediaStore; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.BaseAdapter; import android.widget.GridView; import android.widget.ImageView; import android.widget.AdapterView.OnItemClickListener; public class ImageThumbnailsActivity extends Activity { /** Called when the activity is first created. */ private Cursor imagecursor, actualimagecursor; private int image_column_index, actual_image_column_index; GridView imagegrid; private int count; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); init_phone_image_grid(); } private void init_phone_image_grid() { String[] img = { MediaStore.Images.Thumbnails._ID }; imagecursor = managedQuery( MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI, img, null, null, MediaStore.Images.Thumbnails.IMAGE_ID + ); image_column_index = imagecursor .getColumnIndexOrThrow(MediaStore.Images.Thumbnails._ID); count = imagecursor.getCount(); imagegrid = (GridView) findViewById
[android-developers] Re: display thumbnail images from sdcard
hi thanx for the reply you suggest me to specify the sdcard image but i don't know how to specify sdcard images. On Jul 28, 9:53 pm, Jack Ha jack...@t-mobile.com wrote: Your code seems to work fine. Did you see any errors in the logcat output? Did you specify the sdcard image? -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Jul 28, 3:45 am, jaimin jaiminmeht...@gmail.com wrote: hi. i can not view any image in my emulator screen can anyone please tell me where i am doing wrong in my code. this is my code ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=image.Thumbnails android:versionCode=1 android:versionName=1.0.0 uses-permission android:name=android.permission.MOUNT_UNMOUNT_FILESYSTEMS / application android:icon=@drawable/icon android:label=@string/app_name activity android:name=.ImageThumbnailsActivity android:label=@string/app_name intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER/ /intent-filter /activity activity android:name=.ViewImage intent-filter action android:name=android.intent.action.VIEW / category android:name=android.intent.category.DEFAULT / /intent-filter /activity /application /manifest package image.Thumbnails; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.provider.MediaStore; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.BaseAdapter; import android.widget.GridView; import android.widget.ImageView; import android.widget.AdapterView.OnItemClickListener; public class ImageThumbnailsActivity extends Activity { /** Called when the activity is first created. */ private Cursor imagecursor, actualimagecursor; private int image_column_index, actual_image_column_index; GridView imagegrid; private int count; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); init_phone_image_grid(); } private void init_phone_image_grid() { String[] img = { MediaStore.Images.Thumbnails._ID }; imagecursor = managedQuery( MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI, img, null, null, MediaStore.Images.Thumbnails.IMAGE_ID + ); image_column_index = imagecursor .getColumnIndexOrThrow(MediaStore.Images.Thumbnails._ID); count = imagecursor.getCount(); imagegrid = (GridView) findViewById(R.id.PhoneImageGrid); imagegrid.setAdapter(new ImageAdapter(getApplicationContext ())); imagegrid.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView parent, View v, int position, long id) { System.gc(); String[] proj = { MediaStore.Images.Media.DATA }; actualimagecursor = managedQuery( MediaStore.Images.Media.EXTERNAL_CONTENT_URI, proj, null, null, null); actual_image_column_index = actualimagecursor .getColumnIndexOrThrow(MediaStore.Images.Media.DATA); actualimagecursor.moveToPosition(position); String i = actualimagecursor.getString (actual_image_column_index); System.gc(); Intent intent = new Intent (getApplicationContext(), ViewImage.class); intent.putExtra(filename, i); startActivity(intent); } }); } public class ImageAdapter extends BaseAdapter { private Context mContext; public ImageAdapter(Context c) { mContext = c; } public int getCount() { return count; } public Object getItem(int position) { return position; } public long getItemId(int position) { return position; } public View getView(int position,View convertView
[android-developers] display thumbnail images from sdcard
hi. i can not view any image in my emulator screen can anyone please tell me where i am doing wrong in my code. this is my code ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=image.Thumbnails android:versionCode=1 android:versionName=1.0.0 uses-permission android:name=android.permission.MOUNT_UNMOUNT_FILESYSTEMS / application android:icon=@drawable/icon android:label=@string/app_name activity android:name=.ImageThumbnailsActivity android:label=@string/app_name intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER/ /intent-filter /activity activity android:name=.ViewImage intent-filter action android:name=android.intent.action.VIEW / category android:name=android.intent.category.DEFAULT / /intent-filter /activity /application /manifest package image.Thumbnails; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.provider.MediaStore; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.BaseAdapter; import android.widget.GridView; import android.widget.ImageView; import android.widget.AdapterView.OnItemClickListener; public class ImageThumbnailsActivity extends Activity { /** Called when the activity is first created. */ private Cursor imagecursor, actualimagecursor; private int image_column_index, actual_image_column_index; GridView imagegrid; private int count; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); init_phone_image_grid(); } private void init_phone_image_grid() { String[] img = { MediaStore.Images.Thumbnails._ID }; imagecursor = managedQuery( MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI, img, null, null, MediaStore.Images.Thumbnails.IMAGE_ID + ); image_column_index = imagecursor .getColumnIndexOrThrow(MediaStore.Images.Thumbnails._ID); count = imagecursor.getCount(); imagegrid = (GridView) findViewById(R.id.PhoneImageGrid); imagegrid.setAdapter(new ImageAdapter(getApplicationContext ())); imagegrid.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView parent, View v, int position, long id) { System.gc(); String[] proj = { MediaStore.Images.Media.DATA }; actualimagecursor = managedQuery( MediaStore.Images.Media.EXTERNAL_CONTENT_URI, proj, null, null, null); actual_image_column_index = actualimagecursor .getColumnIndexOrThrow(MediaStore.Images.Media.DATA); actualimagecursor.moveToPosition(position); String i = actualimagecursor.getString (actual_image_column_index); System.gc(); Intent intent = new Intent (getApplicationContext(), ViewImage.class); intent.putExtra(filename, i); startActivity(intent); } }); } public class ImageAdapter extends BaseAdapter { private Context mContext; public ImageAdapter(Context c) { mContext = c; } public int getCount() { return count; } public Object getItem(int position) { return position; } public long getItemId(int position) { return position; } public View getView(int position,View convertView,ViewGroup parent) { System.gc(); ImageView i = new ImageView (mContext.getApplicationContext()); if (convertView == null) { imagecursor.moveToPosition(position); int id = imagecursor.getInt (image_column_index); i.setImageURI(Uri.withAppendedPath( MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI, + id)); i.setScaleType (ImageView.ScaleType.CENTER_CROP); i.setLayoutParams(new GridView.LayoutParams (92, 92)); } else { i = (ImageView) convertView; } return i; } } } // By selecting the thumbnails user can view the actual
[android-developers] Grid View Click Problem
hi i am new to android. i try to run Api demos GridView example it runs fine. Now when i click the image in grid view than it does nothing. i want to do when i click that image images should be display in full screen But i dont know how to do that so plz any one can help me and give me the Code for that thing. Here it is my code package indiaNIC.android.ComicBook; import android.app.Activity; import android.content.Context; import android.os.Bundle; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.GridView; import android.widget.ImageView; /** * A grid that displays a set of framed photos. * */ public class grid extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.grid_2); GridView g = (GridView) findViewById(R.id.myGrid); g.setAdapter(new ImageAdapter(this)); } public class ImageAdapter extends BaseAdapter { public ImageAdapter(Context c) { mContext = c; } public int getCount() { return mThumbIds.length; } public Object getItem(int position) { return position; } public long getItemId(int position) { return position; } public View getView(int position, View convertView, ViewGroup parent) { ImageView imageView; if (convertView == null) { imageView = new ImageView(mContext); imageView.setLayoutParams(new GridView.LayoutParams (45, 45)); imageView.setAdjustViewBounds(false); imageView.setScaleType (ImageView.ScaleType.CENTER_CROP); imageView.setPadding(8, 8, 8, 8); //imageView.setOnClickListener(grid.this); } else { imageView = (ImageView) convertView; } imageView.setImageResource(mThumbIds[position]); return imageView; } private Context mContext; private Integer[] mThumbIds = { R.drawable.cartoon0, R.drawable.cartoon1, R.drawable.cartoon2, R.drawable.cartoon10, R.drawable.cartoon11, R.drawable.cartoon12, R.drawable.cartoon13, R.drawable.cartoon14, R.drawable.cartoon15, R.drawable.cartoon16, R.drawable.cartoon17, R.drawable.cartoon18, R.drawable.cartoon19, R.drawable.cartoon20, }; } } any prublic void onClick(View v) method is there for grid View plz help me --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] use of superscript in textview
hi i am new to android i devlope an application where i have to use superscript in textview . But i do not know how that can be done so plz any body help me for these issue its urgent. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] when set android:layout_below = @id/ then margin_bottom is not working for the Button
i want the margin_bottom to work for those Last two Buttons.Botton c And Botton d when i set android:layout_below = @id/answer_a then margin_Bottom does not work ?xml version=1.0 encoding=UTF-8? RelativeLayout xmlns:android=http://schemas.android.com/apk/res/ android android:id=@+id/container android:layout_width=fill_parent android:layout_height=fill_parent android:background = @drawable/bg1 ImageView android:id=@+id/bar android:layout_width=wrap_content android:layout_height=wrap_content android:src=@drawable/bar android:layout_alignParentTop=true / ImageView android:id=@+id/sound android:layout_width=wrap_content android:layout_height=wrap_content android:src=@drawable/volume android:layout_alignParentLeft=true android:paddingTop = 2dip android:paddingBottom = 2dip android:paddingLeft = 10dip / TextView android:id=@+id/level android:layout_width=wrap_content android:layout_height=wrap_content android:text=Level: 1 android:paddingTop = 2dip android:paddingBottom = 2dip android:paddingLeft = 90dip android:textColor = #00 / TextView android:id=@+id/score android:layout_width=wrap_content android:layout_height=wrap_content android:text=Score: android:layout_toRightOf = @+id/level android:paddingTop = 2dip android:paddingBottom = 2dip android:paddingLeft = 20dip / TextView android:id=@+id/point android:layout_width=wrap_content android:layout_height=wrap_content android:text=0 android:layout_toRightOf = @+id/score android:paddingTop = 2dip android:paddingBottom = 8dip android:paddingLeft = 0dip android:textColor = #00 / ImageView android:id=@+id/close android:layout_width=wrap_content android:layout_height=wrap_content android:src=@drawable/close android:layout_alignParentRight=true android:paddingTop = 2dip android:paddingBottom = 2dip android:paddingRight = 10dip / ViewFlipper android:id=@+id/flipper android:layout_width=fill_parent android:layout_height=fill_parent ImageView android:id=@+id/error android:layout_width=fill_parent android:layout_height=fill_parent android:background = @drawable/red_img / /ViewFlipper ScrollView android:id =@+id/svScreen1 android:layout_width=fill_parent android:layout_height=fill_parent android:scrollbarThumbVertical=@drawable/scrollbar_thumb android:scrollbarTrackVertical=@drawable/scrollbar_invisible android:scrollbarStyle=outsideOverlay android:layout_below = @id/bar RelativeLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=fill_parent TextView android:id=@+id/trick android:layout_width=fill_parent android:layout_height=wrap_content android:text=1 android:layout_marginLeft=5px android:layout_marginRight=5px android:layout_centerHorizontal=true android:gravity = center android:layout_below = @id/bar / TextView android:id=@+id/question1 android:layout_width=wrap_content android:layout_height=wrap_content
[android-developers] develop a simple game like tic toc
hi. i am new to android i have develop a some e book for android mobile but i never develop a game in android and i would like to develop a first simple just like tic toc . so plz help me where can i start with. thanks jaimin. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] restart the phone to view the captured images in gallary
hi. i am new to android i have devloped a camera application . it takes the the images and saved in gallary and later u upload a images into the web but when i take captured a images through my application the images is not shown in the gallary although it saved in gallary .But when i restart the phone than all the images i captrued is visibly in the gallary. so i have to restart the phone every time to seen images which i captured so plz help me on this its urgent. thanks jaimin. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: restart the phone to view the captured images in gallary
thanks for your help On Thu, Jun 4, 2009 at 4:59 PM, Mark Murphy mmur...@commonsware.com wrote: hi. i am new to android i have devloped a camera application . it takes the the images and saved in gallary and later u upload a images into the web but when i take captured a images through my application the images is not shown in the gallary although it saved in gallary .But when i restart the phone than all the images i captrued is visibly in the gallary. so i have to restart the phone every time to seen images which i captured so plz help me on this its urgent. If it's urgent, then you probably should be hiring a consultant. Support on these lists is on a volunteer basis and does not necessarily fit an urgent timetable. Here is one possible solution to your issue: http://groups.google.com/group/android-developers/browse_thread/thread/cf41cc88b6eb4393/a628ce0a1e9cd3cd -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 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: Help with google uploader application
hi sujay krishna i am new to android and i would also like to devlop applciation which captures the images and save that images for upload so can u plz give me your code for that application because i tried a lot but i sitll can't save that images.so plz its urgent for me to complete that application. regards jaimin. On May 28, 4:24 pm, Sujay Krishna sujay.coold...@gmail.com wrote: i found my mistake i forgot to add the EXTRA_STREAM in the extras... now its workin fine... if anyone is need of such an app jus send me a request... On May 28, 11:35 am, Sujay Krishna Suresh sujay.coold...@gmail.com wrote: Hi everyone, i'm trying to build anapplicationthat captures an image shares it... 'm calling the inbuiltcameraapplicationwith the following code code Intent i = new Intent(android.media.action.IMAGE_CAPTURE); startActivityForResult(i, 0); /code N my on activity result is code �...@override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == 0 resultCode == Activity.RESULT_OK) { Intent i = new Intent(Intent.ACTION_SEND); i.setType(image/jpeg); i.putExtras(data); startActivity(i); } finish();} /code whenever i select the upload button i get a toast sayin couldn't send photo data not available... anyone can temme wats goin wrong?? i'm using SDK 1.0 r2 -- Regards, Sujay http://www.brainyquote.com/quotes/authors/b/bette_davis.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] camera api
hi i am new to android . i want to devlope for camera api but i have some problem in my code when i tried to capture image it gives me force close errors package indiaNIC.android.cameratest; import java.io.IOException; import android.app.Activity; import android.content.Intent; import android.graphics.PixelFormat; import android.hardware.Camera; import android.net.Uri; import android.os.Bundle; import android.util.Log; import android.view.KeyEvent; import android.view.MenuItem; import android.view.SurfaceHolder; import android.view.SurfaceView; public class cameratest extends Activity implements SurfaceHolder.Callback { private static final String TAG = CameraApiTest; Camera mCamera; boolean mPreviewRunning = false; public void onCreate(Bundle icicle) { super.onCreate(icicle); Log.e(TAG, onCreate); getWindow().setFormat(PixelFormat.TRANSLUCENT); setContentView(R.layout.main); mSurfaceView = (SurfaceView)findViewById(R.id.surface); mSurfaceHolder = mSurfaceView.getHolder(); mSurfaceHolder.addCallback(this); mSurfaceHolder.setType (SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); } public boolean onCreateOptionsMenu(android.view.Menu menu) { MenuItem item = menu.add(0, 0, 0, goto gallery); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { public boolean onMenuItemClick(MenuItem item) { Uri target = Uri.parse(content://media/external/ images/media); Intent intent = new Intent(Intent.ACTION_VIEW, target); startActivity(intent); return true; } }); return true; } @Override protected void onRestoreInstanceState(Bundle savedInstanceState) { super.onRestoreInstanceState(savedInstanceState); } Camera.PictureCallback mPictureCallback = new Camera.PictureCallback() { public void onPictureTaken(byte[] data, Camera c) { Log.e(TAG, PICTURE CALLBACK: data.length = + data.length); mCamera.startPreview(); } }; public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { return super.onKeyDown(keyCode, event); } if (keyCode == KeyEvent.KEYCODE_SPACE) { mCamera.takePicture(null, mPictureCallback, mPictureCallback); return true; } return false; } protected void onResume() { Log.e(TAG, onResume); super.onResume(); } protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); } protected void onStop() { Log.e(TAG, onStop); super.onStop(); } public void surfaceCreated(SurfaceHolder holder) { Log.e(TAG, surfaceCreated); mCamera = Camera.open(); //mCamera.startPreview(); } public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) { Log.e(TAG, surfaceChanged); // XXX stopPreview() will crash if preview is not running if (mPreviewRunning) { mCamera.stopPreview(); } Camera.Parameters p = mCamera.getParameters(); p.setPreviewSize(w, h); mCamera.setParameters(p); try { mCamera.setPreviewDisplay(holder); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } mCamera.startPreview(); mPreviewRunning = true; } public void surfaceDestroyed(SurfaceHolder holder) { Log.e(TAG, surfaceDestroyed); mCamera.stopPreview(); mPreviewRunning = false; mCamera.release(); } private SurfaceView mSurfaceView; private SurfaceHolder mSurfaceHolder; } package indiaNIC.android.cameratest; import java.io.OutputStream; import android.graphics.Camera; import android.hardware.Camera.PictureCallback; import android.util.Log; public class ImageCaptureCallback implements PictureCallback { private OutputStream filoutputStream; public ImageCaptureCallback(OutputStream filoutputStream) { this.filoutputStream = filoutputStream; } public void onPictureTaken(byte[] data, Camera camera) { try { Log.v(getClass().getSimpleName(), onPictureTaken= + data + length = + data.length); filoutputStream.write(data); filoutputStream.flush(); filoutputStream.close(); } catch(Exception ex) { ex.printStackTrace(); } } @Override public void onPictureTaken(byte[] arg0, android.hardware.Camera arg1) { // TODO Auto-generated method stub } } this 2 java class is my code plz help me on this its urgent --~--~-~--~~~---~--~~ You received this message
[android-developers] Re: playing video file
thanks for the suggestion but i have solve that with multiply by 16 to my 320*480px and it runs in full screen On Thu, Apr 2, 2009 at 11:26 AM, Dave Sparks davidspa...@android.comwrote: Have you looked at the VideoView widget? On Apr 1, 2:41 am, jaimin jaiminmeht...@gmail.com wrote: hi, i have problem in playing video file. Video file is playing nice but i want to play video file in the whole emulator (size).Right now video file is playing but in small size. so any suggestion or solution plz help me. thanks. jaimin. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] sms database
hi. i am new to android . i want to devlop an appliaction in which i put lots of sms in the phone's sms database and then i would like to send those sms to contacts which user selected. 1)so first i want to know how can i see the sms database. 2)and how can i update those sms database so any suggestio or sources codes to help me? thanks. jaimin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 know SMS and Contacts update?
hi . i am new to android. i have same problem or questio that u have so if u find any answer then plz can u share with me? because i need the solution very badly. On Mar 16, 12:41 pm, Kenny yxw...@gmail.com wrote: Can anybody help? To be clear, I want to write a Android Java program to monitor the sent-outSMSand input contacts (like SYNC caused). BecauseSMSand Contacts are both stored indatabase, I want to know if android.database.ContentObserver is good for this purpose. First I wish to listen to ContentObserver::onChange(). Then I will querydatabaseto see ifSMS/Contacts were just added/updated. If this is doable, really wish to get some sample code. Kenny On Mar 15, 12:09 pm, Kenny Yu yxw...@gmail.com wrote: WhereSMS/Contacts are added/updated/deleted, how can I write an App- Service to know the contents change? The changes are possibly caused by App activities or SYNC activity, or any else. Any content observer or intents I should look into? Welcome your design suggestion. Kenny --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] playing video file
hi, i have problem in playing video file. Video file is playing nice but i want to play video file in the whole emulator (size).Right now video file is playing but in small size. so any suggestion or solution plz help me. thanks. jaimin. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] imageswitcher
hi. i want to develop a application like imageswitcher but instead of images that show in gallery i want to display a videos in that gallery.i want to develop application same as in APIDEMOS- IMAGESWITHCER . so any help for that? thanks. jaimin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] writing into sd card falling
hi . i have created one apllication in that i have download images and stored into my sd card but while downloading my images are not stored in my sd card folder so any help here is my code class DThread extends Thread { public void run() { // Get a Connection Object HttpURLConnection conn; try { for(int count=imageCount;count=maxLength;count++ ) { // Change URL to live Id conn = (HttpURLConnection)new URL(url + count + .jpg ).openConnection(); conn.setDoInput(true); conn.connect(); InputStream is = conn.getInputStream(); Bitmap bm = BitmapFactory.decodeStream(is); //Intended Page will get into Sd Card FileOutputStream fos = new FileOutputStream(/sdcard/dirctory/ page+ count + .jpg); bm.compress(CompressFormat.JPEG, 100, fos); fos.flush(); fos.close(); } } catch (MalformedURLException e) { e.printStackTrace(); Log.e(Malformed URL,e.toString()); } catch (IOException e) { e.printStackTrace(); Log.e(IO Exception,e.toString()); } but in this code it will catch the IOEXCEPTION so any suggestion for that issue plz help me its urgent. thanks. jaimin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---