[android-developers] Re: Strange force close on Froyo phone, works fine on ICS tablet
I release a tool to help developer to dump API from Android device. This tool may help you to check if class, method, or field existed at target device. You can get it from Google Play by URL below. http://market.android.com/details?id=com.twrd.yulin.classminer -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Bluetooth devices is pairing but not connecting
i found my problem problem have server code tmp = mAdapter.listenUsingRfcommWithServiceRecord(NAME_SECURE, MY_UUID_SECURE); } else { tmp = mAdapter.listenUsingRfcommWithServiceRecord( NAME_INSECURE, MY_UUID_INSECURE); } } catch (IOException e) {} Problem is uuid because I dont know other device uuid.i dont send file to my application i wanna just send file over bluettooth to any device i chanced this code with this m = mAdapter.getClass().getMethod(listenUsingRfcommOn, new Class[] { int.class }); tmp = (BluetoothServerSocket) m.invoke(mAdapter, 1); } catch (SecurityException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } it send java.lang.reflect.invocationtargetexception erorr please help :S -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Cut function in android
hii, I want to built an application in android such that on existing image, i can able to draw cut operation and move that part on existing image same as we have in paint as free form selection function in that we can perform cut operation on existing image same as i want to built in android. So help me to built this application in android with code sample... Regards, Siddharth -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 there any way to simulate reverse Portrait with api level 8?
Anyone have an idea? On 24 avr, 10:58, nguillot nguil...@ippon.fr wrote: Hello, My constraints are: *portraitorientation for my activities * min sdk = APIlevel8. So according tohttp://developer.android.com/guide/topics/manifest/activity-element.html I use portrait for android:screenOrientation attribute. I also added orientation to android:configChanges attribute. But when I rotate my tablet to 180° my activity doesn't rotate and my top will located to the bottom. I guess I should use something like portrait| reversePortrait for android:screenOrientation attribute. But reversePortrait is not available forAPIlevel8. Anybody know how to proceed? 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: Bluetooth devices is pairing but not connecting
Hi, Build bluetooth chat demo app from sdk try connecting with that. Regards On Apr 30, 4:43 pm, hüseyin toplu hsy...@gmail.com wrote: i found my problem problem have server code tmp = mAdapter.listenUsingRfcommWithServiceRecord(NAME_SECURE, MY_UUID_SECURE); } else { tmp = mAdapter.listenUsingRfcommWithServiceRecord( NAME_INSECURE, MY_UUID_INSECURE); } } catch (IOException e) {} Problem is uuid because I dont know other device uuid.i dont send file to my application i wanna just send file over bluettooth to any device i chanced this code with this m = mAdapter.getClass().getMethod(listenUsingRfcommOn, new Class[] { int.class }); tmp = (BluetoothServerSocket) m.invoke(mAdapter, 1); } catch (SecurityException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } it send java.lang.reflect.invocationtargetexception erorr please help :S -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Run two applications and split the screen in two parts
I am making an application in which the screen will be splitted in two parts and both the screens will be using different medias: one for camera using Camera HAL and other will be playing a Video file using StageFright. I need help in playing the Video file and how to handle the threds for both the processes simultaneosly 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: Bluetooth devices is pairing but not connecting
i checked it but its peer to peer connection but i wanna just send a file to any device this device will not have my application it will just took the file On Apr 30, 10:51 am, gjs garyjamessi...@gmail.com wrote: Hi, Build bluetooth chat demo app from sdk try connecting with that. Regards On Apr 30, 4:43 pm, hüseyin toplu hsy...@gmail.com wrote: i found my problem problem have server code tmp = mAdapter.listenUsingRfcommWithServiceRecord(NAME_SECURE, MY_UUID_SECURE); } else { tmp = mAdapter.listenUsingRfcommWithServiceRecord( NAME_INSECURE, MY_UUID_INSECURE); } } catch (IOException e) {} Problem is uuid because I dont know other device uuid.i dont send file to my application i wanna just send file over bluettooth to any device i chanced this code with this m = mAdapter.getClass().getMethod(listenUsingRfcommOn, new Class[] { int.class }); tmp = (BluetoothServerSocket) m.invoke(mAdapter, 1); } catch (SecurityException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } it send java.lang.reflect.invocationtargetexception erorr please help :S -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Reading ROM version through code
And as we all know... the trees do not grow into the sky ;-) This morning, I tried this with a few Sony Ericsson phones I had at the office. And they do not return anything when I try to get the ro.product.version property. I still get the ro.build.fingerprint, but nothing else. Does anyone know if there is a place I can read the different handset providers property names? A wiki somewhere...? /rasmus Den søndag den 29. april 2012 22.09.58 UTC+2 skrev JP: Hey guys... This code works... although I'm not that keen on it, since it is definitely not part of the jars available. But it works: @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); TextView arch = (TextView)findViewById(R.id.arch); TextView name = (TextView)findViewById(R.id.name); TextView version = (TextView)findViewById(R.id.version); TextView roversion = (TextView)findViewById(R.id.roversion); TextView rofingerprint = (TextView)findViewById(R.id.rofingerprint); arch.setText(os.arch: + System.getProperty(os.arch)); name.setText(os.name: + System.getProperty(os.name)); version.setText(os.version: + System.getProperty(os.version)); roversion.setText(ro.product.version: + getProp(ro.product.version, Not found)); rofingerprint.setText(ro.build.fingerprint: + getProp(ro.build.fingerprint, Not found)); } private String getProp(String prop, String defaultVal) { String line = defaultVal; try { Process ifc = Runtime.getRuntime().exec(getprop + prop); BufferedReader bis = new BufferedReader(new InputStreamReader(ifc.getInputStream())); line = bis.readLine(); ifc.destroy(); } catch (java.io.IOException e) { } return line; } This returns: TextView arch = (TextView)findViewById(R.id.arch); TextView name = (TextView)findViewById(R.id.name); TextView version = (TextView)findViewById(R.id.version); TextView roversion = (TextView)findViewById(R.id.roversion); TextView rofingerprint = (TextView)findViewById(R.id.rofingerprint); arch.setText(os.arch: + System.getProperty(os.arch)); name.setText(os.name: + System.getProperty(os.name)); version.setText(os.version: + System.getProperty(os.version)); roversion.setText(ro.product.version: + System.getProperty(ro.product.version)); rofingerprint.setText(ro.build.fingerprint: + System.getProperty(ro.build.fingerprint)); Which gave me this output on my HTC Legend: os.arch : armv6l os.name: Linux os.version: 2.6.32.17-g30929af ro.product.version: 3.15.405.3 ro.build.fingerprint: htc_wwe/htc_legend/legend/legend:2.2/FRF91/291292:user/release-keys On Sunday, April 29, 2012 12:30:36 PM UTC+2, JP wrote: I tried using this code: TextView arch = (TextView)findViewById(R.id.arch); TextView name = (TextView)findViewById(R.id.name); TextView version = (TextView)findViewById(R.id.version); TextView roversion = (TextView)findViewById(R.id.roversion); TextView rofingerprint = (TextView)findViewById(R.id.rofingerprint); arch.setText(os.arch: + System.getProperty(os.arch)); name.setText(os.name: + System.getProperty(os.name)); version.setText(os.version: + System.getProperty(os.version)); roversion.setText(ro.product.version: + System.getProperty(ro.product.version)); rofingerprint.setText(ro.build.fingerprint: + System.getProperty(ro.build.fingerprint)); Which gave me this output on my HTC Legend: os.arch : armv6l os.name: Linux os.version: 2.6.32.17-g30929af ro.product.version: null ro.build.fingerprint: null So this didn't work either unfortunately... I'll keep looking! JP On Monday, April 23, 2012 4:53:25 PM UTC+2, Chris Stratton wrote: On Monday, April 23, 2012 7:54:50 AM UTC-4, JP wrote: Didn't find anything unfortunately. Is this really impossible to do? Open an adb shell, type getprop and look at the result. Some entries which may be of interest: ro.build.fingerprint ro.build.version.* ro.product.version These should be readable by apps; what I don't know off the top of my head is which (if any) are stable API's and which are private and thus subject to change without notice. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] LogCat Message...
Application com.db DEBUG 04-30 16:47:46.864: E/DEBUG(15481): ActivityRecord{4051d280 token=android.os.BinderProxy@4051ce18 {com.db/com.db.DbTestActivity}}: app=android.app.Application@40520868, appName=com.db, pkg=com.db, comp={com.db/com.db.DbTestActivity}, dir=/data/app/com.db-2.apk ActivityThread 04-30 16:47:46.887: E/ActivityThread(15481): ActivityThread.java,performLaunchActivity(),classname=com.db.DbTestActivity what is the mean with above text -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] how to lock the phone at landscape mode?
Hi. I am using Rotation Locker to lock my phone at any orientation I want. It work so great. Then, i really want to build an my own demo like that. I just lock the phone at portrait orientation only. I have make vary searching on the web but i can't find any solution. Somebody tell me how to lock the phone at landscape orientation please? Thank. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 and Elcipse create new project error: SDK not installed and missing a file.
I'm having a problem creating a new Android project in Eclipse. I have installed Eclipse, ADT 18.0.0 and the latest SDK 19 but I get an error when I try and create a new project. I'm able to select an Android project type but when I get it a name I get the error that I don't have the latest SDK and that I'm missing the file /tools/lib/progaurd-project.txt. I see that file in the folder from where the original SDK was downloaded and extracted. Am I to copy that file to another location or is the SDK installer/wizard to do that. I'm running Fedora 16 fully patched. Rich -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] algorithm data synchronization (SQLite to Online Database)
I am making a app that need synchronize data with a online server. What do the best way to make? I thought at create a database local (SQLite) that will synchronize with a online database server with structure equals. Would be best online XML or online database? Other question is if exists any algorithm known of data synchronization. Exists? -- Thiago C. S. Ventura *P* Antes de imprimir esse e-mail, pense em seu compromisso com o* Meio Ambiente*. Verifique se o equipamento possui recursos como impressão frente e verso e dê preferência a impressão em modo monocromático. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] help
how can you use array as in java in android? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Smsmanager not working in native extension ?
Dear all developer, Appreciate someone can help me on my code here. I am building an apps in flash builder and try to call the native extension sending sms on background without user interaction. Besides that, inside the native function , i also added notification by using notification manager and this notification works fine. Now i stuck in smsmanager and it seems like failed to sent out sms. Need someone help to check on this, is my declaration on smsmanager in this native extension code correct? Regards Chua Here is the code : package com.chua.notifications; import android.app.Activity; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.telephony.SmsManager; import com.adobe.fre.FREContext; import com.adobe.fre.FREFunction; import com.adobe.fre.FREInvalidObjectException; import com.adobe.fre.FREObject; import com.adobe.fre.FRETypeMismatchException; import com.adobe.fre.FREWrongThreadException; public class NotificationFunction extends Activity implements FREFunction { @Override public FREObject call(FREContext context, FREObject[] args) { //Calling notitifcaion String ns = Context.NOTIFICATION_SERVICE; NotificationManager mNotificationManager = (NotificationManager) context.getActivity().getSystemService(ns); long when = System.currentTimeMillis(); Notification notification = new Notification(context.getResourceId(drawable.notify), message, when); notification.defaults |= Notification.DEFAULT_SOUND; CharSequence contentTitle = Notification from Flash; CharSequence contentText = Hello ;//message; Intent notificationIntent = new Intent(); PendingIntent contentIntent = PendingIntent.getActivity(context.getActivity(), 0, notificationIntent, 0); notification.setLatestEventInfo(context.getActivity(), contentTitle, contentText, contentIntent); final int HELLO_ID = 1; mNotificationManager.notify(HELLO_ID, notification); //Sending SMS SmsManager smsManager = SmsManager.getDefault(); String smsNumber = 0133998088; //01224244170122424417; String smsText = Already reached broga hill?; smsManager.sendTextMessage(smsNumber, null, smsText, null, null); return null; } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] L2ping
Hi All I am looking for l2ping utility on Nexus S Currently I see l2ping not found on shell. Thanks Shaishav -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] value of EditText duplicated in ListView
at the same time you call notifyDataSetChanged(),you should update you inputdate in dateresource of listview 2012/4/28 Justin Anderson magouyaw...@gmail.com After you edit the text in the textview you need to update your adapter with the new information, and then call notifyDataSetChanged(). Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Fri, Apr 27, 2012 at 8:32 AM, Seif-Allah seifallah.bena...@gmail.comwrote: I have list item with EditText in it, I dont know how many items there will be. I have a problem when I enter some text in EditText, and then scroll down a ListView, after I've scroll up again there is no text in my first EditText, or there is some text from other EditText from ListView. please help -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Saving files (pdf/doc) to /data/data(appname)/files folder from Assets
I have pdf files and other documents stored in the assets folder of my workspace. I want them transfered to the /data/data/(packagename)/ files directory as soon as the app is installed or on first run. I wrote, with help, a section of code that is supposed to do that. But when running nothing happens. No errors in logcat either. I feel like it is something stupid that I am missing but since I'm a novice I am not quite sure. I also want it to handle opening pdf files as necessary hence the code near the bottom. Here is the entire code of the file. public class TestActivity extends Activity { public void copyFileOrDir(String path) { AssetManager assetManager = this.getAssets(); String assets[] = null; try { assets = assetManager.list(path); if (assets.length == 0) { copyFile(path); } else { String fullPath = /data/data/ + this.getPackageName() + / + /files/ + path; File dir = new File(fullPath); if (!dir.exists()) dir.mkdir(); for (int i = 0; i assets.length; ++i) { copyFileOrDir(path + / + assets[i]); } } } catch (IOException ex) { Log.e(tag, I/O Exception, ex); } } private void copyFile(String filename) { AssetManager assetManager = this.getAssets(); InputStream in = null; OutputStream out = null; try { in = assetManager.open(filename); String newFileName = /data/data/ + this.getPackageName() + / + /files/ + filename; out = new FileOutputStream(newFileName); byte[] buffer = new byte[1024]; int read; while ((read = in.read(buffer)) != -1) { out.write(buffer, 0, read); } in.close(); in = null; out.flush(); out.close(); out = null; } catch (Exception e) { Log.e(tag, e.getMessage()); } } /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button Section = (Button) findViewById(R.id.Button); Section.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { // TODO Auto-generated method stub Intent i = new Intent(TestActivity.this, Section.class); startActivity(i); } }); Button OpenPDF = (Button) findViewById(R.id.pdfButton); OpenPDF.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { File pdfFile = new File(file:/// android:asset/keepitsmall.pdf); if (pdfFile.exists()) { Uri path = Uri.fromFile(pdfFile); Intent pdfIntent = new Intent(Intent.ACTION_VIEW); pdfIntent.setDataAndType(path, application/pdf); pdfIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); try { startActivity(pdfIntent); } catch (ActivityNotFoundException e) { Toast.makeText(TestActivity.this, No Application available to view pdf, Toast.LENGTH_LONG).show(); } } } }); } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] porting webapplication on android platform
hello every one. This is karunakar working as a senior programmer and new to android platform.i have developed one webapplication using perl and cgi. now am trun to port my webapplication to android platform. am totally new to android. can any give the suggestion how can i achieve this. the webapplication is regarding to machine translation system. thanks every one. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] question about activity cycle recreated in 4.0
In android 2.2, my program code build act1, and act1 can switch to act2 with act1 not finished, so while act2 finished, it would go back to act1. but in android 4.0(and later), while act2 finished, it go back to act1, but act1 is recreated.(not the one switch to act2) anyone knows trick? Thanks a lot! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] about keyevent
Dear Sirs, I want to catch the keyevent which didn't receive by other receiver(activities) to do its functional purpose, I mean if some keyevents didn't be used to do its corresponding actions, how can I modify the framework to capture this event to do the same works? is it possible modify the PhoneWindow??? Thanks for your helps :D -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Color Banding solved
Color Banding Solved ooyyyeaa I solved color banding in two phases 1) * when we use the BitmapFactory to decode resources it decodes the resource in RGB565 which shows color banding, instead of using ARGB_, so i used BitmapFactory.Options for setting the decode options to ARGB_ second problem was whenever i scaled the bitmap it again got banded 2) This was the tough part and took a lot of searching and finally worked * the method Bitmap.createScaledBitmap for scaling bitmaps also reduced the images to RGB565 format after scaling i got banded images(the old method for solving this was using at least one transparent pixel in a png but no other format like jpg or bmp worked)so here i created a method CreateScaledBitmap to scale the bitmap with the original bitmaps configurations in the resulting scale bitmap(actually i copied the method from a post by logicnet.dk and translated in java) BitmapFactory.Options myOptions = new BitmapFactory.Options(); myOptions.inDither = true; myOptions.inScaled = false; myOptions.inPreferredConfig = Bitmap.Config.ARGB_;// important //myOptions.inDither = false; myOptions.inPurgeable = true; Bitmap tempImage = BitmapFactory.decodeResource(getResources(),R.drawable.defaultart, myOptions);//important //this is important part new scale method created by someone else tempImage = CreateScaledBitmap(tempImage,300,300,false); ImageView v = (ImageView)findViewById(R.id.imageView1); v.setImageBitmap(tempImage); // the function public static Bitmap CreateScaledBitmap(Bitmap src, int dstWidth, int dstHeight, boolean filter) { Matrix m = new Matrix(); m.setScale(dstWidth / (float)src.getWidth(), dstHeight / (float)src.getHeight()); Bitmap result = Bitmap.createBitmap(dstWidth, dstHeight, src.getConfig()); Canvas canvas = new Canvas(result); //using (var canvas = new Canvas(result)) { Paint paint = new Paint(); paint.setFilterBitmap(filter); canvas.drawBitmap(src, m, paint); } return result; } Please correct me if i am wrong. Also comment if it worked for you. I am so happy i solved it, Hope it works for 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
Re: [android-developers] Forced Close for Googles Notepad Exercise 2
Did you made changes in AndroidManifest.XML. See Step-11 in the link you referred to. On Mon, Apr 30, 2012 at 2:32 AM, Marcus Maximus marcus.pres...@gmail.comwrote: Hey guys, i am doing that http://developer.android.com/resources/tutorials/notepad/notepad-ex2.html. But when I want to run it on Android 2.2 emulator I get an error: Here is the log file: 04-29 19:58:24.561: I/Process(336): Sending signal. PID: 336 SIG: 9 04-29 19:58:28.651: W/KeyCharacterMap(344): No keyboard for id 0 04-29 19:58:28.651: W/KeyCharacterMap(344): Using default keymap: / system/usr/keychars/qwerty.kcm.bin 04-29 19:58:29.791: D/AndroidRuntime(344): Shutting down VM 04-29 19:58:29.791: W/dalvikvm(344): threadid=1: thread exiting with uncaught exception (group=0x4001d800) 04-29 19:58:29.821: E/AndroidRuntime(344): FATAL EXCEPTION: main 04-29 19:58:29.821: E/AndroidRuntime(344): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.notepad2/com.notepad2.NoteEdit}; have you declared this activity in your AndroidManifest.xml? 04-29 19:58:29.821: E/AndroidRuntime(344): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java: 1404) 04-29 19:58:29.821: E/AndroidRuntime(344): at android.app.Instrumentation.execStartActivity(Instrumentation.java: 1378) 04-29 19:58:29.821: E/AndroidRuntime(344): at android.app.Activity.startActivityForResult(Activity.java:2817) 04-29 19:58:29.821: E/AndroidRuntime(344): at com.notepad2.Notepad2Activity.createNote(Notepad2Activity.java:111) 04-29 19:58:29.821: E/AndroidRuntime(344): at com.notepad2.Notepad2Activity.onMenuItemSelected(Notepad2Activity.java: 83) 04-29 19:58:29.821: E/AndroidRuntime(344): at com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected(PhoneWindow.java: 730) 04-29 19:58:29.821: E/AndroidRuntime(344): at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java: 143) 04-29 19:58:29.821: E/AndroidRuntime(344): at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java: 855) 04-29 19:58:29.821: E/AndroidRuntime(344): at com.android.internal.view.menu.IconMenuView.invokeItem(IconMenuView.java: 532) 04-29 19:58:29.821: E/AndroidRuntime(344): at com.android.internal.view.menu.IconMenuItemView.performClick(IconMenuItemView.java: 122) 04-29 19:58:29.821: E/AndroidRuntime(344): at android.view.View $PerformClick.run(View.java:8816) 04-29 19:58:29.821: E/AndroidRuntime(344): at android.os.Handler.handleCallback(Handler.java:587) 04-29 19:58:29.821: E/AndroidRuntime(344): at android.os.Handler.dispatchMessage(Handler.java:92) 04-29 19:58:29.821: E/AndroidRuntime(344): at android.os.Looper.loop(Looper.java:123) 04-29 19:58:29.821: E/AndroidRuntime(344): at android.app.ActivityThread.main(ActivityThread.java:4627) 04-29 19:58:29.821: E/AndroidRuntime(344): at java.lang.reflect.Method.invokeNative(Native Method) 04-29 19:58:29.821: E/AndroidRuntime(344): at java.lang.reflect.Method.invoke(Method.java:521) 04-29 19:58:29.821: E/AndroidRuntime(344): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:868) 04-29 19:58:29.821: E/AndroidRuntime(344): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 04-29 19:58:29.821: E/AndroidRuntime(344): at dalvik.system.NativeStart.main(Native Method) What am I doing wrong ? greetings and thx 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 -- Regards, *Naseem Rafique | Software Engineer* *NorthBay Solutions | 410-G4 Johar Town, Lahore Cell: 0331-4153428 * -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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_custom keyboard
Hi all Now i am doing a custom keyboard project, for me i want to display the different imaged for different keys in my android custom keyboard, for this puspose me used the android:keyIcon in my xml by doing this the images are appearing as the background, but when the orientation changes the images gets mismatched with key sizes, i need to change the image sise also while changing the key sizes, plz help... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Images in a list..
I have a ListActivity with my own ListView class and Adapter to add data to the list.. I also have a unique rowitem latyout that defines a TextView and 2 ImageView items: LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=wrap_content android:layout_height=wrap_content android:orientation=horizontal TextView android:id=@+id/textView1 android:layout_width=258dp android:layout_height=wrap_content android:onClick=@string/myClickHandler android:text=@+id/label android:textAppearance=?android:attr/textAppearanceMedium / ImageView android:id=@+id/imageView1 android:layout_width=wrap_content android:layout_height=wrap_content android:src=@android:drawable/ic_menu_edit android:onClick=@string/myClickHandler/ ImageView android:id=@+id/imageView2 android:layout_width=wrap_content android:layout_height=wrap_content android:src=@android:drawable/ic_menu_delete android:onClick=@string/myClickHandler/ /LinearLayout I am able to drag and drop rows, as well as respond to clicks of the images of the rows.. My question is, how can I figure out what row a clicked ImageView object is in? The images are used to edit and delete row data... I can see the click but I cant seem to reconcile what row the image is in? 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_customkeyboard
Hi all, i am doing custom keyboard project, i need to implement the different images for different keys in my custom keyboard, for this purpose me used android:keyicon while adding this attribute to my xml the image is taking as icon for each keys but when the orientation changes the images are miss matched with keys,i need to set a images which is full fit with keys ie when orienttation changes the images size also need to change with respect to keys -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 does the binder thread pool shrink?
I am reading through the binder code and trying to understand how the threading works. I know that the binder driver sends commands to increase the thread pool size when it detects that there is no free binder thread to service a command (up to the max of 16 threads). But I am not sure when these newly spawned threads are removed. In IPCThreadState.cpp: void IPCThreadState::joinThreadPool(bool isMain) { ... result = executeCommand(cmd); ... if(result == TIMED_OUT !isMain) { break; } ... } I see that the thread breaks out of the thread pool loop when result is set to TIMED_OUT, which in turn happens when the binder drive sends a command of BR_FINISHED. This would result in the handling binder thread to leave the thread pool and essentially end. But I looked through the binder driver source code and could not find any instance in which the driver would deliver this command to binder thread. Does this mean the binder thread pool will only grow in size and never shrink? I would appreciate any help on this topic. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Why installation or updation of android development kit directly in Internet is too slow ?
Hi, I'm using Android SDK manager 4.03 in fedora 15. I have an internet connection of minimum speed of 32 kilo bytes per second, but still it downloads the updates at the rate of just 3 to 4 kilo bytes per second. Installation and updation of the SDK tools in android sdk manager is too slow. Seems the server allows only a limited speed for every connected client. Is there any way I can increase the speed of download of new packages marked for updates. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: get notification tone uri
I think this link would be helpful for you http://stackoverflow.com/questions/2724871/how-to-bring-up-list-of-available-notification-sounds-on-android On Saturday, April 28, 2012 4:44:04 AM UTC-7, Amit Mangal wrote: HI there, is the any way to get notification tones uri. and after getting that uri how to play one from that uri. 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] Ice Cream Sandwich Camera Editing Tool
I got my xperia neo v upgraded to ics yesterday. after upgrading my camera had editing tools like crop,flip,straighten,etc. bBut suddenly today i noticed these editing tools are gone,eventhough my os is android 4.0.3. Plz help. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Fitting image to a screen
Hi!! I'm trying to load a picture from the gallery and display, everything works fine except that the returned image is stretched and doesn't fit the mobile screen size? I need help, thanks alot :) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 SDK and Eclipse Error You don't have the latest SDK installed
Hello, I'm having a problem creating a new Android project in Eclipse. I have installed Eclipse, ADT 18.0.0 and the latest SDK 19 but I get an error when I try and create a new project. I'm able to select an Android project type but when I get it a name I get the error that I don't have the latest SDK and that I'm missing the file /tools/lib/progaurd- project.txt. I see that file in the folder from where the original SDK was downloaded and extracted. Am I to copy that file to another location or is the SDK installer/wizard to do that. I'm running Fedora 16 fully patched. Thanks, Rich -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 wifi p2p unsupported (wifidirect)
Hello, i'm using the protocol for making p2p connection using wifi in android (http://developer.android.com/reference/android/net/wifi/p2p/package- summary.html) I have a problem calling the discoverPeers() function : ActionListener.onFailure(int reason) is called (its an interface to trigger some events) and i receive reason=1, which means 'P2P_UNSUPPORTED'. i use a virtual device and the latest android sdk(4.0.3), i have an internet connection on this device. uses-sdk android:minSdkVersion=15 / uses-permission android:name=android.permission.ACCESS_WIFI_STATE/ uses-permission android:name=android.permission.CHANGE_WIFI_STATE / uses permission android:name=android.permission.INTERNET/ uses-feature android:name=android.hardware.wifi.direct android:required=true -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 Play statistics
Hi I've uploaded an app to Google play and I know for sure there has been few downloads but I can't see it in the developers console. What is the reason? Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to bring an overlay to the front?
You can easily remove an overlay from your overlay list. First you must have a MapView and obviously an Overlay. private MapView map=null; Overlay MyOverlay = new Overlay(); Then you can choose between removing the overlay referencin the object name (overlay name) o with its index (position in the overlay list). map.getOverlays(); -- This is the list with all the overlays you have in the MapView. The same way you add an overlay: -- map.getOverlays().add(object name/index position); You can remove it: -- map.getOverlays().remove(object name/index position); You might want to save the index position at the time you create the overlay: Overlay MyOverlay = new Overlay(); int MyOverlayPosition = map.getOverlays().IndexOf(MyOverlay); and then remove it whenever you want. map.getOverlays().remove(MyOverlayPosition); Hope this is usefoul to you. I just started with android so im not much of an expert :) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Layouts - Using Remaining Space For Intermediate View
I'm using RelativeLayout to create rows of controls and would like to achieve the following: Widget 1 - natural height Custom view - remaining space after Widgets 1 and 3 Widget 3 - natural height If I add the view in the correct order and use FILL_PARENT, it uses the remaining space at that point - i.e., all following controls aren't visible as there's no more room. If I add the view at the end, using the BELOW rule to position below Widget 1, it does that - but overlaps all following controls (e.g. Widget 3, since that was set to be below Widget 1 as well). I tried adding a second rule to say ABOVE Widget 3, but then it didn't seem to place the view at all (or made it zero height?). I can't seem to measure the controls even after calling setContentView(my relative layout), they always return zero - so I can't even calculate the remaining space manually and use that. Is there another way to achieve this, or is there a way to measure the desired height of a control? I tried calling measure(some width, MeasureSpec.UNSPECIFIED) (after setContentView() ) but that also returned zero - very helpful. If there were a way to get notified when the layout takes place (so I can call the superclass to actually lay out, then measure / calculate heights and re-layout with a fixed height for the view) then that would help, but I can't find anything like that either. I would rather not use a fixed height and a scrolling view, as scrolling makes an app less pleasant to use (unless it's meant to be a list of things!). If possible, I would like the solution to be compatible with 2.1 (API 7). Thanks in advance. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] REST error IOException
Hello I'm trying to post some information for my rest webservice. HttpPost postMethod = new HttpPost(URL); ListNameValuePair nameValuePairs = new ArrayListNameValuePair(); nameValuePairs.add(new BasicNameValuePair(username,your user name)); nameValuePairs.add(new BasicNameValuePair(password,your password)); try { postMethod.setEntity(new UrlEncodedFormEntity(nameValuePairs)); DefaultHttpClient hc = new DefaultHttpClient(); HttpResponse response = hc.execute(postMethod); Toast.makeText(context, response.getStatusLine().toString(), Toast.LENGTH_LONG).show(); } catch (ClientProtocolException e) { Toast.makeText(context, 1: +e.getMessage(), Toast.LENGTH_LONG).show(); e.printStackTrace(); } catch (IOException e) { Toast.makeText(context, 2: +e.getMessage(), Toast.LENGTH_LONG).show(); e.printStackTrace(); } When I clicked in a button I call that method and I'm getting the message 2: mydomain.com Can someone 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] Stop sounds after leaving app
I am developing a game. This game starts a sound in the beginning and goes on during all the game. If I press Home button, and go to any area of android, the sound keeps playing, until I really force the app to stop. Whats the best aproach here ? There is some callback/listener, something that is called when app is not being used, but still running ? If so, would be the right aproach just to mute the sound ? I am developing this game using cocos2d, but this does not sounds like a cocos2d question.. Thanks in advance, Anderson -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] accessing contact image
Hey all, I'm developing an application that requires accessing the cantacts stored on the device then accesing their picture Thanks all, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Adding in-app products. Any limitations?
*Hi!* *I have a problem with batch import of a CSV file with my products, that I'd like to sell using in-app billing.* *The documentation claimes it's possible, I have prepared a correct file and...* 1. I have created CSV file with over 2.000 products 2. It has been processed, but only some 150 products were saved 3. I'm trying to upload the same file again, with 'overwrite' checked and I'm repeatedly receiving the information: Cannot process sent file. Check, whether the limit is not exceeded. 4. Moreover - I get this message only under IE. Under Chrome or FF just nothing happens. Please, I need urgent help, because I canit find answers anywhere on the internet and I just stucked. I'd like to offer full in-app biling functionality. There is also no information in the documentation, that would describe any limitations when batch importing products from CSV. Best regards, Tomek -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] getting the sim phone number
Hey all, I new to the Android SDK. I'm working on an application that requires the sim phone number Is there anyway to get the phone number of the SIM card, instead of sending a verification sms Thanks all... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Not allowed to start service Intent X without permission Y
Hi, I have a problem I can't solve: 04-25 14:16:30.931: E/AndroidRuntime(6638): FATAL EXCEPTION: main 04-25 14:16:30.931: E/AndroidRuntime(6638): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { (has extras) }} to activity {com.exclusive26.igale/ com.exclusive26.igale.Push_Activity}: java.lang.SecurityException: Not allowed to start service Intent { act=com.google.android.c2dm.intent.REGISTER pkg=com.google.android.gsf (has extras) } without permission com.google.android.c2dm.permission.RECEIVE 04-25 14:16:30.931: E/AndroidRuntime(6638): at android.app.ActivityThread.deliverResults(ActivityThread.java:2553) 04-25 14:16:30.931: E/AndroidRuntime(6638): at android.app.ActivityThread.handleSendResult(ActivityThread.java:2595) 04-25 14:16:30.931: E/AndroidRuntime(6638): at android.app.ActivityThread.access$2000(ActivityThread.java:121) 04-25 14:16:30.931: E/AndroidRuntime(6638): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:973) 04-25 14:16:30.931: E/AndroidRuntime(6638): at android.os.Handler.dispatchMessage(Handler.java:99) 04-25 14:16:30.931: E/AndroidRuntime(6638): at android.os.Looper.loop(Looper.java:130) 04-25 14:16:30.931: E/AndroidRuntime(6638): at android.app.ActivityThread.main(ActivityThread.java:3701) 04-25 14:16:30.931: E/AndroidRuntime(6638): at java.lang.reflect.Method.invokeNative(Native Method) 04-25 14:16:30.931: E/AndroidRuntime(6638): at java.lang.reflect.Method.invoke(Method.java:507) 04-25 14:16:30.931: E/AndroidRuntime(6638): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:866) 04-25 14:16:30.931: E/AndroidRuntime(6638): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:624) 04-25 14:16:30.931: E/AndroidRuntime(6638): at dalvik.system.NativeStart.main(Native Method) 04-25 14:16:30.931: E/AndroidRuntime(6638): Caused by: java.lang.SecurityException: Not allowed to start service Intent { act=com.google.android.c2dm.intent.REGISTER pkg=com.google.android.gsf (has extras) } without permission com.google.android.c2dm.permission.RECEIVE 04-25 14:16:30.931: E/AndroidRuntime(6638): at android.app.ContextImpl.startService(ContextImpl.java:867) 04-25 14:16:30.931: E/AndroidRuntime(6638): at android.content.ContextWrapper.startService(ContextWrapper.java:336) 04-25 14:16:30.931: E/AndroidRuntime(6638): at com.google.android.c2dm.C2DMessaging.register(C2DMessaging.java:54) 04-25 14:16:30.931: E/AndroidRuntime(6638): at com.exclusive26.igale.Push_Activity.register(Push_Activity.java:124) 04-25 14:16:30.931: E/AndroidRuntime(6638): at com.exclusive26.igale.Push_Activity.onActivityResult(Push_Activity.java: 58) 04-25 14:16:30.931: E/AndroidRuntime(6638): at android.app.Activity.dispatchActivityResult(Activity.java:3908) 04-25 14:16:30.931: E/AndroidRuntime(6638): at android.app.ActivityThread.deliverResults(ActivityThread.java:2549) 04-25 14:16:30.931: E/AndroidRuntime(6638): ... 11 more The intent does have the proper permission in manifest: MANIFEST: permission android:name=com.exclusive26.igale.permission.C2D_MESSAGE android:protectionLevel=signature / uses-permission android:name=com.exclusive26.igale.permission.C2D_MESSAGE/ uses-permission android:name=com.exclusive26.igale.c2dm.permission.RECEIVE/ ... ... activity android:name=.Push_Activity android:label=@string/app_name intent-filter action android:name=android.intent.action.MAIN / /intent-filter /activity ... ... service android:name=.C2DMReceiver / receiver android:name=com.google.android.c2dm.C2DMBroadcastReceiver android:permission=com.google.android.c2dm.permission.SEND intent-filter action android:name=com.google.android.c2dm.intent.RECEIVE / category android:name=com.exclusive26.igale / /intent-filter intent-filter action android:name=com.google.android.c2dm.intent.REGISTRATION/ category android:name=com.exclusive26.igale / /intent-filter /receiver following code in Push_Activity.java triggers the exception: com.google.android.c2dm.C2DMessaging.register( this, com.exclusive26.igale.Config.C2DM_SENDER ); parameters sent correctly (Push_Activity context and some email address -- static final String) to C2DMessaging.register : public static void register(Context context,String senderId) { Intent registrationIntent = new Intent(REQUEST_REGISTRATION_INTENT); registrationIntent.setPackage(GSF_PACKAGE); registrationIntent.putExtra(EXTRA_APPLICATION_PENDING_INTENT, PendingIntent.getBroadcast(context, 0, new Intent(), 0)); registrationIntent.putExtra(EXTRA_SENDER, senderId); context.startService(registrationIntent); // TODO: if intent not found, notification on need to have GSF } the fail point is when triggering the following line (cant debug the code in context.startService ) : context.startService(registrationIntent);
[android-developers] Canvas performance for games
I'm new to Android and Java, learning by porting a game I wrote years ago http://bombz.sourceforge.net. Based on the book Beginning Android Games by Mario Zechner, I'm using the technique of creating a fixed size android.graphics.Bitmap (640x480) in RGB_565 format, rendering the game tile by tile to its canvas with drawBitmap(bmp, srcRect, dstRect, 0), then blitting the 640x480 bitmap to a SurfaceView's canvas, also using drawBitmap(). AIUI drawBitmap() will scale if necessary, but I've only tested with 1:1 scaling on an 800x480 device, leaving a gap on the side. All the above is done in a separate thread, using a SurfaceHolder. It's too slow, even without the debugger attached. The test device is a ZTE Blade. The original ran at 50fps and looked nice and smooth. I'll probably run the Android version a bit slower to compensate for controller difficulties, but I'd like to keep the same amount of movement per frame. I could halve the framerate and double the movement per frame, but I think I'd struggle to reach even 20fps, and dropping the rate further would make it unpleasantly jerky. I've added some basic profiling and got some average times: Game logic: 1ms, fine, but still a lot to be implemented Rendering the game tile by tile: 46ms, too slow Blit: 8ms, not too bad but would need improving to allow time for all the other stuff The core of the stage that's too slow consists of rendering tiles. Each tile is 32x32 pixels and the game world is made up of 20x15 of them. There's one source pixmap, also RGB_565, containing all the tiles, and the correct 32x32 portion for each tile is obtained by the srcRect. I don't think I could significantly improve the logic of the loop that does the tile rendering, but I could change the paradigm so that I only render the tiles that have changed between frames. However, the draw the whole world on each frame technique is nice and simple and used to work even back in the days of Acorn computers with 100MHz ARMs, and I want to progress to writing 4 way scrolling games, where the whole screen has to be updated every frame. And even in this one I sometimes have to update a whole load of tiles at once when there's a big explosion chain. So I think it's just too slow to use Canvases and Bitmaps this way. Is the answer to my problem to use OpenGL? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 device in reboot loop.
This seems to be a common problem .the first thing you can try - and this works sometimes - when the tablet is shutdown hold the power button and volume button together down when reboot and this will reset the tablet. Next thing - call samsung they will give you a return label and you should have the tablet back in about 10 days Karl Pohl On Apr 28, 2012 10:10 PM, Nathan nathan.d.mel...@gmail.com wrote: Without any provocation, my Galaxy Tab 10.1 began to be stuck in a reboot loop this morning. Since this is a common device among Android developers, perhaps some of you have already dealt with this problem. It displays the Samsung name, then the swirly logo, then the Samsung name, then the swirly logo . . . adb says the device is complaining about, among other things, a Read Only file system. I haven't rooted, changed bootloaders, installed custom roms or anything of the sort. The last over the air update was last August, I believe. Thinking I may need to flash firmware any way, I followed the instructions at this page: http://www.theandroidsoul.com/android-3-2-1-update-for-galaxy-tab-10-1-is-out/ All appeared to go well. After that, the tablet boots as follows: Shows Samsung Galaxy Tab 10.1 label. Shows a think bar of static and stays there for a few minutes It displays the Samsung name, then the swirly logo, then the Samsung name, then the swirly logo . . . I don't know how to make the file system be not Read Only. Has the device bricked itself? Have I bricked it? This sure seems like a hardware problem if it survived a firmware update. Alas, my Tab 10.1, it was fun while it lasted. But at just a year old, it didn't last long. Nathan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Beep at particular period
Hi All, I wanted to implement some kind of Notification (like beep, vibration) for my app user. When i searched the net i found they implement it with timer but when i tried using it got error since i am already using timer for getting the tasks from server. Can any one help with simple code snippet so that i can use it. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] noob question
I am new to android programming using eclise. The book I am using is Android 3 sdk for dummies programming and the project is the tic tac toe one. The problem is that no tic tac toe graphic loads only a string of where a tic tac toe game is supposed to load. Is anyone familiar eough with this to offer any help? Would code snippets be ok to post here? 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] Textpaint vs textview : Text coming blurry with textpaint
Hi, I am not sure if this topic has been covered before since I was unable to find it in search. I am using the following code to populate text on screen. But the text is coming blurred instead of crisp (as it comes with textview). What else do I need to do? textpaint.setAntiAlias(true); textpaint.setStyle(Style.FILL); textpaint.setColor(Color.DKGRAY); textpaint.setTypeface(font); textpaint.setTextSize(fontsize); textpaint.setTextAlign(Paint.Align.LEFT); 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] which webservice to get Images?
Hey guys, I want to develop Wallpaper application for android. It is obvious that I will need a webservice integration in my app. My budget is thin, so can't afford to buy host/set up server etc. I need some start up tips/links/anything about on which public image hosting site should I upload images, which suppose to appear in the application when it is ready. I don't want to show all wallpapers from image hosting site in my app, but just the ones which I upload in some sort of account. I would greatly appreciate ANY tips/link to tutorial given regarding this subject. regards, Rushyang Darji -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Custom Content Provider and Multiple Tables
hi..i am using sync adapter in my application with one provider now..can i make another provider?can i sync two provider at a time?..plz help me..all example is using only one provider for sync operation can i possible to use two provider for sync? On Tuesday, August 26, 2008 12:34:21 AM UTC+5:30, Lonzo1968 wrote: Does anyone have an example of creating a custom ContentProvider that accesses multiple tables? Since the ContentProvider interface has a single insert, update, query, delete methods, and as far as I can see, you can only include one ContentProvider in your application. What if I have 2 tables Employee and Department for example.. do I handle the different inserts, etc.. with a Case statement in the method and a URI? Seems to me this lend itself to some code that could get unruley. Thanks, LA -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] HTTP internet connection
Hi, I have an app which talks to an external http server hosted on a data center. The app is working fine with Emulator under Eclipse on laptop connected through wifi to ISP's router. However when I create a signed app and download to an ICS tablet, the application goes upto http getconnection and does nothing. The tablet is connected to wifi and all standard applications are able to use the wifi. The AndroidManifest.xml contains permissions for Internet and Access_Network_State. a. What can be the reason why app is not able to connect to network ? b. Are there any debugging tools to see what could be happening ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] algorithm data synchronization (SQLite to Online Database)
I am making a app that need synchronize data with a online server. What do the best way to make? I thought at create a database local (SQLite) that will synchronize with a online database server with structure equals. Would be best online XML or online database? Other question is if exists any algorithm known of data synchronization. Exists? -- Thiago C. S. Ventura *P* Antes de imprimir esse e-mail, pense em seu compromisso com o* Meio Ambiente*. Verifique se o equipamento possui recursos como impressão frente e verso e dê preferência a impressão em modo monocromático. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Android permission denial : when using content provider within the same application that host the content provider
Hello, I have a very strange bug with my content provider, and I don't know why. I have 2 applications, 1 : it is for having an UI to change parameters and it's hosting the content provider with all the parameters 2 : it is display some text and it's using the parameters stored in the content provider of the first app. I have declared a content provider in my first app : provider android:name= com.telorion.core.parameters.ParametersContentProvider android:authorities= com.telorion.core.parameters.ParametersContentProvider android:multiprocess=true android:readPermission= com.telorion.core.parameters.READ_PARAMETERS android:writePermission= com.telorion.core.parameters.WRITE_PARAMETERS / with the specific permission : permission android:name=com.telorion.core.parameters.READ_PARAMETERS android:description=@string/parameter_read_description android:label=@string/parameter_read_label android:protectionLevel=normal / and in both apps, i've setted uses-permission android:name= com.telorion.core.parameters.READ_PARAMETERS / In the second app (who has not the content provider), it works like a charm, no problem at all. But in the first app who host the content provider, it works at begin, but after few calls, I've got this : 04-27 16:11:21.618: E/android(10922): Permission Denial: reading com.telorion.core.parameters.ParametersContentProvider uri content://com.telorion.core.parameters.ParametersContentProvider/telorionparameters from pid=0, uid=10024 requires com.telorion.core.parameters.READ_PARAMETERS 04-27 16:11:21.618: E/android(10922): java.lang.SecurityException: Permission Denial: reading com.telorion.core.parameters.ParametersContentProvider uri content://com.telorion.core.parameters.ParametersContentProvider/telorionparameters from pid=0, uid=10024 requires com.telorion.core.parameters.READ_PARAMETERS 04-27 16:11:21.618: E/android(10922): at android.content.ContentProvider$Transport.enforceReadPermission(ContentProvider.java:295) 04-27 16:11:21.618: E/android(10922): at android.content.ContentProvider$Transport.query(ContentProvider.java:177) 04-27 16:11:21.618: E/android(10922): at android.content.ContentResolver.query(ContentResolver.java:311). And I don't understand why. I've tried to create a third app who is using the content provider, and it worked without any problems. So the problem is coming from the first app who is hosting my content provider. But I don't know why after some calls I have a permission denial. Can somebody help me ? Thanks a lot for you help :) NB : When I remove the readPermission it works well in my 2 apps. But I don't want all apps can use it. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] inserting an image into a remote mysql DB
Hey all, Need help in inserting an image into a mysql database from android. Anyone could point me to a useful link or source code appreciated. 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] Offering new android features
jeez, somehow I couldn't find how to offer new android features to Google. Any ideas how to do that? thx. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android Gallery with Remote Image and Cachings
Can you post your code ? I'm trying to do a gallery with remote images. Thx a lot. On Wednesday, January 5, 2011 11:44:44 PM UTC+1, ankur wrote: Hi All, I am looking forward to create a Gallery which loads remote images. I am able to create the gallery, but it always downloads the images (next or previous). Can some one guide how to cache these images, so that the images are not downloaded each and every time. Thanks, Ankur -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] changing boot logo
Please let me know how can I change boot logo in Android 2.2. Thanks ug -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] sdk version
It depends what kind of APIs you have used in your application. First you'll have to test that app on different AVDs and then real devices. Finally you'll have to specify SDKVersions in Manifest. http://developer.android.com/guide/topics/manifest/uses-sdk-element.html regards, Rushyang Darji On Fri, Apr 27, 2012 at 12:21 PM, fachhoch fachh...@gmail.com wrote: if I want to deploy my app in a real device should that device sdk version match with my app sdk version? Also how can I find the sdk version of any device? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 force quit a Thread
Try the following line. This might help you. dataThread.join(); On Mon, Apr 30, 2012 at 9:04 AM, Matt Clark mrclark32...@gmail.com wrote: I am creating an app that sends various HTTP requests in seperate threads, while doing so brings up a loading screen. If the network request is taking longer then the user expects, I want them to be able to press the back button to force quit the thread, and dismiss the loading screen. I have my thread set up as: dataThread = new Thread(new Runnable() { public void run() { //... //Networking Data and Handlers //... } }); dataThread.start(); and where I want to force quit at onBackPressed() I have tried: dataThread.stop(); dataThread.destroy(); dataThread.interrupt(); And none of them work, Android does not support stop(), or destroy(), and interrupt() does nothing to stop the thread. I do not care about exceptions as everything will be caught, I just want it to allow the user to resume doing what they want, if it hangs on requests, or even retry the request.. Any and all help is greatly appreciated. ~Matt -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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, *Naseem Rafique | Software Engineer* *NorthBay Solutions | 410-G4 Johar Town, Lahore Cell: 0331-4153428 * -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Push Email
Hi there, A quick, hopefully simple, question. Does Android support Push Email? Cheers, Zanzizi -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Question regarding Keystore and Developer Console
I recently published an app to Google Play which I now want to update. When I try to export the new apk from Eclipse it says 'Invalid keystore format' It seems like my original apk file has overwritten the keystore! Normally it puts .apk at the end of the file name but this time it did not, and as I have the same name for the keystore and the apk I fear the key store has been deleted, is this possible? So now I can't update my app because if I use a new keystore it won't let me upload it. So I tried making a completely new application on the Developer Console but it obviously doesn't let me have two applications with the same package name. Having done a small amount of research it seems impossible to delete my original applications from the Developer Console? Is the only solution to change the package name and upload it as a brand new application, leaving the old one forever as 'unpublished'? Thank you very much in advance for your help. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: how to detect difference between 5 and 7 inch screen
How can i detect the difference between 5 and 7 inch screen. Would the DisplayMetrics class (using a combination of xdpi and widthPixels, for example) give you what you need? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 force quit a Thread
Thank you , Kristopher. That is an interesting read. This is an interesting discussion as it addresses a (probably) common situation. My penny's worth: Would it not be better to run the connection through a service, rather than a thread? I have a feeling that this would be easier to manage in the case described. An alternative would be to use an AsyncTask and use cancel(booelan) to stop it, and isCancelled() in the task (and therefore the thread essentially watches itself to speed up the kill). On Monday, 30 April 2012 06:47:03 UTC+2, Kristopher Micinski wrote: read this: http://docs.oracle.com/javase/1.5.0/docs/guide/misc/threadPrimitiveDeprecation.html On Mon, Apr 30, 2012 at 12:33 AM, Matt Clark mrclark32...@gmail.com wrote: What do you mean use flags? The app hangs on lines that wait for an HTTP response, so i want to be able to just cut them off mid execution if I have to, i cant call check statements before and after. Sorry, I do not know a whole lot about Threading. On Monday, April 30, 2012 12:09:25 AM UTC-4, Ankita wrote: stop(),destroy() etc. methods were deprecated by JDK versions, so must have not got support now. To stop thread, you should try to use flags, AFAIK. On Mon, Apr 30, 2012 at 9:34 AM, Matt Clark mrclark32...@gmail.com wrote: I am creating an app that sends various HTTP requests in seperate threads, while doing so brings up a loading screen. If the network request is taking longer then the user expects, I want them to be able to press the back button to force quit the thread, and dismiss the loading screen. I have my thread set up as: dataThread = new Thread(new Runnable() { public void run() { //... //Networking Data and Handlers //... } }); dataThread.start(); and where I want to force quit at onBackPressed() I have tried: dataThread.stop(); dataThread.destroy(); dataThread.interrupt(); And none of them work, Android does not support stop(), or destroy(), and interrupt() does nothing to stop the thread. I do not care about exceptions as everything will be caught, I just want it to allow the user to resume doing what they want, if it hangs on requests, or even retry the request.. Any and all help is greatly appreciated. ~Matt -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 On Monday, 30 April 2012 06:47:03 UTC+2, Kristopher Micinski wrote: read this: http://docs.oracle.com/javase/1.5.0/docs/guide/misc/threadPrimitiveDeprecation.html On Mon, Apr 30, 2012 at 12:33 AM, Matt Clark mrclark32...@gmail.com wrote: What do you mean use flags? The app hangs on lines that wait for an HTTP response, so i want to be able to just cut them off mid execution if I have to, i cant call check statements before and after. Sorry, I do not know a whole lot about Threading. On Monday, April 30, 2012 12:09:25 AM UTC-4, Ankita wrote: stop(),destroy() etc. methods were deprecated by JDK versions, so must have not got support now. To stop thread, you should try to use flags, AFAIK. On Mon, Apr 30, 2012 at 9:34 AM, Matt Clark mrclark32...@gmail.com wrote: I am creating an app that sends various HTTP requests in seperate threads, while doing so brings up a loading screen. If the network request is taking longer then the user expects, I want them to be able to press the back button to force quit the thread, and dismiss the loading screen. I have my thread set up as: dataThread = new Thread(new Runnable() { public void run() { //... //Networking Data and Handlers //... } }); dataThread.start(); and where I want to force quit at onBackPressed() I have tried: dataThread.stop(); dataThread.destroy(); dataThread.interrupt(); And none of them work, Android does not support stop(), or destroy(), and interrupt() does nothing to stop the thread. I do not care about exceptions as everything will be caught, I just want it to allow the user to resume doing what they want, if it hangs on requests, or even retry the request.. Any and all help is greatly appreciated. ~Matt
[android-developers] Native Maps Api - zoom to geocode returned viewport
This is a question I asked on Stackoverflow for which I got no answer. When I make a query to the Google Maps Api Geocode web service, the answer comes back with a number of elements : - Coordinates lat / lng - Viewport NE and SW - others The viewport is that which contains the recommended viewport for displaying the returned result, specified as two latitude,longitude values defining the southwest and northeast corner of the viewport bounding box. Generally the viewport is used to frame a result when displaying it to a user. Example given in the documentation : viewport : { northeast : { lat : 37.42426708029149, lng : -122.0840722197085 }, southwest : { lat : 37.42156911970850, lng : -122.0867701802915 } I have not been able to figure out how to adjust the zoom level to best match this viewport. Can anyone advise me on this ? Perhaps someone has already done this and would be willing to share ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Getting a list of Market-downloaded apps
Hello UBZack, Although it has been little over two years since you posted your question, I thought maybe by chance you still remember how you tackled this one, since I encountered the exact same challange in my project. Thanks a lot, Geva Tal. On Thursday, February 4, 2010 12:54:41 AM UTC+2, UBZack wrote: Thanks, Mark, for coming through yet again! :) I will try to find a way to distinguish market-bought apps in this list, or at least perhaps distinguish copy-protected ones (another thing I believe AppManager is capable of doing), and I will post any findings I make, if any. But for now, PackageManager is the road I intend to travel, so thank you again! -UBZack On Feb 3, 4:42 pm, Mark Murphy mmur...@commonsware.com wrote: Does anyone know if there's a way to retrieve a list of apps currently installed on the phone? You can get this from PackageManager. And once this list is retrieved, is there a way to filter down the list to only apps that have been downloaded via the market? I don't think PackageManager distinguishes between Market apps and apps installed via other means. I suppose another way to phrase that last question is: Can my app access the Downloads list that's in the Android Market app? Not via the SDK. -- Mark Murphy (a Commons Guy)http://commonsware.com Android App Developer Books:http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] reading file from SDcard
While reading file from sd card it throws /sdcard/test.txt (Permission Denied) exception I am using following code to read file and I also set following permission in manifest.xml user-permission android:name=android.permission.READ_EXTERNAL_STORAGE / File myFile1 = new File(/sdcard/ test30fps.mp4); myFile1.canRead(); FileInputStream fIn = new FileInputStream(myFile1); BufferedReader myReader = new BufferedReader( new InputStreamReader(fIn)); String aDataRow = ; String aBuffer = ; while ((aDataRow = myReader.readLine()) != null) { aBuffer += aDataRow + \n; } myReader.close(); what should i do to read file from SD card? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 send vCard via SMS?
I'm looking for any way to send/read a vCard via SMS in my app. I've read a lot of articles, web-pages, forums etc. There is still not even a clue how to do that. Here is transaction. 1. User selects some specific contact 2. App generates a vCard for it 3. User types a number to send vCard to 4. App sends SMS with that vCard(?) 5. Addressee recievs SMS with vCard and asked to browse contact/add to contacts(?) There are some posts on stackOverflow about it, but still nothing useful... I've found this nice library to work .vcf files(both write and read). http://code.google.com/p/android-vcard/ But is there any way to send it to another phone (and read properly of course)? Just send this as a string maybe? Please help! I'll be happy to get any clue, useful library or a proof that it's impossible on Android. If there is no way via SMS can you give me advice how to do that via MMS? What's interesting, that there is a lot of apps with that functionality, so I guess this is possible. Thanks anyone who responds. Have a good day. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Documentation for android.R stuffs
Hello I'm trying to get into Android development and am quite a bit confused about the android.R constants. I see them being used in the examples and tutorials but nothing is ever said about what these constants are, where they came from and how they relate to the rest of the world. For example, in the Spinner example project there's this line: this.mAdapter = ArrayAdapter.createFromResource(this, R.array.Planets, android.R.layout.simple_spinner_dropdown_item); What is simple_spinner_dropdown_item item? Why does an adapter of any kind care about views? Etc... Can someone point me to some sort of in depth documentation. Thanks Vic -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 wifi p2p unsupported (wifidirect)
Hello, i'm using the protocol for making p2p connection using wifi in android (http://developer.android.com/reference/android/net/wifi/p2p/package-summary.html) I have a problem calling the *discoverPeers()* function : ActionListener.onFailure(int reason) is called (its an interface to trigger some events) and i receive reason=1, which means 'P2P_UNSUPPORTED'. I added all the permissions required and the (use... wifidirect) tag. i use a virtual device and the latest android sdk(4.0.3), i have an internet connection on this device. uses-sdk android:minSdkVersion=15 / uses-permission android:name=android.permission.ACCESS_WIFI_STATE/ uses-permission android:name=android.permission.CHANGE_WIFI_STATE / uses permission android:name=android.permission.INTERNET/ uses-feature android:name=android.hardware.wifi.direct android:required=true/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] getting information from my own server
Firstly, thx for help. I'm new to developing an app, i would like to hav a app that can get only some word strings from the internet(my own server), but not using a web view and then browsing a whole web page. i mean that similar to what a newspaper app does, getting words from the server, showing the words in a textview or anything else, but not a webview can i really do that? and what should i prepare inside my server ? thx a lot (PS sorry for bad english - -') -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] R.java not generated
Hi there, i'm a newbie. for some reason last time I created a project, the R.java file failed to be generated. it had always worked fine before. I'm really clueless regarding what to do. if I import R or click ''fix project' another error appears as it now fails to locate main.xml. Can anyone give some guidance? Thanks for your time, Chris. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Documentation for android.R stuffs
Read this. http://developer.android.com/guide/topics/resources/accessing-resources.html On Mon, Apr 30, 2012 at 3:15 AM, Vic Simkus vic.sim...@gmail.com wrote: Hello I'm trying to get into Android development and am quite a bit confused about the android.R constants. I see them being used in the examples and tutorials but nothing is ever said about what these constants are, where they came from and how they relate to the rest of the world. For example, in the Spinner example project there's this line: this.mAdapter = ArrayAdapter.createFromResource(this, R.array.Planets, android.R.layout.simple_spinner_dropdown_item); What is simple_spinner_dropdown_item item? Why does an adapter of any kind care about views? Etc... Can someone point me to some sort of in depth documentation. Thanks Vic -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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, *Naseem Rafique | Software Engineer* *NorthBay Solutions | 410-G4 Johar Town, Lahore Cell: 0331-4153428 * -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Documentation for android.R stuffs
On Sun, Apr 29, 2012 at 6:15 PM, Vic Simkus vic.sim...@gmail.com wrote: What is simple_spinner_dropdown_item item? It is a layout, provided by Android in the firmware. A copy of that layout can be found in your SDK. Why does an adapter of any kind care about views? Because that is the complete and entire point behind creating an ArrayAdapter -- to supply Views to an AdapterView (e.g., rows to a ListView). -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] reading file from SDcard
First, you use Environment.getExternalStorageDirectory() to get at the root of external storage, rather than hard-wiring in /sdcard (which is the wrong value, anyway). Second, you delete the READ_EXTERNAL_STORAGE permission request, since there is no such permission. Third, you execute the correct code, as your error message refers to test.txt, whereas your code refers to test30fps.mp4. On Mon, Apr 30, 2012 at 5:46 AM, Rohit rdx2...@gmail.com wrote: While reading file from sd card it throws /sdcard/test.txt (Permission Denied) exception I am using following code to read file and I also set following permission in manifest.xml user-permission android:name=android.permission.READ_EXTERNAL_STORAGE / File myFile1 = new File(/sdcard/ test30fps.mp4); myFile1.canRead(); FileInputStream fIn = new FileInputStream(myFile1); BufferedReader myReader = new BufferedReader( new InputStreamReader(fIn)); String aDataRow = ; String aBuffer = ; while ((aDataRow = myReader.readLine()) != null) { aBuffer += aDataRow + \n; } myReader.close(); what should i do to read file from SD card? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] about keyevent
This list is for developing applications with the Android SDK. To learn more about the firmware, please visit http://source.android.com. On Sun, Apr 29, 2012 at 11:05 PM, Yorke yorke...@gmail.com wrote: Dear Sirs, I want to catch the keyevent which didn't receive by other receiver(activities) to do its functional purpose, I mean if some keyevents didn't be used to do its corresponding actions, how can I modify the framework to capture this event to do the same works? is it possible modify the PhoneWindow??? Thanks for your helps :D -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] R.java not generated
If R.java is not being generated, odds are that there is a bug in a resource or in the manifest that is preventing it from being built. Look for error markers in Eclipse on those things. You can also try Project Clean from the Eclipse main menu. On Sat, Apr 28, 2012 at 8:02 AM, Chris krrishn...@googlemail.com wrote: Hi there, i'm a newbie. for some reason last time I created a project, the R.java file failed to be generated. it had always worked fine before. I'm really clueless regarding what to do. if I import R or click ''fix project' another error appears as it now fails to locate main.xml. Can anyone give some guidance? Thanks for your time, Chris. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] When does the binder thread pool shrink?
This list is for developing applications with the Android SDK. To learn more about the firmware, please visit http://source.android.com. On Thu, Apr 26, 2012 at 10:17 PM, Michael Hsueh mhsue...@gmail.com wrote: I am reading through the binder code and trying to understand how the threading works. I know that the binder driver sends commands to increase the thread pool size when it detects that there is no free binder thread to service a command (up to the max of 16 threads). But I am not sure when these newly spawned threads are removed. In IPCThreadState.cpp: void IPCThreadState::joinThreadPool(bool isMain) { ... result = executeCommand(cmd); ... if(result == TIMED_OUT !isMain) { break; } ... } I see that the thread breaks out of the thread pool loop when result is set to TIMED_OUT, which in turn happens when the binder drive sends a command of BR_FINISHED. This would result in the handling binder thread to leave the thread pool and essentially end. But I looked through the binder driver source code and could not find any instance in which the driver would deliver this command to binder thread. Does this mean the binder thread pool will only grow in size and never shrink? I would appreciate any help on this topic. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Offering new android features
This list is for developing applications with the Android SDK. To learn more about the firmware, please visit http://source.android.com. On Fri, Apr 27, 2012 at 11:58 AM, Nir Cohen nir...@gmail.com wrote: jeez, somehow I couldn't find how to offer new android features to Google. Any ideas how to do that? thx. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] changing boot logo
This list is for developing applications with the Android SDK. To learn more about the firmware, please visit http://source.android.com. On Sat, Apr 28, 2012 at 5:43 PM, Umesh Gupta ug.it...@gmail.com wrote: Please let me know how can I change boot logo in Android 2.2. Thanks ug -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Layouts - Using Remaining Space For Intermediate View
On Sun, Apr 29, 2012 at 5:42 AM, JTeagle teagle.ja...@gmail.com wrote: I'm using RelativeLayout to create rows of controls and would like to achieve the following: Widget 1 - natural height Custom view - remaining space after Widgets 1 and 3 Widget 3 - natural height Widget 1 has android:alignParentTop=true and android:layout_height=wrap_content. Widget 3 has android:alignParentBottom=true and android:layout_height=wrap_content. Widget 2 has android:above pointing to widget 3, android:below pointing to widget 1, and (AFAIK) whatever android:layout_height you want (as the above/below rules will override it) This should work so long as Widget 1 and Widget 3 have knowable heights (e.g., Button, not ListView) and there is still room on the screen for Widget 2. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Run two applications and split the screen in two parts
On Mon, Apr 30, 2012 at 4:10 AM, Anurag Pratap Singh anurag1...@gmail.com wrote: I am making an application in which the screen will be splitted in two parts and both the screens will be using different medias: one for camera using Camera HAL and other will be playing a Video file using StageFright. I need help in playing the Video file and how to handle the threds for both the processes simultaneosly There is only one process, because there is only one application. You cannot run two applications and split the screen in two parts. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] getting the sim phone number
For devices with a SIM card, getLine1Number() on TelephonyManager should return that number. However, please bear in mind that a SIM does not have to have a phone number (getLine1Number() returns null), and that the SIM might have the wrong phone number. There is no reliable way from the Android SDK to find out the phone number of the device, AFAIK. On Fri, Apr 27, 2012 at 5:34 AM, ibrahim koubeissy.ibra...@gmail.com wrote: Hey all, I new to the Android SDK. I'm working on an application that requires the sim phone number Is there anyway to get the phone number of the SIM card, instead of sending a verification sms Thanks all... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Strange force close on Froyo phone, works fine on ICS tablet
On Sun, Apr 29, 2012 at 11:39:04PM -0700, Alger Lin wrote: I release a tool to help developer to dump API from Android device. This tool may help you to check if class, method, or field existed at target device. You can get it from Google Play by URL below. http://market.android.com/details?id=com.twrd.yulin.classminer Couldn't load it on my phone (which now, for some reason, will no longer allow any apps to be on the sdcard, and it appears that this app insists on being stored there.) I did put it on my tablet, and can see where it would help. But that shouldn't be necessary---the dev guide clearly indicates that the Porterduff modes (including ADD) have been supported in the SDK since API Level 1. Therefore, it's there...or at least, it's supposed to be. I'm completely stumped on this one. Later, --jim -- THE SCORE: ME: 2 CANCER: 0 73 DE N5IAL (/4)MiSTie #49997 Running FreeBSD 7.0 spooky1...@gmail.com ICBM/Hurricane: 30.44406N 86.59909W 'Wrong' is one of those concepts that depends on witnesses. --Catbert: Evil Director of Human Resources (Dilbert, 05Nov09) Android Apps Listing at http://www.jstrack.org/barcodes.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] notification
But if I do use a 'remoteview' then my entry's background stands out from the other notifications. Is there anyway I can maintain the same system background? Can I set background=android:id?blah blah? On Sunday, March 27, 2011 2:28:30 AM UTC+5:30, Mark Murphy wrote: On Sat, Mar 26, 2011 at 4:41 PM, guillaume benats guillaume.ben...@gmail.com wrote: isn't there anyway to put in on two lines? Yes, by creating your own RemoteViews for the contentView. A Notification's default RemoteViews supports only one line for the description, with the marquee effect on for android:ellipsize. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in London: http://bit.ly/smand1, http://bit.ly/smand2 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 use the default radio button and check box drawable resource (image)
How do I mentioned this in the layout XML file? On Thursday, April 12, 2012 7:35:48 PM UTC+5:30, MagouyaWare wrote: Use android.R.drawable.btn_radio Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Wed, Apr 11, 2012 at 11:37 PM, Put_tiMe putt...@gmail.com wrote: In my layout, for some of the UI controls, I want to use the OS radio button resource. For example, I want an ImageView, but it draws the default radio button texture. How can I achieve this? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Layouts - Using Remaining Space For Intermediate View
This should work so long as Widget 1 and Widget 3 have knowable heights (e.g., Button, not ListView) and there is still room on the screen for Widget 2. Thanks for this. I see where you're going with it, but unfortunately that won't help my situation - and that's my fault for not making my example clearer. Although I only specified three widgets / views, there could potentially be more, and more than one view that would want to grab as much space as possible. Consider the following revised example: Widget 1 - natural height Custom View A - largest height possible Widget 2 - natural height Custom View B - largest height possible Widget 3 - natural height Custom View C - largest height possible Widget 4 - natural height Although widgets 1 and 4 could still be aligned to top and bottom, the problem now is how to position widgets 2 and 3 (we can't even use CENTRE_IN_PARENT now, since view B is in the middle). Since we have three views vying for the maximum space they can get, I would want them to each grab a third of the remaining space (so equal weight). In other words, the way a GridBagLayout would handle it in desktop Java. I cannot assume the position (order) of any of the widgets or views, since I'm trying to build a framework that allows me to add (from a higher layer of code) controls of any type in any order, to suit multiple applications, without that higher layer having to have knowledge of how that is achieved. This mechanism is being translated into other languages / environments such as desktop Java, C++ / MFC and C#. The abstracted layer will be [almost] directly portable by referring to generic concepts, and this underlying layer (unique to each platform) will deal with creating platform-specific controls and laying them out as required. (Controls are being added through code rather than XML, but I realise alignments and positions would be equivalent no matter which is used - just written differently.) Do you perhaps know how to reliably measure actual height controls (at what point in the code can I get this information - a notification handler?). If so, can I manually resize the views at a later stage to fit (I assume I can, and then simply call requestLayout() )? Getting the measurements would be an alternative way to solve the problem. Or am I looking at deriving my own layout manager? -- Jason Teagle *jason.tea...@yahoo.co.uk*wlmailhtml:{6A5D8B3C-A03E-4097-9F53-9278006E9974}mid://0832/!x-usc:mailto:jason.tea...@yahoo.co.uk -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 use the default radio button and check box drawable resource (image)
Got it: android:background=@android:drawable/ On Monday, April 30, 2012 4:39:26 PM UTC+5:30, Put_tiMe wrote: How do I mentioned this in the layout XML file? On Thursday, April 12, 2012 7:35:48 PM UTC+5:30, MagouyaWare wrote: Use android.R.drawable.btn_radio Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Wed, Apr 11, 2012 at 11:37 PM, Put_tiMe putt...@gmail.com wrote: In my layout, for some of the UI controls, I want to use the OS radio button resource. For example, I want an ImageView, but it draws the default radio button texture. How can I achieve this? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Strange force close on Froyo phone, works fine on ICS tablet
Create a separate little project that accesses PorterDuff.Mode.ADD. Run it on the phone. If it crashes the same way, and particularly given your comment regarding external storage, your phone may be messed up, somehow. If it does not crash the same way, then you have a stake in the ground, around which you can start analyzing what is different between the projects. On Mon, Apr 30, 2012 at 7:02 AM, Jim Graham spooky1...@gmail.com wrote: On Sun, Apr 29, 2012 at 11:39:04PM -0700, Alger Lin wrote: I release a tool to help developer to dump API from Android device. This tool may help you to check if class, method, or field existed at target device. You can get it from Google Play by URL below. http://market.android.com/details?id=com.twrd.yulin.classminer Couldn't load it on my phone (which now, for some reason, will no longer allow any apps to be on the sdcard, and it appears that this app insists on being stored there.) I did put it on my tablet, and can see where it would help. But that shouldn't be necessary---the dev guide clearly indicates that the Porterduff modes (including ADD) have been supported in the SDK since API Level 1. Therefore, it's there...or at least, it's supposed to be. I'm completely stumped on this one. Later, --jim -- THE SCORE: ME: 2 CANCER: 0 73 DE N5IAL (/4) MiSTie #49997 Running FreeBSD 7.0 spooky1...@gmail.com ICBM/Hurricane: 30.44406N 86.59909W 'Wrong' is one of those concepts that depends on witnesses. --Catbert: Evil Director of Human Resources (Dilbert, 05Nov09) Android Apps Listing at http://www.jstrack.org/barcodes.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 -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Layouts - Using Remaining Space For Intermediate View
On Mon, Apr 30, 2012 at 7:10 AM, JTeagle teagle.ja...@gmail.com wrote: Consider the following revised example: Widget 1 - natural height Custom View A - largest height possible Widget 2 - natural height Custom View B - largest height possible Widget 3 - natural height Custom View C - largest height possible Widget 4 - natural height You will have to create your own custom ViewGroup for that, AFAIK. And even then, it assumes an inaccurate definition for largest height possible. I cannot assume the position (order) of any of the widgets or views, since I'm trying to build a framework that allows me to add (from a higher layer of code) controls of any type in any order, to suit multiple applications, without that higher layer having to have knowledge of how that is achieved. If the higher layer requests 10,000 widgets, you will not have enough room on the screen. Perhaps a ScrollView, with everything being natural height, is a better approach. Do you perhaps know how to reliably measure actual height controls (at what point in the code can I get this information - a notification handler?). Write your own ViewGroup. If so, can I manually resize the views at a later stage to fit (I assume I can, and then simply call requestLayout() )? Write your own ViewGroup. Or am I looking at deriving my own layout manager? That's what I mean by write your own ViewGroup. :-) -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Strange force close on Froyo phone, works fine on ICS tablet
On Mon, Apr 30, 2012 at 07:11:36AM -0400, Mark Murphy wrote: Create a separate little project that accesses PorterDuff.Mode.ADD. Run it on the phone. If it crashes the same way, and particularly given your comment regarding external storage, your phone may be messed up, somehow. If it does not crash the same way, then you have a stake in the ground, around which you can start analyzing what is different between the projects. I was thinking about doing that...I should have. Ok, here's what happened, in sequence: 1) I changed the example from Pro Android Media (Ch03 / Choose Picture - Composite) to use ADD instead of MULTIPLY. This project is built for Android 2.2, period. 2) Eclipse griped...no such mode. Change to . 3) So I added the two imports that Eclipse whined about not being used in my app: android.graphics.PorterDuff, and a.g.P.Mode. Suddenly ADD is supported (and this is ALL documented in the developers guide as being supported since API level 1, with the 3 imports---the previous 2, plus android.graphics.PorterDuffXferMode) 4) Eclipse shut up, and built the APK. 5) It works. But here comes the mystery again: the example from the book is what I built my code from...different variables, ADD instead of MULTIPLY, but otherwise the same few lines of code. Hmmm PorterDuffXferMode does NOT have ADD, whereas the other two do. The error I'm getting is listed as only happening when you have (I forget the exact wording, but basically, conflicting classes). Or not. I was thinking PorterDuffXferMode conflicted with the other two, but without it, the user of PorterDuffXferMode is an error. Sigh. :-( --jim -- THE SCORE: ME: 2 CANCER: 0 73 DE N5IAL (/4)| Now what *you* need is a proper pint of spooky1...@gmail.com| porter poured in a proper pewter porter Running FreeBSD 7.0 | pot.. ICBM / Hurricane: |--Peter Dalgaard in alt.sysadmin.recovery 30.44406N 86.59909W | Android Apps Listing at http://www.jstrack.org/barcodes.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] Stop sounds after leaving app
onResum() and onStop() On Fri, Apr 27, 2012 at 7:59 AM, Anderson Leite anderson...@gmail.comwrote: I am developing a game. This game starts a sound in the beginning and goes on during all the game. If I press Home button, and go to any area of android, the sound keeps playing, until I really force the app to stop. Whats the best aproach here ? There is some callback/listener, something that is called when app is not being used, but still running ? If so, would be the right aproach just to mute the sound ? I am developing this game using cocos2d, but this does not sounds like a cocos2d question.. Thanks in advance, Anderson -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Raghav Sood https://market.android.com/developer?pub=Appaholics http://www.appaholics.in/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Stop sounds after leaving app
*onResume() On Mon, Apr 30, 2012 at 5:21 PM, Raghav Sood raghavs...@gmail.com wrote: onResum() and onStop() On Fri, Apr 27, 2012 at 7:59 AM, Anderson Leite anderson...@gmail.comwrote: I am developing a game. This game starts a sound in the beginning and goes on during all the game. If I press Home button, and go to any area of android, the sound keeps playing, until I really force the app to stop. Whats the best aproach here ? There is some callback/listener, something that is called when app is not being used, but still running ? If so, would be the right aproach just to mute the sound ? I am developing this game using cocos2d, but this does not sounds like a cocos2d question.. Thanks in advance, Anderson -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Raghav Sood https://market.android.com/developer?pub=Appaholics http://www.appaholics.in/ -- Raghav Sood https://market.android.com/developer?pub=Appaholics http://www.appaholics.in/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] reading file from SDcard
uses-permission android:name=android.permission.ACCESS_NETWORK_STATE / uses-permission android:name=android.permission.CHANGE_NETWORK_STATE / uses-permission android:name=android.permission.READ_CONTACTS / uses-permission android:name=android.permission.WRITE_CONTACTS / uses-permission android:name=android.permission.WRITE_EXTERNAL_STORAGE / uses-permission android:name=android.permission.INTERNET/ uses-permission android:name=android.permission.GET_ACCOUNTS / uses-permission android:name=android.permission.READ_CALENDAR/uses-permission uses-permission android:name=android.permission.WRITE_CALENDAR/uses-permission uses-permission android:name=android.permission.READ_SMS/uses-permission uses-permission android:name=android.permission.WRITE_SMS/uses-permission -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Live Video streaming between android phones
Hi, I want to implement live video streaming between android phone. Can i get any idea? Thanks in advance.. Regards, Kavitha -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Live Video streaming between android phones
what you have tried so far!!! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Live Video streaming between android phones
I try to stream video through socket, and getting mediaplayer offseterror, unable to create mediaplayer. On Mon, Apr 30, 2012 at 5:34 PM, asheesh arya asheesharya...@gmail.comwrote: what you have tried so far!!! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: reading file from SDcard
On Apr 30, 5:38 am, Mark Murphy mmur...@commonsware.com wrote: First, you use Environment.getExternalStorageDirectory() to get at the root of external storage, rather than hard-wiring in /sdcard (which is the wrong value, anyway). It is not quite as simple as that. Many Android devices have several kinds of external memory. There is the truly removable kind like a physical SD or micro SD card. Then there is built-in external memory that cannot be removed, but in every other respect it acts like external memory, especially in the relaxation of security requirements for access. That is, an application can write to the root of external memory (of whatever kind) but it cannot write to the root of internal memory. It has been my experience that Environment.getExternalStorageDirectory() which you mentioned generally points to the built-in kind of external memory. So if you want to access the real removable SD card file system there is no way I know of other than hard-wiring the actual path name, or letting the user enter it on a form (assuming the user even knows what the path name is). For example, on the Acer Iconia Tablet A-100 there is /mnt/sdcard (built-in external memory) /mnt/external_sd (removable SD card) But Environment.getExternalStorageDirectory() returns /mnt/sdcard. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: reading file from SDcard
On Mon, Apr 30, 2012 at 8:26 AM, RLScott fixthatpi...@yahoo.com wrote: It has been my experience that Environment.getExternalStorageDirectory() which you mentioned generally points to the built-in kind of external memory. It points to whatever the device manufacturer chose to point it to. On some devices, it is removable; on some devices, it is not. So if you want to access the real removable SD card file system there is no way I know of other than hard-wiring the actual path name, or letting the user enter it on a form (assuming the user even knows what the path name is). Or not using it. Or waiting for the Android SDK to support multiple external mount points. Or waiting for somebody to crowdsource a database of available standard mount points and their accessibility (just because /mnt/foo exists does not mean you can read or write to it, or that the user can access it), and waiting for somebody to create some sort of JAR that leverages this crowdsourced database, so you can determine the available options for your hardware to present to the user. For example, on the Acer Iconia Tablet A-100 there is /mnt/sdcard (built-in external memory) /mnt/external_sd (removable SD card) You will note that neither of these is /sdcard, which was my point to the OP. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] values-v9 and styles.xml problem
This documentation here: http://developer.android.com/guide/topics/ui/notifiers/notifications.html#CustomExpandedView *Says:* Then, to apply the system's default colors for notifications on Android 2.3 and higher, use the following styles for res/values-v9/styles.xml: ?xml version=1.0 encoding=utf-8? resources style name=NotificationText parent=android:TextAppearance.StatusBar.EventContent / style name=NotificationTitle parent=android:TextAppearance.StatusBar.EventContent.Title / /resources I'm using* android 2.2* for dev. But if I do the above, then I get this error: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.StatusBar.EventContent'. Any idea as to how to do this? Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Native Maps Api - zoom to geocode returned viewport
So the answer is to use the MapController.zoomToSpan(...) method. Further information can be found here : Getting map zoom level for given bounds on Android like on JS Google Maps API: map.getBoundsZoomLevel(bounds)http://stackoverflow.com/questions/4979165/getting-map-zoom-level-for-given-bounds-on-android-like-on-js-google-maps-api-m On Monday, 30 April 2012 09:46:08 UTC+2, Simon Giddings wrote: This is a question I asked on Stackoverflow for which I got no answer. When I make a query to the Google Maps Api Geocode web service, the answer comes back with a number of elements : - Coordinates lat / lng - Viewport NE and SW - others The viewport is that which contains the recommended viewport for displaying the returned result, specified as two latitude,longitude values defining the southwest and northeast corner of the viewport bounding box. Generally the viewport is used to frame a result when displaying it to a user. Example given in the documentation : viewport : { northeast : { lat : 37.42426708029149, lng : -122.0840722197085 }, southwest : { lat : 37.42156911970850, lng : -122.0867701802915 } I have not been able to figure out how to adjust the zoom level to best match this viewport. Can anyone advise me on this ? Perhaps someone has already done this and would be willing to share ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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
how can you use array as in java in android? (Please put a more informative title in the subject line) If you mean native arrays, they work exactly the same. Are you having trouble compiling some code? If so, please post a sample of code and show us the compiler error you are getting. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Bluetooth devices is pairing but not connecting
nobody is not know anything about that :S On Apr 30, 11:17 am, hüseyin toplu hsy...@gmail.com wrote: i checked it but its peer to peer connection but i wanna just send a file to any device this device will not have my application it will just took the file On Apr 30, 10:51 am, gjs garyjamessi...@gmail.com wrote: Hi, Build bluetooth chat demo app from sdk try connecting with that. Regards On Apr 30, 4:43 pm, hüseyin toplu hsy...@gmail.com wrote: i found my problem problem have server code tmp = mAdapter.listenUsingRfcommWithServiceRecord(NAME_SECURE, MY_UUID_SECURE); } else { tmp = mAdapter.listenUsingRfcommWithServiceRecord( NAME_INSECURE, MY_UUID_INSECURE); } } catch (IOException e) {} Problem is uuid because I dont know other device uuid.i dont send file to my application i wanna just send file over bluettooth to any device i chanced this code with this m = mAdapter.getClass().getMethod(listenUsingRfcommOn, new Class[] { int.class }); tmp = (BluetoothServerSocket) m.invoke(mAdapter, 1); } catch (SecurityException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } it send java.lang.reflect.invocationtargetexception erorr please help :S -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en