[android-developers] tcp server binding in android-ndk
hello friends, i 'm currently working in android -ndk . i 'm trying to run the tcp server socket in android but its not binding the socket if we using i p like 192.168.72.160. while i try to bind with the local i.p. address (10.0.2.15 127.0.0.1) its binding but its not communicating with other p.c. i tried port forwarding i m using port no 3500 emulator (tcp server) i don't know on which port my pc communicating so using netstat -o it shows some ports i tried with port no to port forwarding but it doesn't work for any. while i run the tcp client in emulator on same port its working fine can any one suggest the idea to overcome my problem ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: App Crash during HTTP Post
Hi Murphy, I checked the logcat, it is showing: ERROR/AndroidRuntime(10335): FATAL EXCEPTION: main ERROR/AndroidRuntime(10335): java.lang.NullPointerException But the issue is, this crash is only occurring when I do HTTP Post of a large file (10 MB). Is it a Android limitation? Anyone encountered this before? Thanks In Advance, Perumal On Aug 17, 7:04 pm, Mark Murphy mmur...@commonsware.com wrote: On Wed, Aug 17, 2011 at 7:00 AM, perumal316 perumal...@gmail.com wrote: I noticed that during HTTP Post of files to a backend server if the connection is not established (no reception) or the file size is too big (10MB) my application crashes. Is there any way to solve this issue? How do I handle for such errors? Use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine LogCat and look at the stack trace associated with your crash. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 2.0 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Downloading Files Directly in Webview without it opening the browser
On Aug 17, 1:30 pm, lbendlin l...@bendlin.us wrote: you don't need a webview for that. Just use HTTP GET directly. Explain as my application uses webview to list files for download that when you click the links to the files they want to open a web browser before starting the downloads -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Downloading Files Directly in Webview without it opening the browser
On Thu, Aug 18, 2011 at 2:40 AM, Raziel23x raziel...@gmail.com wrote: On Aug 17, 1:30 pm, lbendlin l...@bendlin.us wrote: you don't need a webview for that. Just use HTTP GET directly. Explain as my application uses webview to list files for download that when you click the links to the files they want to open a web browser before starting the downloads From what it sounds like you want to do, you want them to click on the links and then hide their download from the webview? This doesn't sound like a standard design at all, though I can think that it would be possible if you registered a javascript callback and then in your code did the http get. On the other hand, why not use an actual listview or something, why use the webview to list the links? And why hide their download from the user? Kris -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Dialer consuming data
Hi I've seen in About Phone - Battery - Battery use - Dialer that it has been sending/receiving data at maybe 20 kb an hour. What's funny is that it does that even when it's positively not connected to any network (GSM/3G data is disabled, wireless access is not available). Could it be that this is actually referring to the bytes used for talking to the GSM part of the phone through a serial interface/RIL? I'm using LeeDroid_HD 3.3.3 R5 (Gingerbread 2.3.3) but I don't think it's LeeDroid specific. Thanks, Vedran Rodic -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Using queueEvent for OpenGL
Okay. In my project I am trying to have an OnTouchEvent cause a change in my Renderer thread but I can't figure out how to get this working. I was having the touch event change a boolean value to put the draw method onto the proper trail for what to draw, but there is a 3 second delay before it decides to check the boolean value. When I was working with canvas I was able to do a Synchronized action with the gamethread, but alas I cannot figure out how to get this to mesh with my renderer, as there are several things I don't know how to substitute. Also, I am getting a bit tired of google's sample code not actually being working code, and just an idea to work off. For example I want to try to use queueEvent, but going off of this example: http://android-developers.blogspot.com/2009/04/introducing-glsurfaceview.html The code here public boolean onTouchEvent(final MotionEvent event) { queueEvent(new Runnable(){ public void run() { mRenderer.setColor(event.getX() / getWidth(), event.getY() / getHeight(), 1.0f); }}); return true; } does not not work. I get the following error The method queueEvent(new Runnable(){}) is undefined for the type Main and if I make a method named that (which I don't think is what I should be doing as the example listed doesn't do this) then all it's doing is creating another method in the same thread and there is no progress (correct me if I am wrong, and I am probably wrong). I've tried looking for examples of how to use queueEvent and all I can't find a proper explanation. Or if I could find an example of syncing an Ontouchevent to the renderer thread then I could work from there. I don't have too great an understanding of a lot of things. I have been stuck many times before on problems but I can usually figure them out and eventually learn how they work. Basically I don't want to get a generic You should learn Java/OpenGL/Whatever before you try this as this is the last obstacle in my way (as far as I can see) before all the rest of the work is math and logic, and I don't want to spend money + time pouring over books for the answer to this question. If someone could please help I would be grateful. I am also willing to offer more information if needed. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] inflating xml runtime and repeating that view?
Hi, I have one view which is repeating horizontaly and vertically 3x3.I have seperate xml for this.I am inflating it runtime and trying to add within horizontal or vertical .And applying parent to horizontal or vertical linear.But as there can be only one child attached to its parent.I am getting java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first. So what is other way that i can repeat the view with 3x3 array? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Serious bug in 3.2 ResolverActivity
What does this mean? On Aug 18, 4:09 am, Gavin fjm...@gmail.com wrote: It was fixed at latest version. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Dialer consuming data
Your question is also not SDK specific. Try android-discuss. Thanks On Thu, Aug 18, 2011 at 1:03 PM, Vedran Rodic vro...@gmail.com wrote: Hi I've seen in About Phone - Battery - Battery use - Dialer that it has been sending/receiving data at maybe 20 kb an hour. What's funny is that it does that even when it's positively not connected to any network (GSM/3G data is disabled, wireless access is not available). Could it be that this is actually referring to the bytes used for talking to the GSM part of the phone through a serial interface/RIL? I'm using LeeDroid_HD 3.3.3 R5 (Gingerbread 2.3.3) but I don't think it's LeeDroid specific. Thanks, Vedran Rodic -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles required to have complete control) http://www.raghavsood.com/ 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
[android-developers] Re: NdefRecord(NdefMessage) extraction from the intent in a NFC design
What do you mean by all three NFC intents *have* three extras? I ask, because the documentation at http://developer.android.com/reference/android/nfc/NfcAdapter.html states, that EXTRA_ID and EXTRA_NDEF_MESSAGES are optional (which is obvious for the latter) and only EXTRA_TAG is mandatory. Anyway, in which case is the ID field not available? Dominik -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 block the adult site in webview
Hi , How to *block the adult site* in webview -- Regards, Perumal.N -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 make a mapView transparent?
Good question! The reason for using the MapView is that I'm mapping my overlays to actual positions on the map. But I don't want to show the map's visual information. Using a RelativeLayout and doing the overlaying myself would force my to do all the calculations that the mapsystem now does for me. Any further suggestions? /Martin On 17 Aug, 23:15, Mark Murphy mmur...@commonsware.com wrote: On Wed, Aug 17, 2011 at 11:05 AM, marhol682 martin.hol...@themobilelife.com wrote: What I need to do is to draw the overlays of a mapView on top of an image. However, I don't need any of the visual information that the mapView provides, I only want to show the overlays on top of my background imageView. Therefor I need to make the mapView itself transparent, but at the same time keep the overlays opaque. Why are you bothering with the map system if you are not going to use the maps? Use RelativeLayout and do the overlaying yourself. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _Android Programming Tutorials_ Version 3.9 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: inflating xml runtime and repeating that view?
On Aug 18, 9:55 am, Hitendrasinh Gohil hitendrasin...@gmail.com wrote: Hi, I have one view which is repeating horizontaly and vertically 3x3.I have seperate xml for this.I am inflating it runtime and trying to add within horizontal or vertical .And applying parent to horizontal or vertical linear.But as there can be only one child attached to its parent.I am getting java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first. So what is other way that i can repeat the view with 3x3 array? Inflate your view 3x3 times pskink -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Dialer consuming data
Thanks! I thought this kind of general knowledge would be useful for developers to have too. Vedran On Thu, Aug 18, 2011 at 10:33 AM, Appaholics raghavs...@appaholics.in wrote: Your question is also not SDK specific. Try android-discuss. Thanks On Thu, Aug 18, 2011 at 1:03 PM, Vedran Rodic vro...@gmail.com wrote: Hi I've seen in About Phone - Battery - Battery use - Dialer that it has been sending/receiving data at maybe 20 kb an hour. What's funny is that it does that even when it's positively not connected to any network (GSM/3G data is disabled, wireless access is not available). Could it be that this is actually referring to the bytes used for talking to the GSM part of the phone through a serial interface/RIL? I'm using LeeDroid_HD 3.3.3 R5 (Gingerbread 2.3.3) but I don't think it's LeeDroid specific. Thanks, Vedran Rodic -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles required to have complete control) http://www.raghavsood.com/ 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How to make a mapView transparent?
On Thu, Aug 18, 2011 at 4:44 AM, marhol682 martin.hol...@themobilelife.com wrote: Good question! The reason for using the MapView is that I'm mapping my overlays to actual positions on the map. But I don't want to show the map's visual information. Using a RelativeLayout and doing the overlaying myself would force my to do all the calculations that the mapsystem now does for me. Any further suggestions? Basic arithmetic (all that is required to convert between geographic and screen coordinate systems for ordinary maps) is typically taught at a fairly young age. Since what you want is impossible (AFAIK) and wasteful of RAM, CPU, and bandwidth even if it were possible, perhaps you should consider just implementing the calculations. As a side bonus, now your app can run on devices that don't have Google Maps, increasing your potential audience. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 block the adult site in webview
Don't type in the Web address of the adult site. On Thu, Aug 18, 2011 at 4:42 AM, Perumss Naren peru2...@gmail.com wrote: Hi , How to block the adult site in webview -- Regards, Perumal.N -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: App Crash during HTTP Post
On Thu, Aug 18, 2011 at 2:30 AM, perumal316 perumal...@gmail.com wrote: I checked the logcat, it is showing: ERROR/AndroidRuntime(10335): FATAL EXCEPTION: main ERROR/AndroidRuntime(10335): java.lang.NullPointerException But the issue is, this crash is only occurring when I do HTTP Post of a large file (10 MB). Is it a Android limitation? Anyone encountered this before? It may be a side effect of running out of heap space, depending on how you implemented your HTTP operations. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Receiver for SMS SENT, EMAIL SENT and Calender EVENT
On Thu, Aug 18, 2011 at 1:51 AM, Ajmer Singh ajmersing...@gmail.com wrote: Basically I need a kind to automatically generated callback for SMS SENT and EMAIL SENT and Calender event.Please could any body let me know how can i do this?. You can't. There are no Intents broadcast for any of those. Furthermore, two of them (email and calendar) are not even part of the operating system -- those are the responsibility of individual apps, of which there are hundreds of implementations. Is there any Receiver for SMS Sent and EMAIL SENT??. No. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Update ad view every 30 seconds
Hi, I am using the following to refresh my ad view every 30 seconds: Timer adTimer = new Timer(adUpdate); adTimer.scheduleAtFixedRate(new TimerTask() { public void run(){ myBanner.refresh(); } }, 0, 3); However, it refreshes every half second or so, if the LogCat output is to be believed. What is wrong in my code. The app doesn't crash but the update time isn't right. Thanks -- Raghav Sood CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles required to have complete control) http://www.raghavsood.com/ 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] How to block the adult site in webview
Hi Mark, Thanks for your time *! * My task is to *block the adult site*. kid *cannot* edit the URL so we don't bother about but form the given site URL they can access the side and they may have *Google search in the site* from that they can search adult site. i need to block that adult site(for example in office they block the unwanted site right like that it simply tell *that site is blocked. ** * On Thu, Aug 18, 2011 at 3:50 PM, Mark Murphy mmur...@commonsware.comwrote: Don't type in the Web address of the adult site. On Thu, Aug 18, 2011 at 4:42 AM, Perumss Naren peru2...@gmail.com wrote: Hi , How to block the adult site in webview -- Regards, Perumal.N -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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, Perumal.N -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Update ad view every 30 seconds
Why not use postDelayed()? It saves you a background thread, and your Runnable gets invoked on the main application thread (which will be necessary eventually for updating the ImageView or whatever the ad banner is). I haven't used Timer/TimerTask on Android. Nothing leaps out at me as being an issue with the code snippet, other than the background thread. Are you sure you're not accidentally scheduling lots of timers? On Thu, Aug 18, 2011 at 6:36 AM, Appaholics raghavs...@appaholics.in wrote: Hi, I am using the following to refresh my ad view every 30 seconds: Timer adTimer = new Timer(adUpdate); adTimer.scheduleAtFixedRate(new TimerTask() { public void run(){ myBanner.refresh(); } }, 0, 3); However, it refreshes every half second or so, if the LogCat output is to be believed. What is wrong in my code. The app doesn't crash but the update time isn't right. Thanks -- Raghav Sood CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles required to have complete control) http://www.raghavsood.com/ 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 -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] database insertion problem
i am trying to create a user for my application. but after taking the appropriate details when i press the confirm button my program crashes. can anybody tell me what is the problem??? here is the code for that activity:- package kumar.avinash.pbi.learnoid; import android.app.Activity; import android.content.Intent; import android.database.Cursor; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; @SuppressWarnings(unused) public class EditUser extends Activity { private static EditText mEditUserId; private static EditText mEditUserPass; private static Long mRowId; private static LearnoidDbAdapter mDbHelper; private static String user_id; private static String pass; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mDbHelper = new LearnoidDbAdapter(this); mDbHelper.open(); if (mRowId == null) { Bundle extras = getIntent().getExtras(); mRowId = (extras != null) ? extras.getLong(LearnoidDbAdapter.KEY_ROWID) : null; } setContentView(R.layout.user_edit); setTitle(create user); mEditUserId = (EditText) findViewById(R.id.user_id); user_id = mEditUserId.toString(); mEditUserPass = (EditText) findViewById(R.id.pass); pass = mEditUserPass.toString(); Button confirmButton = (Button) findViewById(R.id.confirm); mRowId = (savedInstanceState == null) ? null : (Long) savedInstanceState.getSerializable(LearnoidDbAdapter.KEY_ROWID); populateFields(); confirmButton.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { setResult(RESULT_OK); finish(); Intent edit_to_login = new Intent(EditUser.this, Login.class); startActivity(edit_to_login); } }); } private void populateFields() { if (mRowId != null) { Cursor user = mDbHelper.fetchUser(mRowId); startManagingCursor(user); mDbHelper.createUser(user_id, pass); } } @Override protected void onPause() { super.onPause(); saveState(); } @Override protected void onResume() { super.onResume(); //populateFields(); } @Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); saveState(); outState.putSerializable(LearnoidDbAdapter.KEY_ROWID, mRowId); } private void saveState() { String user_id = mEditUserId.getText().toString(); String user_pass = mEditUserPass.getText().toString(); if (mRowId == null) { long id = mDbHelper.createUser(user_id, user_pass); if (id 0) { mRowId = id; } } else { mDbHelper.updateUser(mRowId, user_id, user_pass); } } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 block the adult site in webview
On Thu, Aug 18, 2011 at 6:39 AM, Perumss Naren peru2...@gmail.com wrote: My task is to block the adult site. kid cannot edit the URL so we don't bother about but form the given site URL they can access the side and they may have Google search in the site from that they can search adult site. i need to block that adult site(for example in office they block the unwanted site right like that it simply tell that site is blocked. There is no reliable way to do this, short of modifying the firmware. You are welcome to create some sort of proxy server that does your blocking and configure a Web browser to use that proxy server. The kid in question is welcome to remove that proxy server (or at least disconnect it from the browser), install an alternative Web browser, etc. Android is designed to put control in the hands of whoever holds the device, which in this case is the kid. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] database insertion problem
Use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine LogCat and look at the stack trace associated with your crash. On Thu, Aug 18, 2011 at 6:44 AM, josh.bash avi410vik...@gmail.com wrote: i am trying to create a user for my application. but after taking the appropriate details when i press the confirm button my program crashes. can anybody tell me what is the problem??? here is the code for that activity:- package kumar.avinash.pbi.learnoid; import android.app.Activity; import android.content.Intent; import android.database.Cursor; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; @SuppressWarnings(unused) public class EditUser extends Activity { private static EditText mEditUserId; private static EditText mEditUserPass; private static Long mRowId; private static LearnoidDbAdapter mDbHelper; private static String user_id; private static String pass; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mDbHelper = new LearnoidDbAdapter(this); mDbHelper.open(); if (mRowId == null) { Bundle extras = getIntent().getExtras(); mRowId = (extras != null) ? extras.getLong(LearnoidDbAdapter.KEY_ROWID) : null; } setContentView(R.layout.user_edit); setTitle(create user); mEditUserId = (EditText) findViewById(R.id.user_id); user_id = mEditUserId.toString(); mEditUserPass = (EditText) findViewById(R.id.pass); pass = mEditUserPass.toString(); Button confirmButton = (Button) findViewById(R.id.confirm); mRowId = (savedInstanceState == null) ? null : (Long) savedInstanceState.getSerializable(LearnoidDbAdapter.KEY_ROWID); populateFields(); confirmButton.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { setResult(RESULT_OK); finish(); Intent edit_to_login = new Intent(EditUser.this, Login.class); startActivity(edit_to_login); } }); } private void populateFields() { if (mRowId != null) { Cursor user = mDbHelper.fetchUser(mRowId); startManagingCursor(user); mDbHelper.createUser(user_id, pass); } } @Override protected void onPause() { super.onPause(); saveState(); } @Override protected void onResume() { super.onResume(); //populateFields(); } @Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); saveState(); outState.putSerializable(LearnoidDbAdapter.KEY_ROWID, mRowId); } private void saveState() { String user_id = mEditUserId.getText().toString(); String user_pass = mEditUserPass.getText().toString(); if (mRowId == null) { long id = mDbHelper.createUser(user_id, user_pass); if (id 0) { mRowId = id; } } else { mDbHelper.updateUser(mRowId, user_id, user_pass); } } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Update ad view every 30 seconds
I am only scheduling two timers, both using different names etc. I'll look into using postDelayed(); Thanks On Thu, Aug 18, 2011 at 4:13 PM, Mark Murphy mmur...@commonsware.comwrote: Why not use postDelayed()? It saves you a background thread, and your Runnable gets invoked on the main application thread (which will be necessary eventually for updating the ImageView or whatever the ad banner is). I haven't used Timer/TimerTask on Android. Nothing leaps out at me as being an issue with the code snippet, other than the background thread. Are you sure you're not accidentally scheduling lots of timers? On Thu, Aug 18, 2011 at 6:36 AM, Appaholics raghavs...@appaholics.in wrote: Hi, I am using the following to refresh my ad view every 30 seconds: Timer adTimer = new Timer(adUpdate); adTimer.scheduleAtFixedRate(new TimerTask() { public void run(){ myBanner.refresh(); } }, 0, 3); However, it refreshes every half second or so, if the LogCat output is to be believed. What is wrong in my code. The app doesn't crash but the update time isn't right. Thanks -- Raghav Sood CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles required to have complete control) http://www.raghavsood.com/ 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 -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles required to have complete control) http://www.raghavsood.com/ 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] Update ad view every 30 seconds
I tried using a postDelayed like this: final Runnable r = new Runnable() { public void run() { myBanner.refresh(); handler.postDelayed(this, 1); } }; handler.postDelayed(r, 1); It still doesn't work. It updates continuously, instead of the ten seconds I specified. Thanks On Thu, Aug 18, 2011 at 4:17 PM, Appaholics raghavs...@appaholics.inwrote: I am only scheduling two timers, both using different names etc. I'll look into using postDelayed(); Thanks On Thu, Aug 18, 2011 at 4:13 PM, Mark Murphy mmur...@commonsware.comwrote: Why not use postDelayed()? It saves you a background thread, and your Runnable gets invoked on the main application thread (which will be necessary eventually for updating the ImageView or whatever the ad banner is). I haven't used Timer/TimerTask on Android. Nothing leaps out at me as being an issue with the code snippet, other than the background thread. Are you sure you're not accidentally scheduling lots of timers? On Thu, Aug 18, 2011 at 6:36 AM, Appaholics raghavs...@appaholics.in wrote: Hi, I am using the following to refresh my ad view every 30 seconds: Timer adTimer = new Timer(adUpdate); adTimer.scheduleAtFixedRate(new TimerTask() { public void run(){ myBanner.refresh(); } }, 0, 3); However, it refreshes every half second or so, if the LogCat output is to be believed. What is wrong in my code. The app doesn't crash but the update time isn't right. Thanks -- Raghav Sood CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles required to have complete control) http://www.raghavsood.com/ 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 -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles required to have complete control) http://www.raghavsood.com/ https://market.android.com/developer?pub=Appaholics http://www.appaholics.in/ -- Raghav Sood CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles required to have complete control) http://www.raghavsood.com/ 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
[android-developers] Setting Auto-sync ( setMasterSyncAutomatically )
Hi Folks, I am developing a group of widgets that allow the quick changing of various settings. I was hoping to set AutoSync, which I thought would stop background services from syncing their data, but this appears to be the Secure Setting BACKGROUND_DATA. My question is, what this function achieve? public static void setMasterSyncAutomatically (boolean sync)Is it useful to be able to set / unset this? Thanks for your help! All the best, Ash -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Update ad view every 30 seconds
On Thu, Aug 18, 2011 at 6:55 AM, Appaholics raghavs...@appaholics.in wrote: I tried using a postDelayed like this: final Runnable r = new Runnable() { public void run() { myBanner.refresh(); handler.postDelayed(this, 1); } }; handler.postDelayed(r, 1); It still doesn't work. It updates continuously, instead of the ten seconds I specified. Either you are calling this too often (thereby scheduling lots of Runnables), or the problem lies in myBanner.refresh() somewhere. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: parsing an XML document
So when do you use the Android parser, that parses stuff like manifest.xml, as opposed to JAVA parsers. Just curious. 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] Update ad view every 30 seconds
I am using the greystripe SDK, for which I need to call myBanner.refresh();. the same call works fine in another one of my apps when I call it at game over. However, here there is no moment at which I can call it and hence must run it every 10 seconds. I only call the runnable in onCreate as you can see: @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); handler=new Handler(); myBanner = (BannerView) findViewById(R.id.gsBanner); ads.initialize(this, mykey); accelerationTextView = (TextView) findViewById(R.id.acceleration); maxAccelerationTextView = (TextView) findViewById(R.id.maxAcceleration); sensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE); Sensor accelerometer = sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); sensorManager.registerListener(sensorEventListener, accelerometer, SensorManager.SENSOR_DELAY_FASTEST); Timer updateTimer = new Timer(gForceUpdate); updateTimer.scheduleAtFixedRate(new TimerTask() { public void run(){ updateGUI(); } }, 0, 5); final Runnable r = new Runnable() { public void run() { handler.postDelayed(this, 1); myBanner.refresh(); } }; handler.postDelayed(r, 1); } Does anything jump out at you? Thanks On Thu, Aug 18, 2011 at 4:32 PM, Mark Murphy mmur...@commonsware.comwrote: On Thu, Aug 18, 2011 at 6:55 AM, Appaholics raghavs...@appaholics.in wrote: I tried using a postDelayed like this: final Runnable r = new Runnable() { public void run() { myBanner.refresh(); handler.postDelayed(this, 1); } }; handler.postDelayed(r, 1); It still doesn't work. It updates continuously, instead of the ten seconds I specified. Either you are calling this too often (thereby scheduling lots of Runnables), or the problem lies in myBanner.refresh() somewhere. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles required to have complete control) http://www.raghavsood.com/ 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] Update ad view every 30 seconds
Nothing obvious. Create yourself a scrap project that just does the postDelayed() quasi-loop, logging to LogCat. You should see it simply show up every 10 seconds. On Thu, Aug 18, 2011 at 7:08 AM, Appaholics raghavs...@appaholics.in wrote: I am using the greystripe SDK, for which I need to call myBanner.refresh();. the same call works fine in another one of my apps when I call it at game over. However, here there is no moment at which I can call it and hence must run it every 10 seconds. I only call the runnable in onCreate as you can see: @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); handler=new Handler(); myBanner = (BannerView) findViewById(R.id.gsBanner); ads.initialize(this, mykey); accelerationTextView = (TextView) findViewById(R.id.acceleration); maxAccelerationTextView = (TextView) findViewById(R.id.maxAcceleration); sensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE); Sensor accelerometer = sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); sensorManager.registerListener(sensorEventListener, accelerometer, SensorManager.SENSOR_DELAY_FASTEST); Timer updateTimer = new Timer(gForceUpdate); updateTimer.scheduleAtFixedRate(new TimerTask() { public void run(){ updateGUI(); } }, 0, 5); final Runnable r = new Runnable() { public void run() { handler.postDelayed(this, 1); myBanner.refresh(); } }; handler.postDelayed(r, 1); } Does anything jump out at you? Thanks On Thu, Aug 18, 2011 at 4:32 PM, Mark Murphy mmur...@commonsware.com wrote: On Thu, Aug 18, 2011 at 6:55 AM, Appaholics raghavs...@appaholics.in wrote: I tried using a postDelayed like this: final Runnable r = new Runnable() { public void run() { myBanner.refresh(); handler.postDelayed(this, 1); } }; handler.postDelayed(r, 1); It still doesn't work. It updates continuously, instead of the ten seconds I specified. Either you are calling this too often (thereby scheduling lots of Runnables), or the problem lies in myBanner.refresh() somewhere. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles required to have complete control) http://www.raghavsood.com/ 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 -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: parsing an XML document
On Thu, Aug 18, 2011 at 7:05 AM, Dancing Fingers batym...@gmail.com wrote: So when do you use the Android parser, that parses stuff like manifest.xml, as opposed to JAVA parsers. the Android parser is a customized implementation of the XmlPullParser interface, one that can read the binary XML the aapt tool creates. You'll only use this parser when reading an XML resource (e.g., getResources().getXml()). -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 finish parent activity once child activity is loaded
Guys, any idea about my question? On Aug 17, 11:57 pm, Spica spicaneb...@gmail.com wrote: I want to load child activity from parent activity. Once child is loaded i want to finish the parent activity. I am trying this code, which closes whole application; ChildActivity.this.getParent().finish(); How i can finish parent only? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] external files to
Hi all, I got a pretty big Qt application (QGIS.org) to start running in android [0]. Awesome work on the necessitas and the NDK side, thanks a lot! I've a question, qgis needs stuff (sqlite databases, svg files, xml config,...) that normally is in $PREFIX/share/resources what is the best strategy (I've looked into assets but i'd like to get the real files on the filesystem so that qgis can handle them natively) to get this files on the (unrooted) device? it wolud be nice if everything is in one apk only but other suggestions are welcome as well. thanks a lot marco [0] http://www.bernawebdesign.ch/byteblog/2011/08/18/qgis-on-android-has-a-proper-gui/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] external files to
If the apk is getting to big you could download them at runtime. Otherwise just bundle everything and copy id to the SD Card if you need to. Thanks On Thu, Aug 18, 2011 at 5:01 PM, Marco Bernasocchi ma...@bernawebdesign.chwrote: Hi all, I got a pretty big Qt application (QGIS.org) to start running in android [0]. Awesome work on the necessitas and the NDK side, thanks a lot! I've a question, qgis needs stuff (sqlite databases, svg files, xml config,...) that normally is in $PREFIX/share/resources what is the best strategy (I've looked into assets but i'd like to get the real files on the filesystem so that qgis can handle them natively) to get this files on the (unrooted) device? it wolud be nice if everything is in one apk only but other suggestions are welcome as well. thanks a lot marco [0] http://www.bernawebdesign.ch/**byteblog/2011/08/18/qgis-on-** android-has-a-proper-gui/http://www.bernawebdesign.ch/byteblog/2011/08/18/qgis-on-android-has-a-proper-gui/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@**googlegroups.comandroid-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+**unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/**group/android-developers?hl=enhttp://groups.google.com/group/android-developers?hl=en -- Raghav Sood CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles required to have complete control) http://www.raghavsood.com/ 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] Re: How to finish parent activity once child activity is loaded
On Thu, Aug 18, 2011 at 7:31 AM, Spica spicaneb...@gmail.com wrote: Guys, any idea about my question? On Aug 17, 11:57 pm, Spica spicaneb...@gmail.com wrote: I want to load child activity from parent activity. Once child is loaded i want to finish the parent activity. Immediately after the parent calls startActivity(), the parent calls finish() on itself. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Camera image editing not working.
Helllo, I am loading image scale it to screen size and after that user can draw some text on it using his hand. After that user can save it to SD card. I need to save it to same width and height as original image has. For others sameple image it is working fine. But when i am loading the image captured by camera and once i draw something on draw. I try to scale image back to original height and width but it is giving Exception Out of Memory Exception for all the images captured by camera. The code is as follow. private void saveView(View view) { Bitmap b = Bitmap.createBitmap(view.getWidth(), view.getHeight(), Bitmap.Config.ARGB_); String filePath=/sdcard/; Canvas c = new Canvas(b); view.draw(c); float scaleHeight=((float)getHeight()/b.getHeight()); float scaleWidth=((float)getWidth()/b.getWidth()); Matrix matrix=new Matrix(); matrix.postScale(scaleWidth, scaleHeight); Log.e(getWidth(), :+getWidth()); Log.e(getHeight(), :+getHeight()); **//Giving Exception at below Line as i am trying to scat it to origenal size. b=Bitmap.createBitmap(b, 0,0,b.getWidth(),b.getHeight(),matrix,true);** Hope to hear soon from you. My problem is it is not working for any image taken by camera for others sample image it is working. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] external files to
On 08/18/2011 01:39 PM, Appaholics wrote: If the apk is getting to big you could download them at runtime. Otherwise just bundle everything and copy id to the SD Card if you need to. the apk is installed on external storage, for the size problem, but how do I get the assets from the apk to appfolder/org.qgis.qgis/files ? sometihing like this [0] or there is a shorter way? thanks [0] http://stackoverflow.com/questions/3851712/android-how-to-create-a-directory-on-the-sd-card-and-copy-files-from-res-raw-to Thanks On Thu, Aug 18, 2011 at 5:01 PM, Marco Bernasocchi ma...@bernawebdesign.ch mailto:ma...@bernawebdesign.ch wrote: Hi all, I got a pretty big Qt application (QGIS.org) to start running in android [0]. Awesome work on the necessitas and the NDK side, thanks a lot! I've a question, qgis needs stuff (sqlite databases, svg files, xml config,...) that normally is in $PREFIX/share/resources what is the best strategy (I've looked into assets but i'd like to get the real files on the filesystem so that qgis can handle them natively) to get this files on the (unrooted) device? it wolud be nice if everything is in one apk only but other suggestions are welcome as well. thanks a lot marco [0] http://www.bernawebdesign.ch/byteblog/2011/08/18/qgis-on-android-has-a-proper-gui/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Raghav Sood CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles required to have complete control) http://www.raghavsood.com/ 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Launch cancelled second time
hi all, i am making one application in that i have 2 static videos . the whole application is working fine but when i logout and again launch it . it says launch cancelled check the log cat and no error is shown in log cat please somebody help. thanks Ankur goel -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Support against corruption
To show your support for *Anna Hazare* and *Janlokpal Bill* – employees of various organizations have decided to *Wear Black Dress* on 19th August at work. Please spread the message to your colleagues and wear black dress on 19th August when you come to work. You may also wear a black arm band if you wish. Show your support against Corruption. This is the least you can do even if you can join the protest because of your office work. Let us make it successful. The Government has put condition to get 25 crore people to support * JanLokPal*. To give your support call *02261550789* (as given by Kiran Bedi) from your mobile no. Your Call will disconnect after 1 ring and your no registered automatically. You will get an SMS confirming this. Do it along to all your friends. Forward to as many people as you know .. verbally, by mails, by messages. Support Anti-corruption campaign lead by Anna Hazare ...Jai Hind. This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorised review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Fwd: [android-developers] Support against corruption
Thanks and Regards:- Ankur Goel 09019040351 S/W Engg. -- Forwarded message -- From: Avinash Nigam aviundefi...@gmail.com Date: Thu, Aug 18, 2011 at 5:40 PM Subject: [android-developers] Support against corruption To: Avinash Nigam iitk.avinash.ni...@gmail.com To show your support for *Anna Hazare* and *Janlokpal Bill* – employees of various organizations have decided to *Wear Black Dress* on 19th August at work. Please spread the message to your colleagues and wear black dress on 19th August when you come to work. You may also wear a black arm band if you wish. Show your support against Corruption. This is the least you can do even if you can join the protest because of your office work. Let us make it successful. The Government has put condition to get 25 crore people to support * JanLokPal*. To give your support call *02261550789* (as given by Kiran Bedi) from your mobile no. Your Call will disconnect after 1 ring and your no registered automatically. You will get an SMS confirming this. Do it along to all your friends. Forward to as many people as you know .. verbally, by mails, by messages. Support Anti-corruption campaign lead by Anna Hazare ...Jai Hind. This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorised review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Google Development phones
Sorry, that was just a throwaway comment. Eventually Motorola will become the gold standard for Android phones due to their proximity to the software, but in the short term they're no different than any other device. If whoever it was needs a phone today any of the phones that are out there should be fine. That's not entirely true. Motorola phones are still on top of their updates faster than most other devices, while other cheaper phones might not receive updates at all, or take quite an extensive amount of time to get the newest releases. As a developer it is useful to get the newest updates in a timely manner if you plan on using them anywhere near the newest OS release. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Animate ListView items
I try to animate new items in my ListView. I have stable id-s, so I know exactly which element to animate. The problem - I think -comes from the recycle mechanism of ListView. I call startAnimation on the View when I know I got a recently inserted element. But then, the view got recycled, filled with different data. It results on the UI animating the wrong row. At some point the view was holding the right data, but then got recycled. I confirmed this via logcat. Is there any way to solve this? I originally posted my question on stackoverflow. Original post: http://stackoverflow.com/questions/7055470/animate-list-items-in-listview Mate Gulyas -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 convert data host to network
i want to send a group of data to network server socket. i want to send request body convert host to network. i am not greeting way to handle these things plz help me -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to properly use WebViewFragment
Hi, I am trying to use a WebViewFragment in order to retain an instance of WebView even when the Fragment is not displayed. My goal is to have the names of several websites in the ActionBar. When users tap on one of the names, the corresponding website is opened in a WebViewFragment. When users open a website that has been opened before, the old WebView should get restored. Right now, I have a subclass of WebViewFragment that looks like this: public class MyWebViewFragment extends WebViewFragment { private String mURL; public static MyWebViewFragment getInstance(String url) { MyWebViewFragment f = new MyWebViewFragment(); Bundle args = new Bundle(); args.putString(url, url); f.setArguments(args); return f; } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setRetainInstance(true); mURL = getArguments().getString(url); } @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); WebView webView = getWebView(); if (webView != null) { if (webView.getOriginalUrl() == null) { webView.getSettings().setJavaScriptEnabled(true); webView.loadUrl(mURL); } } } } When the users press a button in the ActionBar, I execute the following method: private void addWindow(String url) { FragmentManager fm = getFragmentManager(); FragmentTransaction ft = fm.beginTransaction(); MyWebViewFragment currentWindow = (MyWebViewFragment) fm.findFragmentById(R.id.fragment_container); if (currentWindow != null) { ft.remove(currentWindow); } //See if the window we are requesting has already been created MyWebViewFragment newWindow = (MyWebViewFragment) fm.findFragmentByTag(url); if (newWindow == null) { newWindow = MyWebViewFragment.getInstance(url); } ft.add(R.id.fragment_container, newWindow, url); ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN); ft.addToBackStack(null); ft.commit(); } However, the state of the WebView is not retained when I recover a Fragment using the FragmentManager. It seems that onCreateView returns a fresh WebView every time the View is created. How can I avoid this behavior? Is it even possible to retain an instance of WebViewFragment over time? I mean, it should be possible because the Android browser needs to do it as well. Any advice would be very much appreciated! Cheers, Philipp -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 based TCP/IP socket program sample code
Dear All, I am trying out TCP/IP socket programming on android first time. Could you please share some source code if you have any available or some good links of the working samples. Thanks Amol -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Search Dialog below title bar
Hi all, I am using the Search Dialog in my app and was wondering if it was possible to change where it renders. Right now it pops down from the notifications bar but this covers the custom title bar I am implementing. Is it possible to have the Search Dialog render directly below the title bar instead of the notifications bar? Thanks, Tony -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] 如何將寫好的檔案轉成.jar檔
我想請問一下,我寫了一個類別 在類別之中用JNI調用到一些C的程式碼 當我完成後要如何把檔案打包成.jar檔呢? 那些調用的C程式碼也要打包嗎? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Andriod Ebooks
Hello all developer I am new in andriod, so would you mind sending me the ebook download link or web tutorial? Best Regard Kakada -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: about Async Task
You mean you do NOT want to execute the same task twice (e.g. when the user clicks a button two or more times in quick succession)? If so, then disable the button until the AsyncTask has finished. You know when it's finished by implementing/overriding the onPostExecute method and from there you can enable that button again. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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!!!
I'm making an application and I want to know how to pause Android's default music player using code? I'm using HTC Sensation, if it matters. 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] ADT - Unable to add widget to layout/Unexplainable crashes
Hello, I'm just trying to setup a dev environment so that I can use ADT + Maven. I have 2 32-bit boxes (XP/Debian 6.0) that are failing to work properly. I've tried downloading both Helios and Indigo of the Java EE distro, and then installing m2e, followed by ADT. In XP, I open main.xml (the generated default) and it appears to open, but then suddenly crashes. I'm not seeing a log anywhere to indicate what the issue is. In Linux, I attempt to drag a widget onto the canvas (or whatever the correct word is), and it just doesn't do anything. At first, it looks like the grabbing hand with a + next to it, but the + quickly disappears. XP has a 1.79GHz Duron CPU + 1.25GB RAM and Debian has a P4 2.8GHz dual-core CPU + 1.25GB RAM. I'm at a loss 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] dinamic web layout
hi guys , im new at developping 4 android and i would like to make a aplication that loads the layout from the web , for example , a site that shows the tweets of that day , and each new tweet it adds dinamicly, not a static layout load from a .xml file -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] using the uses-library to hide DLC
If they are signed by the same key, both applications should be able to use the same user id, data folder and process space. I'm thinking of doing something similar, where the main application can download and install additional apk's directly from our web site. But I haven't got around to experimenting with it yet. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Just received Lodsys letter...
This is just more of the same BS that has been going on for years. Lodsys playing the same game everyone else has been playing isn't going to lead to patent reform, it's just going to lead to more small developers being intimidated and beginning programmers not even trying to create because they are scared of getting sued. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Problems with pre-installed Google Listen
Hi, I have two questions: First, how common is it to find Listen app (com.google.android.apps.listen) pre-installed? I have a stock T- Mobile G2 and it's installed by default for me, but I'm curious where else it's distributed? Second, I've discovered this app contains an annoying default intent: any link to a file with a .xml extension, regardless of the mime type results in a context menu prompting the user to specify if they'd like to use the browser or the listen app to download the file. Unfortunately for me I've got a website with bunch of .xml files with text/html mime types. Any links to those files triggers the context menu, even though the content is only HTML. Seems like an overly aggressive intent got set in the Listen app, but it's unclear if I have any recourse, aside from changing the file extensions. Does anyone have thoughts on workarounds? kpw -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Hindi font issue
Hi All, I have developed an application which supports multiple languages. I'm facing issue in rendering Hindi font. I'm using Mangal font. The matras are being misplaced. I have tried - overriding onDraw method Using webview instead of Textview Please let me know if any one of you have a solution for this. I appreciate your help in advance. Thanks, Jyothi -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: inflating xml runtime and repeating that view?
why don't you just try using gridviewhttp://developer.android.com/resources/tutorials/views/hello-gridview.html ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Stream 3GP/H263/AMR via RTP. H263 Payload Header?
This is exactly the same problem I'm trying to work on right now. If you skip the first 32 byte header, then you can split out the audio stream by looking for repeating 32 byte blocks that all start with an 0x3c byte. If you write whatever is left into a file, you can play it with ffdshow. But that doesn't seem to notice that there are missing frames, so it plays it back much too quickly. So we look for (buff.getInt()0xFC) == 0x80 frame markers, decode the TR field from the next 8 bits of the header and insert dummy frames for each one skipped. ffdshow complains about our incomplete headers, but it will at least play the stream back at the correct speed. So far that all works with a TCP stream as per that blog post you linked to. But I'd like to encode the video and audio streams in RTP packets. And I've tried, but I must still be doing something wrong as the received stream is not playable. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] opengl( how to move the objects )
Hi friends I am trying to develop the tower of honoi by using android opengl the problem is i need to move the disc from sorce to destination how can i do that in 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
[android-developers] What is Android Middleware?
Hi, Is Android middleware made of the libraries,runtime ? Application Middleware Kernal Is the concept I knew, Kindly clarify my doubt if Android middleware is made of Libraries and Runtime? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 use java.net and java.nio package classes in the android
Hi I am new to android environment I have written a program which creats the MulticastSocket ( java.net ) and listens to the packets which directed to 239.255.255.250:1900 adress. I could able to see all the packets which are addressing this multicast address when am executing this program as java program. But the problem when it comes to android application, I tried to include the same program in android application which just instantiate the class (multicast server) which is doint everything ( listening packets and printing packets). But it is not working as android application eventhough am sending the packets to that address it is not listening those packets. I have included uses-permission android:name=android.permission.INTERNET / in manifest file also.. Can you please some body tell me what else I need to inlcude in the android project to get socket programs to work. 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] press the power key but see the short display of the paused activity before the ultimate display of the keyguard screen
I frequently encounter the following situation: firstly press the power key to leave the current application,then press the power key again to return, but see the short display of the suspended activity before the ultimate display of the keyguard screen. what is the reason for that? Thanks a lot 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] Place a custom view on a relative layout programmatically
Hi, I want to use a custom view (contains a bitmap) to put a bitmap where i want on the screen (i want to build a custom design for the application). I do a little project who explains the problem. I want to move the view from the corner top/left to 100px. I use a RelativeLayout in my main layout and a MyCustomView to draw the bitmap. main.xml ?xml version=1.0 encoding=utf-8? RelativeLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent android:id=@+id/relativeLayout android:layout_alignParentTop=true android:layout_alignParentLeft=true /RelativeLayout MyCustomView : public class MyCustomView extends View { private Bitmap mBugdroid; public MyCustomView(Context pContext) { super(pContext); mBugdroid = BitmapFactory.decodeResource(getResources(), R.drawable.bugdroid); } @Override protected void onDraw(Canvas pCanvas) { pCanvas.drawBitmap(mBugdroid, 0, 0, null); } } Activity : public class TestMarginActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); RelativeLayout mainLayout = (RelativeLayout) findViewById(R.id.relativeLayout); MyCustomView customView = new MyCustomView(this); // Settings here the margin : Doesn't works! MarginLayoutParams mLayoutParams = new MarginLayoutParams(338, 338); mLayoutParams.setMargins(100, 100, 0, 0); customView.setLayoutParams(mLayoutParams); mainLayout.addView(customView, 0, mLayoutParams); } } It doesn't work... the bitmap stays on the left/top corner of the application. I don't know why... Can you help me ? Regards. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Error message while running SQLite Database
Hello Sir i created a Android Application by using SQLiteDatabase, my project is launch Succesfully.But i got runtime Exception. va/lang/String;)V (CallStaticVoidMethodV) W/dalvikvm( 170): Pending exception is: I/dalvikvm( 170): java.lang.RuntimeException: android.os.RemoteException I/dalvikvm( 170): at android.os.Parcel.writeException(Parcel.java:1222) I/dalvikvm( 170): at android.os.Binder.execTransact(Binder.java: 341) I/dalvikvm( 170): at com.android.server.SystemServer.init1(Native Method) I/dalvikvm( 170): at com.android.server.SystemServer.main(SystemServer.jav a:643) I/dalvikvm( 170): at java.lang.reflect.Method.invokeNative(Native Method) I/dalvikvm( 170): at java.lang.reflect.Method.invoke(Method.java: 491) I/dalvikvm( 170): at com.android.internal.os.ZygoteInit $MethodAndArgsCalle r.run(ZygoteInit.java:841) I/dalvikvm( 170): at com.android.internal.os.ZygoteInit.main(ZygoteInit.ja va:599) I/dalvikvm( 170): at dalvik.system.NativeStart.main(Native Method) I/dalvikvm( 170): Caused by: I/dalvikvm( 170): android.os.RemoteException: I/dalvikvm( 170): at com.android.server.CountryDetectorService.detectCount ry(CountryDetectorService.java:96) I/dalvikvm( 170): at android.location.ICountryDetector $Stub.onTransact(ICo untryDetector.java:53) I/dalvikvm( 170): at android.os.Binder.execTransact(Binder.java: 339) I/dalvikvm( 170): at com.android.server.SystemServer.init1(Native Method) I/dalvikvm( 170): at com.android.server.SystemServer.main(SystemServer.jav a:643) I/dalvikvm( 170): at java.lang.reflect.Method.invokeNative(Native Method) I/dalvikvm( 170): at java.lang.reflect.Method.invoke(Method.java: 491) I/dalvikvm( 170): at com.android.internal.os.ZygoteInit $MethodAndArgsCalle r.run(ZygoteInit.java:841) I/dalvikvm( 170): at com.android.internal.os.ZygoteInit.main(ZygoteInit.ja va:599) I/dalvikvm( 170): at dalvik.system.NativeStart.main(Native Method) I/dalvikvm( 170): main prio=5 tid=1 NATIVE I/dalvikvm( 170): | group=main sCount=0 dsCount=0 obj=0x4001b5c8 self=0x125 d8 I/dalvikvm( 170): | sysTid=170 nice=0 sched=0/0 cgrp=default handle=-13429134 32 I/dalvikvm( 170): | schedstat=( 913830670 679912199 101 ) utm=55 stm=36 core= 0 I/dalvikvm( 170): at com.android.server.SystemServer.init1(Native Method) I/dalvikvm( 170): at com.android.server.SystemServer.main(SystemServer.java:6 43) I/dalvikvm( 170): at java.lang.reflect.Method.invokeNative(Native Method) I/dalvikvm( 170): at java.lang.reflect.Method.invoke(Method.java: 491) I/dalvikvm( 170): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.r un(ZygoteInit.java:841) I/dalvikvm( 170): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java: 599) I/dalvikvm( 170): at dalvik.system.NativeStart.main(Native Method) I/dalvikvm( 170): E/dalvikvm( 170): VM aborting I/DEBUG ( 31): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** * ** -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Just received Lodsys letter...
I'm not a patent lawyer either so this isn't advice - it's just my understanding of what your options might be. Sounds like you just got an official notice explaining why you can't write your software the way you have. It's their case. You can, of course prove Lodsys wrong if you do have rights. You really need a patent attorney to know what those rights are. You have to respond to this, at least by talking to them to explain why you don't violate their patent. If you do in fact violate their patent they'll make you change your software and then make you promise to never do that again. And only rely on things in writing: e-mail or by letter. Relying on verbal conversations would be a mistake. If that doesn't work, talk to your attorney. I do know this: if you can show you actually have rights to your invention (your lawyer can tell you that), then this may force Lodsys to pay YOU royalties. And, if they go to court, and the court finds that you actually own the rights to your invention, the court can actually invalidate the Lodsys' patent. An attorney is worth their weight in gold in these circumstances ... literally. Just my $0.02. Richard Schilling -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Hey need a help
Well i did add android to my system but my mobile keys are not working and mostly im using the screen so is there anyway to use the screen to go Back at least or something like or just to end apps since i've the other keys dead :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] Android instrumentation execution report generation
Hi All, Currently i have automated one application under test. i created a test application. I am using command prompt to run the application. Inside my test application , i have written code to print some logs when it enters to each test methods. e.g log.d(test1, inside first test case); Now i am running my application from command line: adb shell am instrument -w test application package/ android.test.InstrumentationTestRunner I want to do two things. I want to see the messages that gets printed as logs. ( the message i gave inside my code). How can i see my custom log messages. I just want my custom log messages to be shown to the end user. i dont know if i can use -e option to print the messages to a file. Is it possible to only capture my custom message into a new file. How can i do it from the command line. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] adb push error
I am trying to put .so file in the /system/lib folder of device by using adb push, $adb push /home/sudhir/Development/newdroid/filename.so /system/lib but it faile gives me error like, Error: failed to copy '/home/sudhir/Development/newdroid/ libnfc_ndef.so' to '/system/lib/libnfc_ndef.so': Directory not empty Can anyone explain why this happen wat is the solution. Thanx in advance. Regards, androx -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 do dalvik heap deduction for each heap
Hi all, Could you please give some info. about how to adjust each vm heap size? Through DDMS, i found that each app's vm heap free size is big, about 50% of the total vm size, this ratio doesn't change a lot even when the phone runs a large application. So i think shall we reduce the vm heap size ? I tried to modify 'setTargetHeapUtilization' to 0.9, but it seems useless... and i also trid to set setprop dalvik.vm.heapsize 6m directly, but the phone reported out of memory error. Can you give me some advice on how to do vm heap tuning and let the vm free size be smaller? Thanks Binz -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] adb push error- failed to copy : OUT OF MEMORY
Hi all, I want to push a file using adb push at path /system/usr/keychars on the android emulator but I get an error failed to copy 'xxx.kcm.bin' to '/system/usr/keychars/xxx.kcm.bin': Out of memory How to rectify it. Thanks Yatin -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Webview with transparent background
On Aug 18, 10:23 am, bob b...@coolgroups.com wrote: Is there any way to make a Webview have a transparent background? Thanks. RTM pls. public void setBackgroundColor (int color) Set the background color. It's white by default. Pass zero to make the view transparent. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Andriod Ebooks
On Thu, Aug 18, 2011 at 12:09 AM, Moul Kakada moul.kak...@gmail.com wrote: Hello all developer I am new in andriod, so would you mind sending me the ebook download link or web tutorial? Sure, developer.android.com Best Regard Kakada -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Downloading Files Directly in Webview without it opening the browser
I do not want to hide it i want it to download inside the application itself not have it when a link is clicked launch the web browser and download the file off the browser On Aug 18, 3:05 am, Kristopher Micinski krismicin...@gmail.com wrote: On Thu, Aug 18, 2011 at 2:40 AM, Raziel23x raziel...@gmail.com wrote: On Aug 17, 1:30 pm, lbendlin l...@bendlin.us wrote: you don't need a webview for that. Just use HTTP GET directly. Explain as my application uses webview to list files for download that when you click the links to the files they want to open a web browser before starting the downloads From what it sounds like you want to do, you want them to click on the links and then hide their download from the webview? This doesn't sound like a standard design at all, though I can think that it would be possible if you registered a javascript callback and then in your code did the http get. On the other hand, why not use an actual listview or something, why use the webview to list the links? And why hide their download from the user? Kris -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] dinamic web layout
On 18 August 2011 02:21, talles talles.d@gmail.com wrote: hi guys , im new at developping 4 android and i would like to make a aplication that loads the layout from the web , for example , a site that shows the tweets of that day , and each new tweet it adds dinamicly, not a static layout load from a .xml file layout != content Check ListView and ListAdapter. -- Daniel Drozdzewski -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: using the uses-library to hide DLC
On Aug 18, 8:23 am, Jeremy Lakeman jer...@servalproject.org wrote: I'm thinking of doing something similar, where the main application can download and install additional apk's directly from our web site. But I haven't got around to experimenting with it yet. Won't the user device need to have 'Install from unknown sources' enabled, which could be an issue (unless this doesn't happen with the shared ids)? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] ADT - Unable to add widget to layout/Unexplainable crashes
On Wed, Aug 17, 2011 at 7:11 PM, bsanders1979 briansanders1...@gmail.com wrote: Hello, I'm just trying to setup a dev environment so that I can use ADT + Maven. I have 2 32-bit boxes (XP/Debian 6.0) that are failing to work properly. I've tried downloading both Helios and Indigo of the Java EE distro, and then installing m2e, followed by ADT. In XP, I open main.xml (the generated default) and it appears to open, but then suddenly crashes. I'm not seeing a log anywhere to indicate what the issue is. Did you mean that the editor fails to open (if so, look in Window Show View Error Log) or did the whole IDE crash? I don't know if this will work, but the layout editor requires a lot of memory, so you might try giving Eclipse more memory to see if that helps. Open eclipse.ini in your Eclipse install and find the flag -Xmnumberm and change it to say -Xmx768m. In Linux, I attempt to drag a widget onto the canvas (or whatever the correct word is), and it just doesn't do anything. At first, it looks like the grabbing hand with a + next to it, but the + quickly disappears. Are you running Ubuntu 11.04 by any chance? This sounds like it might be http://code.google.com/p/android/issues/detail?id=19057 (which sadly we don't know the cause of yet) -- Tor -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Hindi font issue
On 18 August 2011 07:33, jyothi winit gattujyo...@gmail.com wrote: Hi All, I have developed an application which supports multiple languages. I'm facing issue in rendering Hindi font. I'm using Mangal font. The matras are being misplaced. I have tried - overriding onDraw method Using webview instead of Textview Please let me know if any one of you have a solution for this. I appreciate your help in advance. Thanks, Jyothi Try using different font just to test. Wikipedia suggests that Mangal has issues with ligatures/matras: http://en.wikipedia.org/wiki/Mangal_(font) -- Daniel Drozdzewski -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: trouble loading a youtube video in webview
I found the problem and have fixed it. I had to setPluginsEnabled(true) and setJavascriptEnabled(true) on the webview instance. Now it plays just fine on the emulator as well as on the nexus 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] Image is saved twice
Hi All, I am using the following intent: Intent i = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); i.putExtra(android.provider.MediaStore.EXTRA_OUTPUT, uri); Basically i am using ACTION_IMAGE_CAPTURE intent to invoke the camera and save the taken image into the specified uri. It works but at the same time the image is also saved with the default name. Thus once i have snapped the picture, it is saved twice, both in the uri and in the default path and name. How do i ensure that it is only saved in the specified uri? Thanks In Advance, Perumal -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Place a custom view on a relative layout programmatically
MyCustomView customView = new MyCustomView(this); // Settings here the margin : Doesn't works! MarginLayoutParams mLayoutParams = new MarginLayoutParams(338, 338); mLayoutParams.setMargins(100, 100, 0, 0); customView.setLayoutParams(mLayoutParams); mainLayout.addView(customView, 0, mLayoutParams); Replace with the following codes and you will find the custom view on the right position: // for testing only MyCustomView customView = new MyCustomView(this); RelativeLayout.LayoutParams layoutParam = new RelativeLayout.LayoutParams(100, 100); layoutParam.setMargins(100, 100, 0, 0); mainLayout.addView(customView, 0, layoutParam); BTW, for specified width and height of this custom view, you need to check the View.onMeasure() method. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Help!!!
Are you trying to pause a media player that you have created, or are you trying to pause any media player that may be running or started by another application? On Thu, Aug 18, 2011 at 8:27 AM, oliverorav olivero...@gmail.com wrote: I'm making an application and I want to know how to pause Android's default music player using code? I'm using HTC Sensation, if it matters. Thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Hey need a help
To end an app without the use of the back button you could try to go into your app drawer and select settings-applications-manage applications and from there you can chose to see what apps are running and then select them and make them force close or even uninstall. On Thu, Aug 18, 2011 at 1:41 AM, Hossam Samy hossamsam...@gmail.com wrote: Well i did add android to my system but my mobile keys are not working and mostly im using the screen so is there anyway to use the screen to go Back at least or something like or just to end apps since i've the other keys dead :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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: about Async Task
Yes, usually AsyncTask is only able to be run once. Restarting the same task may give you a little trouble though due to this. If you have something that needs to run over and over again I would suggest that you look into starting a service and loop the task you need to keep running in its own thread and just make it sleep for the needed amount of time. As long as you have the activity running in its own thread in a service you can loop it and make it repeat infinitely as long as you allow the service to run. On Thu, Aug 18, 2011 at 8:30 AM, Streets Of Boston flyingdutc...@gmail.comwrote: You mean you do NOT want to execute the same task twice (e.g. when the user clicks a button two or more times in quick succession)? If so, then disable the button until the AsyncTask has finished. You know when it's finished by implementing/overriding the onPostExecute method and from there you can enable that button again. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] date parsing
I'm using this code to try to parse a date: Date myDate = DateFormat.getDateInstance().parse(s); However, I get this: java.text.ParseException: Unparseable date: Sun, 19 Jun 2011 02:28:34 -0500 Any ideas how I can easily parse a date in that format? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Serious bug in 3.2 ResolverActivity
Is the Android team aware of this bug, I see there is a bug report at: http://code.google.com/p/android/issues/detail?id=18638 from July 18 but the status is still New. Some say that it has been fixed but for what release and what device, and is it indeed a fix because the bug will not show up in all cases. On Aug 8, 5:55 pm, webmonkey webmonke...@gmail.com wrote: In Honeycomb 3.2 when you start an intent and there are multiple activities that are capable of handling the intent the ResolverActivity is displayed but it does not show the choice menu so the user is unable to do anything. This is quite a serious bug and I have got quite a few reports about it from users who have upgraded to 3.2. I have also confirmed the behavior myself using an Asus Transformer with 3.2 and Android Movie Studio. You cannot pick any media to insert because the Gallery/ File Manager won't open. There are some solutions: - Flip the device once to portrait orientation, after that, the menu does appear. Until you reboot. - If there is only one Activity that can handle the Intent or if you have set a default Activity for the Intent, it works because the ResolverActivity does not have to display the choice Menu. - If you use createChooser the choice menu is displayed successfully. Can anyone confirm if this also happens with any of the 3.2 updates on the Xoom. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] date parsing
On 18 August 2011 16:45, bob b...@coolgroups.com wrote: I'm using this code to try to parse a date: Date myDate = DateFormat.getDateInstance().parse(s); However, I get this: java.text.ParseException: Unparseable date: Sun, 19 Jun 2011 02:28:34 -0500 Any ideas how I can easily parse a date in that format? Your code expects the String s to be in the DEFAULT format for your platform (locale), which probably differs from the one you are passing in. To check, what is the default format, call the following: String dateInDefaultFormat = DateFormat.getDateInstance().format(new Date()); -- Daniel Drozdzewski -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Animation + Touch + Rotate bitmap
Hi, I need to make an animation to rotate a bitmap, using touch. The user can do only the rotation of bitmap, when the touch is pressed and moved the bitmap image go rotate animation, follow the finger. How can I do it ? 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] Activity test fails on getActivity()
I am unit testing the activities in an application. The first activity test runs fine and everything passes. The second test fails at getActivity() returning a NPE. I am assuming that since this is unit testing that getActivity() should launch the activity even if this activity is reliant on a previous activity to start it. Any ideas? //This code works, the activity launches and is tested @Override protected void setUp() throws Exception{ super.setUp(); setActivityInitialTouchMode(false); mActivity = getActivity(); mStartButton = (Button) mActivity.findViewById(com.drayagerecorder.R.id.ButtonStart); mStopButton = (Button) mActivity.findViewById(com.drayagerecorder.R.id.ButtonStop); mEditTextTripName = (EditText) mActivity.findViewById(com.drayagerecorder.R.id.EditTextTripName); } //This code fails and returns a NPE @Override protected void setUp() throws Exception{ super.setUp(); Log.i(tag, Setup); setActivityInitialTouchMode(false); Log.i(tag, TouchMode); oActivity = getActivity(); Log.i(tag, getActivity); oSpinner = (Spinner) oActivity.findViewById( com.drayagerecorder.R.id.origin); oOriginData = oSpinner.getAdapter(); dSpinner = (Spinner) oActivity.findViewById( com.drayagerecorder.R.id.destination); dDestinationData = dSpinner.getAdapter(); tSpinner = (Spinner) oActivity.findViewById( com.drayagerecorder.R.id.triptype); tTripTypeData = tSpinner.getAdapter(); } //The log shows that it fails at getActivity(). I am assuming that since this is unit testing that getActivity() should launch the activity even if this activity is //reliant on a previous activity to start 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] Re: adb push error
On Thursday, August 18, 2011 5:28:31 AM UTC-4, androx wrote: I am trying to put .so file in the /system/lib folder of device by using adb push, $adb push /home/sudhir/Development/newdroid/filename.so /system/lib As far as this forum (which is about developing 3rd party applications) is concerned, you cannot and should not be trying to do that. /system/lib is not a locations writable by 3rd party devs - you should instead be packaging your native libs in the .apk of your application in accordance with the ndk docs (follow-up on issues there should go to the android-ndk group) If you are looking to change the android installation itself, that would be marginally on topic for android-porting, as a quick summary you should include the file when building the android system, though on an unsecured development or rooted device you may be able to remount the system partition readable and then adb push something there. But this is not the place to discuss that. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: adb push error
On Thursday, August 18, 2011 5:28:31 AM UTC-4, androx wrote: I am trying to put .so file in the /system/lib folder of device by using adb push, $adb push /home/sudhir/Development/newdroid/filename.so /system/lib As far as this forum (which is about developing SDK applications) is concerned, you cannot and should not be trying to do that. /system/lib is not a locations writable by 3rd party devs - you should instead be packaging your native libs in the .apk of your application in accordance with the ndk docs (follow-up on issues there should go to the android-ndk group) If you are looking to change the android installation itself, that would be marginally on topic for android-porting, as a quick summary you should include the file when building the android system, though on an unsecured development or rooted device you may be able to remount the system partition writeable and then adb push something there. But this is not the place to discuss that. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Google Development phones
The Nexus phones will always get updates quickest, though I'd be willing to bet that after the Nexus Prime, they will all be made by Motoogle. On Aug 18, 2011 6:06 AM, ColorTheorist colortheorydevelo...@gmail.com wrote: Sorry, that was just a throwaway comment. Eventually Motorola will become the gold standard for Android phones due to their proximity to the software, but in the short term they're no different than any other device. If whoever it was needs a phone today any of the phones that are out there should be fine. That's not entirely true. Motorola phones are still on top of their updates faster than most other devices, while other cheaper phones might not receive updates at all, or take quite an extensive amount of time to get the newest releases. As a developer it is useful to get the newest updates in a timely manner if you plan on using them anywhere near the newest OS release. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] DexClassLoader and DexFile Leaking File Handles
I have an application that uses a DexClassLoader to load some dynamically updateable plugin code. I created a stress test essentially looks like this: while (true) { Copy plugin jar from assets to temp directory Create a DexClassLoader using plugin jar as the classpath Load plugin using this class loader Delete plugin jar from temp directory } Eventually, creating the DexClassLoader fails due to lack of disk space. When I look in /proc/pid/fd, I see that my process is still holding file handles to all of the now-deleted copies of the plugin jar in the temp directory. I see from looking at the code that DexClassLoader has an array of JarFile's and an array of DexFile's, which never seem to get closed. I created my own copy of DexClassLoader that has a close() method that cleans up these arrays, but this has two problems: 1. It is not obvious when I should call the close method, since it's difficult to know when all of the objects from an instance of the plugin are gone. I assume it's not safe to invalidate a classloader when objects loaded from it are still around, since they might need to load other classes from the classloader later. 2. Even when I do call the close method on my classloader, calling DexFile.close() does not cause it to release it's handle to the jar file. This is consistent with the documentation for DexFile. Is there a good way to clean up the resources used by a DexClassLoader? Or do I just have to hope that in the real world, my application's process gets restarted often enough that I won't hit this problem? Thanks, 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
[android-developers] Re: Android PDF Rendering
Writing your own parser/renderer is not a trivial task, particularly when it gets to putting images into a pdf. I just discovered PDFJet... I'm playing with it now, it's simple and has a lot of functionality. I don't think annotations are in there yet though. Their open-source version doesn't support a few things like word-wrapping, but their commercial licensing is only $297 (at least for the little guys like me) iText costs a small fortune (several thousand $) to use for commercial apps, although it does have much more functionality than PDFJet, like forms and encryption. This massive library seems to support everything PDF, including annotations. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Downloading Files Directly in Webview without it opening the browser
On Thu, Aug 18, 2011 at 9:53 AM, Raziel23x raziel...@gmail.com wrote: I do not want to hide it i want it to download inside the application itself not have it when a link is clicked launch the web browser and download the file off the browser Ah, so your problem is that you need access to the files? Yes, I think if I were you, I'd instead use something like a listview, then when someone clicks an object, in the handler download the object and store it somewhere (like the sd card.) Will that work? Kris -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Android PDF Rendering
On Thu, Aug 18, 2011 at 2:11 PM, LackeySoft g...@lackeysoft.com wrote: Writing your own parser/renderer is not a trivial task, particularly when it gets to putting images into a pdf. I just discovered PDFJet... I'm playing with it now, it's simple and has a lot of functionality. I don't think annotations are in there yet though. Their open-source version doesn't support a few things like word-wrapping, but their commercial licensing is only $297 (at least for the little guys like me) Except that PDFJet is not a parser/renderer, at least from what I can see on their Web site: PDFjet is a programming library that enables universal reporting in your web or desktop application -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Asus Eee Pad not supported by my app due to manifest settings when nothing is incompatible
Hi, I have an app. I recently asked someone to install the app on their Asus Eee Pad. However he told me that his device wasn't supported. I looked at the dev console and found out that it is being excluded due to my manifest settings. However everything my manifest asks for is available. Another market bug or something else? Thanks -- Raghav Sood CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles required to have complete control) http://www.raghavsood.com/ 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
[android-developers] Re: Asus Eee Pad not supported by my app due to manifest settings when nothing is incompatible
It would be helpful if you mentioned the app in question. I checked all your apps and they are all compatible with my Transformer. None of them are compatible with my phone (HTC Desire). The apps apk tab has info used for filtering (api level,supported screens,features,opengl) so maybe something is mentioned there. On Aug 18, 7:31 pm, Appaholics raghavs...@appaholics.in wrote: Hi, I have an app. I recently asked someone to install the app on their Asus Eee Pad. However he told me that his device wasn't supported. I looked at the dev console and found out that it is being excluded due to my manifest settings. However everything my manifest asks for is available. Another market bug or something else? Thanks -- Raghav Sood CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles required to have complete control)http://www.raghavsood.com/https://market.android.com/developer?pub=Appaholicshttp://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
[android-developers] Android Dynamic Linking - DETAILS NEEDED
Hello: I am new to Android and I've jumped right into developing a native service. This effort involves a lot of GNU C software and is going well, but dynamic linking/libraries have been giving me FITS. I need SPECIFIC DETAILS for how to link a JNI shared library so that it has other .so dependencies, and where to put the libraries in the .apk layout such that the dynamic linker will find them. I cannot IMAGINE why this isn't documented, but it does not seem to be and this does not work as I expect it to. Please help., and thanks in advance.. Craig -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Who fires OnCreate event?
I was trying to understand how the Activity lifecycle is being managed! Is there someone who is firing all the events of the lifecycle? maybe ActivityManagerService? What if I want to customize the activity lifecycle and add a new event to it? Any guidance on what kind of changes needs to be done? Thanks very much in advance Pavan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en