[android-developers] Acting on broadcast intent when switching apps
I have an button in an activity, that calls an IntentService and shows a ProgressBar. After it is done downloading large files, it then creates a notification and broadcasts an intent with a String message stating 3 files downloaded. or Unable to connect to server. The activity registers a receiver in onResume and unregisters it in onPause. In the BroadcastReceiver's onReceive it displays a DialogFragment with a message from the intent. It also hides the notification and hides the ProgressBar. If the app is not in the foreground, and you click on the notification, it triggers the activity's onNewIntent. It then displays a DialogFragment with a message from the intent. It also hides the ProgressBar. If the app is not in the foreground however, and you use the App Switcher to return to the app, the notification does not clear and the DialogFragment never shows. The ProgressBar is also still visible. Is there a way within the Android framework to handle the last situation? I'm thinking of a hack by not actually bothering with the message in the intent, and storing it in SharedPreferences, but is there another way? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: contextual action mode vs. floating menu
I would go with a overflow menu icon, or the spinner icon (without any text). So the single-click is on a LinearLayout, the fake spinner icon is an ImageButton, and there are checkboxes which activate the contextual action mode. There would be no long-click. On Monday, October 1, 2012 4:47:07 PM UTC+8, Benoît Bouré wrote: Hi, According to this page: http://developer.android.com/guide/topics/ui/menus.html#context-menu, Contextual Action Mode is preferred when working on Honeycomb or higher. This is actually very useful when you can apply the same kind of action to several items at a time (eg: delete). But some actions actually only make sense on one item at a time (eg: Edit). If you have only one of these actions, well, you can simply use the single click for it. So: One click = edit Select multiple items = action mode with actions that apply to many items An example of that is the Gmail app: one click = read the email and selecting many items, you can mark them as read, delete them, etc. OK, but what if you have multiple actions that can only a apply to one item at a time? Imagine the following situation. You have a list of profiles.You can do the following actions on the profiles: - delete - export (save in a file) - share These actions could be applied to many items at a time, so you place them in the action mode. But other actions could be: - edit - apply You can only edit or apply one profile at a time. So, in that case, is it OK to continue using floating menus like this: One single click or long-click opens a floating menu with available options on that particular item alone (edit, apply, delete, export, share). Selecting multiple items activates the action mode with actions that apply to all the selected items (delete, export, share) Or maybe is it better to keep using action mode only? When one item is selected, all actions are available (edit, apply, delete, export, share) When more than one item are selected, the actions edit and apply are disabled/removed from the action bar. Both methods can work of course and it could be up to the developer to choose but what would be best practice? Thanks!! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: google mail
You should use their recommended way. That way you just call a findViewById, and if it returns null, you know it's the phone layout. Plus it gets to be a headache when you need to have a landscape layout and multiple different sizes and resolutions! On Tuesday, June 19, 2012 6:56:44 AM UTC+8, h4uw1n3 wrote: I'm really interested in android, i might be didn't have any skill in java, but still i want to ask about this... according to http://android-developers.blogspot.de/2011/07/new-tools-for-managing-screen-sizes.html Android will pick the resource that is closest to the device’s screen size or orientation...for example this layout, which only shows the folder list https://lh6.googleusercontent.com/-2avCDWTrdBc/T9-sv0TTnXI/BEw/Nup54Y16B7Y/s1600/unnamed.png and the other one, which shows the folder list and the items on the folder... https://lh6.googleusercontent.com/-ynOv3lsqGLM/T9-ssnDYVRI/BEo/xqV9tcqPmY4/s1600/unnamed.jpg this layout has more than 2 listactivity, which means the java coding also different... so my question is, if we have to check in main activity, whether the device is tablet or a phone, what's the point then using different res/layout folder like res/layout-small, res/layout-large, res/layout-xlarge, we can just make the different file in the same folder and using coding like this public class MyActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(); Configuration config = getResources().getConfiguration(); if (config.smallestScreenWidthDp = 600) { setContentView(R.layout.main_activity_tablet); */*hier coding for different layout for tablet*/* } else { setContentView(R.layout.main_activity); */*here coding for phone's layout*/* } } please correct me, if i misunderstanding about this... and also... sorry about my english... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Home, Menu, Back, Wallpaper, Play in different languages
I really don't know if these exist, but you can try: String something = context.getString(android.R.string.**); Just see what Eclipse auto-complete gives you. I know there are a few strings that we can dig up. On Thursday, June 14, 2012 4:51:18 PM UTC+8, Peter Webb wrote: My wallpaper contains instructions (in the app, web and Play) which look something like: 'To install the Wallpaper, from the home screen press Menu then Wallpaper then Live Wallpaper then ...' The problem is that in different languages these reserved words like home screen, Menu, Wallpaper and Live Wallpaper are going to need to be particular words in the translation, or else the translation will make as much sense as: To install the wall covering, from the apartment check press Food list then wall covering then Clearly for the instructions to make sense the correct reserved word in that language must be used. Does anybody know the official terms or where to find them in different languages for: Home screen, Home button, Menu button, Back button, Play (market), Wallpaper, Live Wallpaper, Settings, Application, and any other words that are effectively standardised in different languages for Android. Seems like it should be published somewhere by Google but couldn't find it. Peter Webb -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: NullPointerException in onRestoreInstanceState
I cannot divulge the source code as it is for work - however I've done some renaming and stripped it down. However, after stripping it down to just the parts which I suspect cause the bug, and enabling the line that causes the bug, the bug doesn't happen anymore! So this source code is just to give a clue to anyone else who experiences this, as to where to look. This code doesn't actually trigger the bug. onCreate calls showSingleUse, which spawns a SingleUseFragment, which calls onSingleUse in the activity (because it implements an interface called OnFragmentUtilityListener). onSingleUse then calls an AsyncTask which does a findViewById in its onPreExecute. Disabling the findViewById, and moving it to onCreate, solves the problem. *SwiperActivity.java:* import android.os.AsyncTask; import android.os.Build; import android.os.Bundle; import android.support.v4.app.FragmentActivity; import android.widget.TextView; import com.actionbarsherlock.app.SherlockFragmentActivity; public class SwiperActivity extends SherlockFragmentActivity implements OnFragmentUtilityListener { * TextView textviewLastUpdated; // this is how the NPE was fixed* ReloadTask reloadTask; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); * textviewLastUpdated = (TextView) findViewById(R.id.textviewLastUpdated); // this is how the NPE was fixed * showSingleUse(this); } public static void showSingleUse(FragmentActivity activity) { try { if (activity.getSupportFragmentManager().findFragmentByTag(singleusefragment) == null) { activity.getSupportFragmentManager().beginTransaction().add(new SingleUseFragment(), singleusefragment).commit(); } } catch (IllegalStateException e) {} } @Override public void onSingleUse() { startReloadTask(); } private class ReloadTask extends AsyncTaskVoid, Void, Void { @Override protected void onPreExecute() { showLoading(); } @Override protected Void doInBackground(Void... arg0) { return null; } @Override protected void onPostExecute(Void result) { hideLoading(); } } public static boolean allowsExecutorChange() { return Build.VERSION.SDK_INT 10; } void startReloadTask() { reloadTask = new ReloadTask(); if (allowsExecutorChange()) { reloadTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); } else { reloadTask.execute(); } } void showLoading() { // this was causing the NPE! *//TextView textviewLastUpdated = (TextView) findViewById(R.id.textviewLastUpdated);* if (textviewLastUpdated!=null) textviewLastUpdated.setText(Loading...); } void hideLoading() { // this was causing the NPE! *//TextView textviewLastUpdated = (TextView) findViewById(R.id.textviewLastUpdated);* if (textviewLastUpdated!=null) textviewLastUpdated.setText(Loaded!); } @Override public void onDismissedDialog(String tag, Object data) {} @Override public void onClickedPositiveDialog(String tag, Object data) {} } * * *OnFragmentUtilityListener.java:* public interface OnFragmentUtilityListener { public void onDismissedDialog(String tag, Object data); public void onClickedPositiveDialog(String tag, Object data); public void onSingleUse(); } * * *SingleUseFragment.java:* /** hack-ish way to detect rotation and not do it again */ public class SingleUseFragment extends Fragment { boolean wasRotating = false; @Override public void onActivityCreated(Bundle state) { super.onActivityCreated(state); setRetainInstance(true); } static SingleUseFragment newInstance() { return new SingleUseFragment(); } @Override public void onAttach(Activity activity) { super.onAttach(activity); if (!wasRotating) ((OnFragmentUtilityListener) activity).onSingleUse(); } @Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); wasRotating = true; } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: [Android LVL] Sporadic false negatives on client devices
I get this on my own app, also having LVL. Quite embarrassing to try to demonstrate the app to a friend and then it occasionally says that my copy is not licensed - I have purchased it (since it was published using a different account.) On Monday, May 7, 2012 9:07:23 PM UTC+8, Florin wrote: Hello, I have an Android developer account and a couple of paid apps published on the Market since a while now. I have decided to use Android LVL for copy protection from the start on all of my apps, I found it pretty straightforward to use so I told myself why not? extra security is better than no security, right? However, after almost one year since my apps have been out in the wild, I keep getting from time to time unsatisfied customers which after purchasing one app constantly get NOT_LICENSED replies from Android licensing servers. And I'm not talking only about occasional NOT_LICENSED caused either by lack of network coverage etc. but about clients which try for days and days(yes, there are clients like this, and they are right, since they paid for their apps!) and still get NOT_LICENSED. Now, here goes my questions: 1) For Android dev and apps publishers out there: have you noticed any wave of false negatives complaints from your clients lately? The above- mentioned symptom occurs in my case since the beginning, but since 2 weeks now it happens at a much higher frequency. 2) For any Google representative who might see this: are there any kind of License Validation statistics on the Android Licensing server side? Like for instance validation attempts per application, with timestamp and Android Market client version and client ID(not email for security reasons but something)? And with some extra message giving a reason for NOT_LICENSED?(apart the obvious didn't buy reason, could there be others?) I think this should be implemented at LVL level and not at app level due to permissions requirement(an app implementing statistics would definitely require network access which for some apps does not justify). So, can we have access to these statistics? If not now, maybe sometimes in the future? Florin. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Custom UI rotating control
I've written something like this before - you want a few icons arranged in a circle, and each icon is clickable? I created a custom layout, extending the ViewGroup, overriding onMeasure and onLayout. In the Activity I made a listener that implements View.OnTouchListener. It checks if the area which you've touched is within the 'donut' which the icons circle around. I assume you want to click on the icon, if you touch the icon and have not moved more than 10 pixels (Pythagoras distance) when you detect MotionEvent.ACTION_UP. However I have not resumed work on this and it is closed source since it was developed for my employer. I'm not sure how you'd continue animating it when you fling it. On Monday, May 7, 2012 4:51:38 AM UTC+8, Bernie Eng wrote: Does anyone have any ideas on how to create a rotating control? Something that looks like this: http://www.raywenderlich.com/9864/how-to-create-a-rotating-wheel-control-with-uikit I came across 2 blog posts which is pretty close to what I need but, not quite: - http://mindtherobot.com/blog/534/android-ui-making-an-analog-rotary-knob/and - http://mobile.tutsplus.com/tutorials/android/android-sdk-creating-a-rotating-dialer/ The first one doesn't really animate when rotating, and while the second one does animate, it uses one large bitmap and rotates it. Because the control I'm looking for should actually be container for a few buttons (they each need to react to clicks), I can't really use one large bitmap. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: what broadcast or method is called when the application is uninstalled
Even if there was, your app would not be around to delete it. :( You may have to save your files to your context's getExternalFilesDir(null) instead, where it will be deleted together with the app. On Apr 23, 1:19 pm, ANKUR GOEL ankur1...@gmail.com wrote: Hi all , i want to delete some files from file directory folder when my application is uninstalled . so can i know what broadcast or method is called Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Disable screenshot within an app in ICS?
I check the SDK INT to be above 10 before setting the flag. Galaxy Tab 7 ignores it and HTC EVO 3D is garbled. On Apr 4, 8:05 am, Greg miyamo...@gmail.com wrote: So after seeing this work in the wild a bit, it seems like some phones actually corrupt the view when they see this flag. I don't see it as part of the compatibility doc for vendors so I doubt they test it well. On the DroidX, I have seen the screen get drawn totally incorrectly (different per version of Android) and in some Samsung roms the entire window is corrupted. This doesn't seem to be something in the compatibility docs for vendors. Is this just for ICS and forward? It has existed since 1.0 it seems. -Greg On Thursday, January 12, 2012 9:04:15 AM UTC-8, Romain Guy (Google) wrote: Add this flag to your window in onCreate(): http://developer.android.com/reference/android/view/WindowManager.Lay... On Thu, Jan 12, 2012 at 1:48 AM, Michael Banzon mich...@banzon.dk wrote: On Thu, Jan 12, 2012 at 10:13 AM, Tom Uhl tuhl...@gmail.com wrote: Is there a way for an app to disable the new built-in-screenshot function in ICS? I don't think there is. If there is - I'm guessing you're trying to protect something - please keep in mind that the user can also grab screenshots through USB-debugging or through HDMI. -- Michael Banzon http://michaelbanzon.com/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Romain Guy Android framework engineer romain...@android.com On Thursday, January 12, 2012 9:04:15 AM UTC-8, Romain Guy (Google) wrote: Add this flag to your window in onCreate(): http://developer.android.com/reference/android/view/WindowManager.Lay... On Thu, Jan 12, 2012 at 1:48 AM, Michael Banzon mich...@banzon.dk wrote: On Thu, Jan 12, 2012 at 10:13 AM, Tom Uhl tuhl...@gmail.com wrote: Is there a way for an app to disable the new built-in-screenshot function in ICS? I don't think there is. If there is - I'm guessing you're trying to protect something - please keep in mind that the user can also grab screenshots through USB-debugging or through HDMI. -- Michael Banzon http://michaelbanzon.com/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Romain Guy Android framework engineer romain...@android.com On Thursday, January 12, 2012 9:04:15 AM UTC-8, Romain Guy (Google) wrote: Add this flag to your window in onCreate(): http://developer.android.com/reference/android/view/WindowManager.Lay... On Thu, Jan 12, 2012 at 1:48 AM, Michael Banzon mich...@banzon.dk wrote: On Thu, Jan 12, 2012 at 10:13 AM, Tom Uhl tuhl...@gmail.com wrote: Is there a way for an app to disable the new built-in-screenshot function in ICS? I don't think there is. If there is - I'm guessing you're trying to protect something - please keep in mind that the user can also grab screenshots through USB-debugging or through HDMI. -- Michael Banzon http://michaelbanzon.com/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Romain Guy Android framework engineer romain...@android.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Supporting Galaxy Note Issues Due To It Displaying Itself as a LARGE screen layout.
Hmmm I just realized that the Samsung Galaxy Tab 7.0 Plus was released with 3.2 so we can use the -sw qualifier - initially I was thinking great we gotta do the qualifier dance around the 7.0 Plus because the Samsung Galaxy Tab 10.1 I have is still stuck on 3.1 and I thus assumed all Samsung Honeycomb tablets would be at 3.1. I had access to one of those knockoff 800x480 7 Android 2.2 tablets (but it is not with me anymore). I don't remember if it acted like the mdpi device that it should. On Feb 8, 8:33 am, Dianne Hackborn hack...@android.com wrote: On Sun, Feb 5, 2012 at 5:42 AM, albnok alb...@gmail.com wrote: Er... since when could we do that? As far as I know the exact qualifiers only came about in Android 3.2. layout-large-port-xhdpi-1280x800 I am thinking layout-large-port-xhdpi would make sense, though. You should never, ever see a resource qualifier like that. That is, frankly, insane. Also mixing density with screen size almost certainly means you are doing something on. I can guarantee that you that there will be device configurations in the future that break with such things, because density has *nothing* to do with screen size. The first this is please, please read the documentation and my blog post here:http://android-developers.blogspot.com/2011/07/new-tools-for-managing... The blog post includes examples of how to use the new selectors in a compatible way with older devices. Also, yes, the large size bucket is problematic, as the blog post discusses. There isn't anything we can do to help this for older versions of the platform. My suggestion if you need to deal with this is to just fall back on doing it programmatically -- define two layouts that are not qualified by screen size, and when your code runs look at the actual screen size (converted to dp units) and pick the one to use based on that. Or alternatively, just forget about large, code against xlarge and the new -sw qualifier, and make sure your normal layout resizes reasonably when running on a larger screen. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Is this android app possible?
I am not sure if this will do the job, but it looks like it has potential: https://market.android.com/details?id=com.jrummy.liberty.toolboxpro Of course, you'd want to root the device first - so you set it to install your app on boot, and restore the app data for the Launcher, Browser and Contacts. (Though Contacts might be a lesson in futility, since it will sync Contacts later...) On Jan 12, 10:57 am, Yar Lag ya...@hotmail.com wrote: My employer asked me to write an Android app for a demo device in our store front. He wants the app to do the following (essentially a video demo app): The app will show a video after it has been idle for a while. When a user touches the demo video, it stops and goes to home screen. Prevents a user from uninstalling this app. Hide the app from the applications list on the home screen. At each midnight resets the device to a default configuration (home screens, browser history and contacts information) Are these 5 things possible? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: I wanted to develop Android Apps with PDF viewer and PDF editor
qoppaPDF is the library you are looking for. You have the $? Good, they are selling a PDF editor license. :D On Jan 9, 2:24 pm, Rocky rkjhaw1...@gmail.com wrote: thanks to reply, is any free or paid lib is available in market to develop application. I wanted to develop and i'm ready to spend hundred of $, i wanted pdf viewer some thing like RepliGo Readerhttps://market.android.com/details?id=com.cerience.reader.appfeature...(https://market.android.com/details?id=com.cerience.reader.appfeature), not all features only Annotation part of RepliGo. Please help me On Mon, Jan 9, 2012 at 11:32 AM, Kristopher Micinski krismicin...@gmail.com wrote: On Sun, Jan 8, 2012 at 11:56 PM, Rocky rkjhaw1...@gmail.com wrote: Hi Guys, Please help me how to proceed, how can i develop apps with pdf reader and Annotation feature like mark, underline. Don't. Alternatively: find hundreds of thousands of dollars and shell out for a good pdf library for your app. Alternative alternatively: spend a year+ developing a good pdf library for Android or java that doesn't kill it on memory, and then sell it for less than the one that's currently being used. If you don't need a lot of features in your app: fire an intent at a pdf viewer that's installed on the user's phone. If they don't have the app, request the user to download the pdf reader (you can check if they have the pdf reader app installed easily enough, ask again if you dont' know how...) 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 -- Thanks Regards Rakesh Kumar Jha Android Developer, Trainer and Mentor Bangalore (O) +918030274295 (R) +919886336619 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Almost nobody is rating my app.
Man I most certainly don't click Rate, no matter what, I just want to get in the game or whatever app. I guess they have to feel compelled to want to rate it? On Feb 8, 11:44 pm, decastro reis...@gmail.com wrote: I have recently released a game called tangle twister to the market. I have spent a little on admob advertising so now have 650 downloads. But only two people have rated it so far. I wonder if I'm doing something wrong to get so few ratings. At the moment I bring up a prompt for the user to rate after they have run the app at least three times and have just completed a level higher than three (very easy). I only prompt if there is currently an internet connection.There is also a Rate option that appears if the users press the menu button during game play. I guess there are a few possibilities: A) I have a bug in the code which results in me seeing the prompt, but other users not seeing it. B) The wording on the prompt is not encouraging enough. C) People simply don't like the app and never play long enough to get the prompt. D) I have made some market configuration error which results in ratings being lost. E) 2 out of 650 is actually what I should expect for this type of game. F) Something else. Any ideas? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Supporting Galaxy Note Issues Due To It Displaying Itself as a LARGE screen layout.
Er... since when could we do that? As far as I know the exact qualifiers only came about in Android 3.2. layout-large-port-xhdpi-1280x800 I am thinking layout-large-port-xhdpi would make sense, though. I also want to target the Samsung Galaxy Tab 7 specifically, but there isn't a better way besides doing layout-large-hdpi which will sabotage future devices. Meanwhile I would have to say that from an app statistics, these two devices are actually at the top of the installs... and in fact, I doubt there would truly be a layout-large-hdpi device that is anywhere as popular as these two. On Jan 22, 3:31 pm, Doug beafd...@gmail.com wrote: You're right about the Note being stupid. But I'll tell you exactly why it's stupid, because I went through this too. There is a thread in this group if you want to find and follow that. The note is large, which is technically within bounds. Large screen, according to Google documentation, can be between roughly 4 and 7 inches. The docs also say large screens are at least 640dp x 480dp. This is where the Note is stupid. The Note also happens to be xhdpi, which means that its pixels are supposed to be about half the size of the mdpi baseline for calculating dp. So if a large mdpi screen must be at least 640x480, then xhdpi must be at least 1280x960. As you may know, the note is actually 1280x800. This means that it's missing an expected 160 pixels (80dp) on its short edge. If your layouts are (correctly) assuming this space exists, something may go wrong when it comes time to draw. I got around this by having a Very Special layout for the Note. You can target pixels sizes in your resource specifiers like this: layout- large-port-xhdpi-1280x800. Then in your layouts just do what you need to do without the extra space. I took it on good authority that it's a Bad Idea to target dimensions size in resource specifiers, but it's what I had to do to make it work without redesigning a very important screen in my app. Please don't email me for support! Have fun. Doug On Jan 20, 6:05 am, Chris chris.fou...@gmail.com wrote: Thanks I will just exclude , can't find any other stupid devices like the note. Kindle sales are in the 100's per day , not doing all that change for a few Galaxy Note's. It's a shame Google did not sort this mess out on an earlier release , it's becoming a real pain On Jan 20, 1:45 pm, Mark Murphy mmur...@commonsware.com wrote: On Fri, Jan 20, 2012 at 8:40 AM, Chris chris.fou...@gmail.com wrote: I am having issues support the Galaxy Note My app runs on Android 2.1+ , so I can't use the DPI based screen differentiation , and the Galaxy note is 2.3.5 I believe. My app has a normal display size which works great for small/normal , I also have a large display layout that has been working great for 7-10inch tablets like Xoom and Amazon Kindle Fire. However this Galaxy Note has thrown a spanner in the mix. It is displaying itself as a Large , but my display does not fit on the screen. The normal layout looks fine on it. Any ideas how I can make that device use the normal display ? You can't. You need to create a -large set of resources that work well on the Galaxy Note and Kindle Fire. The XOOM can use -xlarge resources, if the revised -large ones do not work well on a 10 screen. at the moment I am tempted to just exclude it from compatible devices - but if there is an elegant workaround it would be better ! Bear in mind that your issue is not strictly one tied to the Galaxy Note. I would expect you to encounter similar problems on similarly-sized devices. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android 4.0 Programming Books:http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: tabs onbackPressed
alert, I am guessing, is static, and when you rotate the device, your activity is destroyed, but alert is kept. You'll probably want to do something like alert.dismiss() in your onDestroy. Then you need to remember to start it up again in onCreate. Though it would be highly recommended to move towards Fragments (with the support library) and use DialogFragments instead - higher learning curve, but a lot less headache. On Feb 2, 3:40 pm, vani reddy vani.reddy.bl...@gmail.com wrote: Hi friends,, Under tabs when onBackPressed i am showing a dialog box, but its throwing the below exception ERROR/WindowManager(979): Activity com.amplyfyme.android.HomeScreen has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@40678fb0 that was originally added here Toast.makeText(getParent(), inside back prss, Toast.LENGTH_SHORT).show(); AlertDialog.Builder builder = new AlertDialog.Builder(getParent()); builder.setMessage(Are you sure you want to exit?) .setCancelable(false) .setPositiveButton(Yes, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { UserProfileActivity.this.finish(); } }) .setNegativeButton(No, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { dialog.cancel(); } }); alert= builder.create(); alert.show(); //line where exception is thrown -- Regards, Vani Reddy -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 Market new app not appearing
Yeah I've submitted the forms on Android Developer Console. Just wondering if anybody else is having this problem where you upload a new app and it just doesn't show up - can't find it in the web market, or on any device. In case you're wondering, the app is: Package Name: com.glaringnotebook.digitechpatchviewer App Name: DigiTech RP255 Patch Viewer All filters are off - heck I don't even require a touchscreen! (Hello GoogleTV!) Only filter is that it's gotta be Android 1.6 and above. This is certainly very weird given how fast the Market would update when I last uploaded an app in 2011... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: DevicePolicyManager LockNow problem
Well it says it's only on API Level 8 so I can't help you there. If you know it works in another app, on Android 2.1 or below, you might try decompiling that app, but I have no experience with that so I can't say whether it is possible to find an undocumented API that works. On Jan 20, 2:35 pm, ashiq sayyad ashiqsay...@gmail.com wrote: Thanks.I will check that. One more is there any way to implement lock on earlier android versions(before 2.2) Thanks Regards. Ashiq Sayyad On 20 January 2012 12:00, albnok alb...@gmail.com wrote: You might have missed something in the implementation - it should cause the Device Administrators window to pop up, and you need to Activate your app as a Device Admin. Then only isAdminActive() will return true. On Jan 18, 2:58 pm, ashiq sayyad ashiqsay...@gmail.com wrote: I have checked the lockNow implementation in API demos tried the same thing in my app. But I am not able to lock the device(Google nexus) Is there any restriction on this API call for thrid party application? isAdminActive() method is returning me false... One more doubt,how to implement screen lock functionality for below 2.3 devices as there in no direct APIS for tat.. Awaiting for help Thanks Regards, Ashiq Sayyad -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: DevicePolicyManager LockNow problem
You might have missed something in the implementation - it should cause the Device Administrators window to pop up, and you need to Activate your app as a Device Admin. Then only isAdminActive() will return true. On Jan 18, 2:58 pm, ashiq sayyad ashiqsay...@gmail.com wrote: I have checked the lockNow implementation in API demos tried the same thing in my app. But I am not able to lock the device(Google nexus) Is there any restriction on this API call for thrid party application? isAdminActive() method is returning me false... One more doubt,how to implement screen lock functionality for below 2.3 devices as there in no direct APIS for tat.. Awaiting for help Thanks Regards, Ashiq Sayyad -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: search hardware button
Interestingly, Android SDK 14/version 4.0 introduced: http://developer.android.com/reference/android/view/ViewConfiguration.html#hasPermanentMenuKey%28%29 I discovered this with a leaked Google+ 2.0 app that would crash on loading Chord with a Class. However, the Home, Back and Search buttons don't get such APIs. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: back,edit button ActionBar
This adds a little left arrow to the side of the icon in the ActionBar: actionBar.setDisplayHomeAsUpEnabled(true); This should have the same style as the Gmail app - Settings page. On Oct 27, 10:22 pm, jaggu mjagadeeshb...@gmail.com wrote: i want screen like second actionbar in down i have tabhost also in the same screen can any one guide for this On Thu, Oct 27, 2011 at 4:11 PM, Ratheesh Valamchuzhy android...@gmail.comwrote: u want the screen something like this? while selecting each tab u need to display the activity [image: 3.png] 3.png 18KViewDownload images.png 2KViewDownload actionbar.png 3KViewDownload -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Settings.Secure.ANDROID_ID not unique on DROID2?
Quite simply, one could combine the ANDROID_ID and IMEI as a single string, comma-delimited and use that as a unique identifier. You might get 0123456789ABCDEF,null for a prototype tablet though. This assumes that all WiFi-only devices have unique ANDROID_IDs and all phones have unique IMEIs. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Install an android app on Google TV
If you meant the Google TV emulator, well that only runs on Linux with a KVM for now. On Oct 15, 2:01 am, dillipk codersnet2...@gmail.com wrote: Hello, How do I install my app on Google TV.? It is written android 2.3 SDK. My System Config: Windows XP Pro Ecplise SDK Platform Android 3.2 API 13, revision 1 Interestingly, I am not able to install Google TV add-on on my PC. AVD manager saying Some packages were found but are not compatible updates. Please help. Thanks, DK -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Why dither a bitmap
If you're loading a very large bitmap and you want to show it on a phone with small heap space e.g. 16MB or 24MB, you may want to change the bitmap to 16 bit, RGB_565. Then you'll realize that gradients look stair-stepped. So when you enable dithering, it breaks the obvious stair-steps and makes it look like a smoother gradient. On Oct 10, 1:00 pm, dara kok mrpc.cambo...@gmail.com wrote: Can somebody here explain me why dithering is needed in Android? Thanks dara kok -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Target to one device in market
You don't - if you want to filter a device you do it when you upload your app and change its visibility settings in the Android Market. On Oct 5, 2:53 am, franzisco2011 franzisco2...@gmail.com wrote: What I must modify in my manifest to target only a device? For example only for Nexus S or samsung galaxy tab -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 does edit box(EditText) receive user's input?
When you click the Submit button, get the string via the EditText's getText().toString(). On Oct 2, 10:26 am, matt dw blackworl...@gmail.com wrote: hi all, I has read the related source codes about edit box(EditText.java and TextView.java). But i didn't understand how edit box get user's input. it is transfered by message? or function setText directly be invoke somewhere? so can anyone give me a hint? or explain it? Thanks very much. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android Honeycomb CheckBox against white background cannot be seen
Ah, it was this! We were using ActionBarSherlock. public class SettingsActivity extends FragmentActivity { @Override protected void onCreate(Bundle savedInstanceState) { setTheme(R.style.Theme_Sherlock); I then used Theme_Sherlock_Light and the checkbox appeared correctly. Though now the ActionBar is white... which looks odd since we were used to a black-bar ActionBar. Would there be a way to separately theme the ActionBar or checkbox? I can't get at git.kernel.org and even if I could, Honeycomb source isn't out. On Sep 20, 6:47 pm, Mark Murphy mmur...@commonsware.com wrote: If SettingsActivity inherits from PreferenceActivity, there might be something else needed there. I seem to recall there being issues with theming the Honeycomb PreferenceActivity, though I do not remember what those issues might be off the top o' my head. On Mon, Sep 19, 2011 at 11:10 PM, albnok alb...@gmail.com wrote: I tried this, but for some reason the theme only applies to LoginActivity but not SettingsActivity: application android:icon=@drawable/icon android:label=@string/ app_name android:theme=@android:style/Theme.Holo.Light android:name=Test activity android:name=.LoginActivity android:screenOrientation=portrait intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity activity android:name=.SettingsActivity android:screenOrientation=portrait android:theme=@android:style/ Theme.Holo.Light intent-filter action android:name=android.intent.action.VIEW / /intent-filter /activity /application (Part before and after application tags removed.) On Sep 19, 6:33 pm, Mark Murphy mmur...@commonsware.com wrote: Theme.Holo.Light is usually applied to an activity in the manifest, to affect the whole activity, not an individual CheckBox in a layout. On Mon, Sep 19, 2011 at 12:47 AM, albnok alb...@gmail.com wrote: I am putting a CheckBox against a white background. It looks fine on pre-Honeycomb devices but on Honeycomb, it seems that the graphic has partial transparency and is white, so when the checkbox is unticked, you cannot see it. I tried using the Theme.Holo.Light style as follows: CheckBox android:text= style=@android:style/Theme.Holo.Light android:layout_marginLeft=5dip android:id=@+id/checkBoxWifiOnly android:layout_width=wrap_content android:layout_height=wrap_content / This appears to have no effect. Am I typing the syntax wrongly? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android 3.1 Programming Books:http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training in NYC:http://marakana.com/training/android/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android Honeycomb CheckBox against white background cannot be seen
I tried this, but for some reason the theme only applies to LoginActivity but not SettingsActivity: application android:icon=@drawable/icon android:label=@string/ app_name android:theme=@android:style/Theme.Holo.Light android:name=Test activity android:name=.LoginActivity android:screenOrientation=portrait intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity activity android:name=.SettingsActivity android:screenOrientation=portrait android:theme=@android:style/ Theme.Holo.Light intent-filter action android:name=android.intent.action.VIEW / /intent-filter /activity /application (Part before and after application tags removed.) On Sep 19, 6:33 pm, Mark Murphy mmur...@commonsware.com wrote: Theme.Holo.Light is usually applied to an activity in the manifest, to affect the whole activity, not an individual CheckBox in a layout. On Mon, Sep 19, 2011 at 12:47 AM, albnok alb...@gmail.com wrote: I am putting a CheckBox against a white background. It looks fine on pre-Honeycomb devices but on Honeycomb, it seems that the graphic has partial transparency and is white, so when the checkbox is unticked, you cannot see it. I tried using the Theme.Holo.Light style as follows: CheckBox android:text= style=@android:style/Theme.Holo.Light android:layout_marginLeft=5dip android:id=@+id/checkBoxWifiOnly android:layout_width=wrap_content android:layout_height=wrap_content / This appears to have no effect. Am I typing the syntax wrongly? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android 3.1 Programming Books:http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 Honeycomb CheckBox against white background cannot be seen
I am putting a CheckBox against a white background. It looks fine on pre-Honeycomb devices but on Honeycomb, it seems that the graphic has partial transparency and is white, so when the checkbox is unticked, you cannot see it. I tried using the Theme.Holo.Light style as follows: CheckBox android:text= style=@android:style/Theme.Holo.Light android:layout_marginLeft=5dip android:id=@+id/checkBoxWifiOnly android:layout_width=wrap_content android:layout_height=wrap_content / This appears to have no effect. Am I typing the syntax wrongly? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 2.3.5 device cannot find my app
appel, could you try now? Copy-protection has been removed. I am curious though, why a 2.3.4 device is not a developer device, but the 2.3.5 device is... my 2.3.4 is rooted and I have no problems finding it. Venugopal, start your own topic, and stop spamming every other thread. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 obtain the tweets of a programatically given Twitter user without registering my app on dev.twitter.com?
You should get a new key for each app. Anyway the process of asking isn't that hard once you've done it. That said you don't need any keys to use the Twitter Search API that I mentioned earlier. On Sep 8, 3:38 pm, saex elpablos...@gmail.com wrote: You can use the same key secret key in a lot of apps? or you have to get a new key for each app? On 8 sep, 01:49, albnok alb...@gmail.com wrote: It is very much possible to get tweets from a user without logging in, provided that user did not set tweets to private. https://dev.twitter.com/docs/api/1/get/search Heck, you can search from a hashtag, even! You can choose to have Twitter give you the tweets in JSON or XML. JSON's a bit easier for me. No worries about parsing HTML whatsoever. Also, don't worry about registering your app - they just ask you to email. For some reason this is a BIG HURDLE to all the programmers I talked to! I just emailed, and the Twitter representative was very helpful. I got my XAuth key sorted in about 3 days. Of course, you must justify why you need it... On Sep 8, 1:46 am, saex elpablos...@gmail.com wrote: Hi i need to achieve that, show the last tweets of a programatically given user. But i need to do it without login on twitter, without using Oauth, and without registering my app on dev.twitter.com It is possible? i can't find the way to do it :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] Re: Android 2.3.5 device cannot find my app
I have CM 7.1.0 RC1 for the HTC Desire, but mine says 2.3.4. As I remember when I flashed it, 2.3.5 was unheard of then. I hope it's not too much trouble, but could you go to http://www.google.com/support/androidmarket/bin/request.py?contact_type=market_phone and send a report? I did it once and they replied within one day (surprise!) with the reason why it cannot see the app. Also based on http://www.google.com/support/androidmarket/developer/bin/static.py?page=known_issues.cs it says developer phones cannot access copy-protected apps. Is the ROM a developer ROM? If it is, you should not be able to find paid apps either. On Sep 7, 4:58 pm, appel johan.appelg...@gmail.com wrote: I have an old HTC Hero with a custom rom based on CM 7.1 RC1 (2.3.5) and Android Market says your app is not compatible with it. The message isn't very helpful though. This item is not compatible with your device. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How can I connect Dell Streak 7, eLocity devices to my DDMS
Did you enable USB Debugging, on your Dell Streak 7 and eLocity? On Sep 6, 10:08 pm, Srinivas Nainala srito...@gmail.com wrote: Hi All, I am unable to connect/detect Dell Streak 7 and eLocity devices to my eclipse DDMS interface for seeing debug statements. How can I get rid of this. Even I have tried in Mac Notebook, its same situation in Windows 7. Could you suggest me what are the USB device drivers need to install for detecting those devices. Is there any way getting debug statements other than DDMS tool. Thanks in advance for your help :) Cheers Srinivas -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 obtain the tweets of a programatically given Twitter user without registering my app on dev.twitter.com?
It is very much possible to get tweets from a user without logging in, provided that user did not set tweets to private. https://dev.twitter.com/docs/api/1/get/search Heck, you can search from a hashtag, even! You can choose to have Twitter give you the tweets in JSON or XML. JSON's a bit easier for me. No worries about parsing HTML whatsoever. Also, don't worry about registering your app - they just ask you to email. For some reason this is a BIG HURDLE to all the programmers I talked to! I just emailed, and the Twitter representative was very helpful. I got my XAuth key sorted in about 3 days. Of course, you must justify why you need it... On Sep 8, 1:46 am, saex elpablos...@gmail.com wrote: Hi i need to achieve that, show the last tweets of a programatically given user. But i need to do it without login on twitter, without using Oauth, and without registering my app on dev.twitter.com It is possible? i can't find the way to do it :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 2.3.5 device cannot find my app
I have received a complaint that a device that was on 2.3.3, now on 2.3.5, cannot find my app on the phone Market, and on the web Market, it says it is incompatible. The app is here: https://market.android.com/details?id=com.measat.astro.epg The app is set to support small-xlarge so that shouldn't be a problem; the app minSDK is 3 with no maxSDK set so it's API 3-12+; the app requires INTERNET but it appears on WiFi-only devices fine; the app asks for a touchscreen but I'll just assume the user isn't trying on a Google TV. The app has Copy Protection set to On - could that be why? This is the client's setting. Also, out of curiosity, is 2.3.5 official? I don't see it anywhere in developer.android.com, only in ROMs. Is an unfinalized OS version blocked from certain apps? I could update to a CyanogenMod nightly on 2.3.5 but I'm quite comfy with CyanogenMod 7.1.0 RC1 on my HTC Desire - plus I don't want the risk that I can't find certain apps. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Emulator has Alzheimers (forgets who it is)
This is why: [2011-07-26 22:28:10 - YeauxDudimus] Still no compatible AVDs with target 'Android 3.2': Aborting launch. [2011-07-26 22:28:10 - YeauxDudimus] Performing com.bobas.YeauxDudimusActivity activity launch [2011-07-26 22:28:34 - YeauxDudimus] ERROR: Application requires API version 13. Device API version is 7 (Android 2.1-update1). [2011-07-26 22:28:34 - YeauxDudimus] Launch canceled! Your AVD is on Android 2.1, while your app requires Android 3.2. Change it so your app min-sdk is API 7. Or start an AVD that is at Android 3.2 (which would be helluva slow - all Honeycomb AVDs are slow.) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Get digit mobile number
You can get it from some operators - Google Line1Number. I do know though, that some Mobile Virtual Network Operators don't let you see your MSISDN, and you have to ask them for an API to convert IMSI to MSISDN. On Jul 29, 3:42 pm, Amit Mangal forum.amit.man...@gmail.com wrote: Mobile number calculated on network side not on handset. you can get your sim number IMSI but you cant get mobile number by any api. thanks On Fri, Jul 29, 2011 at 1:00 PM, subha subhashini.andr...@gmail.com wrote: Hi Developers! How to get mobile number through the android application(which one is used that app); this is possible? Thanks, Subha -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Android Library and Resources
Pass your drawable ids from the calling Activity in the app to the function in the library. On Jul 7, 3:56 pm, Guillaume guillaume.dele...@gmail.com wrote: On Jul 6, 5:36 pm, David Olsson zooklu...@gmail.com wrote: Clean, refresh more times and test by creating a new copy of the workspace. I have run into this problem several times, TheKing's solution works most of the time but the latest time this happened to me I had to create a new project and then it worked like a charm. I already have done all of that. But I found out that it's an incompatibility problem between the resources. Using the library from another application works. Hard coding library's xml values resolve the problem. But I don't have any idea of why it's incompatible. Thanks for your help. Guillaume Regards, David On Wed, Jul 6, 2011 at 4:47 PM, Guillaume guillaume.dele...@gmail.com wrote: Thanks but I wouldn't have post here if it had worked. Other idea ? Why are the R.java merged into the same file ? On Jul 5, 7:23 pm, TreKing treking...@gmail.com wrote: On Tue, Jul 5, 2011 at 7:55 AM, Guillaume guillaume.dele...@gmail.comwrote: Please offer any ideas you might have to help! Clean, refresh, and rebuild both projects ... several times. --- -- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Film Use of Android Device
You may be better off recording from PC and emulator. But then Honeycomb is slow! On Jul 26, 7:32 pm, New Developer secur...@isscp.com wrote: could you please give me more of a help my knowledge and use of adb is weak Thanks in advance On Jul 25, 2011, at 11:23 PM, Kevin TeslaCoil Software wrote: The adb user also has access to /dev/graphics/fb0 so theoretically you could do this with a shell script over adb instead of rooting the device. On Jul 25, 5:47 pm, lbendlin l...@bendlin.us wrote: If you have a rooted phone and a large SD card you could run a background service that grabs the /dev/graphics/fb0 raw images and stores them for later conversion. Or you convert it on the fly to png - but that might stretch it already. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: can we detect tablets and mobiles in android programmaticaly.
Check that the screen layout is large or xlarge. Supports screens in the manifest helps filter apps. On Aug 3, 12:24 am, arun joshi arun.joshi2...@gmail.com wrote: hello all, i am working on a project in which i had to detect the type of device whether it is of type mobile or tablets which will avail this application. How can do this, any ideas or help are welcome. Thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to know what internal process runs an application
I don't know how Services work, but with IntentService you can send an intent that says hey I'm launching the IntentService from an Activity! and catch it in onHandleIntent or onStartCommand. On Jul 19, 2:19 am, elDoudou the.edouard.merc...@gmail.com wrote: Thank you Diane. I may have a problem with my design, but if I'm wrong, I'd be delighted to be well guided. I would like my application to initialize a certain way when it is started with an Activity (for instance, I want to set up some caching stuff), whereas when launched via a Service, I do not need it to be initialized that way. The solution that I have found so far is to override the Application.onCreate() method, so as to be notified every time the application process starts, and quick-initialize some stuff. I have declared two android:processes because I thought that it might be possible to distinguish the cause of the application process start, but if you say that it is not possible to determine the android:process responsible for the start of the process, how can I solve my problem, please? Do you have in mind another design pattern which enables the application to be notified at startup, whatever Activity, BroadcastReceiver, Service causes its process to start so as to initialize some stuff, and to distinguish a specific Service where no initialization is supposed to be run, please? I would be very grateful to the person who is able to unblock me. And please, do not tell me that I have a design problem eventually ;) Regards, Édouard On 14 juil, 20:05, Dianne Hackborn hack...@android.com wrote: Sorry, there is no way to know. Processes are basically anonymous containers in which to run code. If you are needing to distinguish them, you have a problem in your design. On Tue, Jul 12, 2011 at 1:43 AM, elDoudou the.edouard.merc...@gmail.comwrote: Hello Doug and thank you. The process id does not indicate the Android declared process in the AndroidManifest.xml file, unfortunately. What I need to know is the android:process which causes the process to start. If I declare a service in the manifest with a specific process name (tag android:process), how do I know at runtime when this specific service process causes the Application::onCreate() method to be invoked, please? Thank you for your time and support. Regards, Édouard -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Issues with 3.2
Heck, replying to any Google Group posting will cause my Xoom WiFi 3.0.1 browser to Force Close. It does get posted, though. Now I am not sure if 3.2 is going to be worth the risk to update. On Jul 22, 8:52 am, Zsolt Vasvari zvasv...@gmail.com wrote: I've seen some weird stuff with 3.2 on my Xoom as well. Certain websites (Techcrunch) will just simply stop the browser when scrolling down on the page. I've never seen this happen on 3.1 On Jul 21, 10:20 pm, Joshua Smith joshuaesm...@charter.net wrote: We're getting an app ready for Android, and we've just hit a complete show-stopper with the 3.2 update. Our app runs for about a minute, and then the XOOM just reboots. There is absolutely no evidence that we can find in any log as to what the problem is. The same app is running just fine in 3.1 and 2.x. Our app uses several simultaneous HTTP connections to stream content from a server, so we are using the whole network stack pretty vigorously. We've noticed that during that minute before the tablet reboots, the performance of our network connections is a lot worse in 3.1, which is why we're thinking it's probably a network issue. We're at a loss on how to debug this further. We'd be happy to send an APK to someone who works on the kernel, if that could help. Help? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Getting Developer Account
Call your bank. My company had the same problem with 2 accounts under a certain bank in Malaysia (my bank had no problem.) On Jul 19, 6:27 pm, Manjunath KB kb4andr...@gmail.com wrote: Can an indian developer get developer account??? Because i place my card and is authenticated 24hour back in checkout. But still the payment is not done and am not getting access to my developer account. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: If nobody uses any license verification on paid apps .....
Google posts the LVL code. Crackers post code to circumvent LVL. It is up to you then to use the cracker tool to make sure that your protection is unique and secret, and not known to the cracker. Same goes for testing your app with APKTool. You simply cannot rely on the last 'public release' and use it like that because the code is there for all to see. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Amazon AWS security
Look for APKTool, and decompile your code. I cannot and should not tell you how to obfuscate it (in public) because then it means hackers are aware of your algorithm. Any hacker can then Google how to find keys, and find code here! So you need to make an algorithm to obfuscate the key, and NOT tell anyone of it. APKTool is already shared... so in a way, they are letting you be one step ahead of them. On Jul 19, 5:39 pm, dmtrl...@gmail.com dmtrl...@gmail.com wrote: Hi all! My app have access to Amazon AWS, and i have one question. I think store keys in code is bad idea. What the best way to save credentials for Amazon access in APK ? Any example, plz... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 find the load time of UI
Print to the log before and after your UI is drawn. On Jul 15, 5:10 pm, sreenivas p m sreenivas...@gmail.com wrote: Hi, i want to know time taken to load UI / activity on to UI Thank you... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: I want to design a video file player, which takes in file name first and then play the video, I am not sure how can I use setcontentview to do this,pls help!
This Google Groups site is strangely missing a +1 button. On Jul 1, 9:16 am, Zsolt Vasvari zvasv...@gmail.com wrote: Hey, I am in Singapore, too. What company do you work for? Maybe they are looking for a competent developer. On Jul 1, 8:57 am, Jiabin Qin jiab...@gmail.com wrote: I this in the onCreate(), I need to first setContentView(R.layout.main); to take input from user, but what shall I do after that. I have a button which I think I can use setOnClickListener() to switch to another view onclick, I think that what most apps do like in the game, click on the button start, and the game will start. How shall I achieve? Thanks in advance for your kind help! Jiabin singapore -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Install % not updating?
I've reported it from 3 publisher accounts already. Let's crank up the heat on them - I'm hoping they have a priority list based on complaints. On Jun 30, 7:36 am, William Ferguson william.ferguson...@gmail.com wrote: Thanks for the link Michael. It's been demoralizing seeing my active install percentage fall by 18% in the last 10 days. If I didn't have 3rd party indicators to tell me otherwise it would have been devastating. Here's hoping things get back to normal sometime soon. On Jun 29, 5:20 pm, Michael Schollmeyer mich...@mictale.com wrote: Anyway, the email contains a link and I would encourage everybody to click open the sections and click on report for every issue that applies. Hopefully they get these counters right this time. Here is the link: https://www.google.com/support/androidmarket/developer/bin/static.py?... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 application blocked by Market for Motorola Xoom
On a Motorola Xoom WiFi. I am allowed to install it according to the web Market. On Jun 27, 11:39 pm, Carlos Silva r3...@r3pek.org wrote: On Mon, Jun 27, 2011 at 13:06, Carlos Silva r3...@r3pek.org wrote: On Mon, Jun 27, 2011 at 12:06, Mark Murphy mmur...@commonsware.comwrote: On Mon, Jun 27, 2011 at 7:58 AM, Carlos Silva r3...@r3pek.org wrote: Maybe it's this two permissions that messes the Xoom Wifi Only: android.permission.ACCESS_NETWORK_STATE android.permission.CHANGE_NETWORK_STATE I can't install it on my Xoom either. My XOOM is 3G capable, so there may be differences in behavior due to that. However, the OP has telephony set to not-required, and the _NETWORK_STATE permissions aren't listed in the table of things that trigger the need for hardware features. True, any way, it's the only thing I can see that it makes it filter the app. Maybe someone from Android Market team could tell us what the problem really is :/ Just to add another test, an Asus Transformer Wifi isn't compatible also. I think it's safe to assume that the problem is that 2 permissions... (*think*) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Error Overriding a SuperClass
One of my projects suddenly changed to JDK Compliance Level 1.5 without me ever setting it. I think I may have checked it out of SVN wrongly. Went in to Project Properties, Java Compiler to fix it. On Jun 23, 8:31 am, Mark Murphy mmur...@commonsware.com wrote: OnClickListener is an interface. If you are compiling with Java 1.5, you cannot use @Override on implementations of interface methods. That was added in Java 6. On Mon, Jun 20, 2011 at 9:01 PM, Kromosome m...@kromosome.net wrote: I am having to modify some code from another developer's codebase and his coding style is totally different to mine. Take the following for instance, instead of having a single onClick handler for all views, the developer has implemented the onClick function inline for each event. In the Eclipse IDE, I am getting the following error, The method onClick(View) of type new View.OnClickListener(){} must override a superclass method. If I look to the quick fix it tells me to, Remove the @Override annotation, however when doing so, the error is corrected. This seems to be the reverse of my understanding in that the superclass must be overriden. Has anyone seen or encountered this previously? Any suggestions? Would it have something to do with the fact that the superclass method is overrided multiple times in a similar manner? code llSelDOB.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { StringDOB = new String(); Calendar c = Calendar.getInstance(); int cyear = c.get(Calendar.YEAR); int cmonth = c.get(Calendar.MONTH); int cday = c.get(Calendar.DAY_OF_MONTH); DatePickerDialog dp = new DatePickerDialog(Registration.this, mDateSetListener, cyear, cmonth, cday); dp.show(); } /code -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training in London:http://bit.ly/smand1,http://bit.ly/smand2 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Permissions, checking network connectivity and the LVL
Another interesting false positive happens when you connect to a VPN or a dead hotspot which cannot resolve the LVL server - dontAllow gets called so you're not licensed if you are just behind a bad connection. Adding a dontAllowBadConnection in the interface helps. On Jun 23, 12:17 pm, Chris crehb...@gmail.com wrote: If the Market App(tm) has NETWORK_STATE permissions, and my app invokes an API that uses it, it stands to reason that my app shouldn't have to request NETWORK_STATE. After all, the user already granted permission to the other app. I haven't yet used LVL but if I came across that scenario I'd file a bug -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: What are the Android devices have USB socket/port support in the market?
The Acer Iconia Tab A500 has one full Type A USB slot built-in on the tablet itself. The Asus eee Pad Transformer has 2 on the keyboard dock. On Jun 23, 3:42 am, Nainala Shrinivas srito...@gmail.com wrote: Could anyone help me to find out USB port support android devices in the Market. I have seen some document, USB host is not available for android sdk till now. USB device has to be self powered, when we can see Android has USB host capability? I have seen macro USB on devices, is there any device with USB A-Type support in the market. We are looking for Honeycomb 3.x devices. Thanks in advance. BR Srinivas -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: What are the Android devices have USB socket/port support in the market?
Acer Iconia Tab A500 on tablet itself, Asus eee Pad Transformer has 2 on the keyboard dock. On Jun 23, 3:42 am, Nainala Shrinivas srito...@gmail.com wrote: Could anyone help me to find out USB port support android devices in the Market. I have seen some document, USB host is not available for android sdk till now. USB device has to be self powered, when we can see Android has USB host capability? I have seen macro USB on devices, is there any device with USB A-Type support in the market. We are looking for Honeycomb 3.x devices. Thanks in advance. BR Srinivas -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 android get MSISDN
Don't remember exact code but look for line1number. Certain telcos may be mobile virtual network operators meaning you can never get the MSISDN in which case ask them for an API to convert SIM serial number to MSISDN. On Jun 18, 12:29 am, Sherif Shehab Aldin silentqu...@gmail.com wrote: Hi all, I am doing a project of mine, and I wanted to get the MSISDN of the SIM cards, and I thought I would follow the Android code to see how It handles It. I been following the code for hours till I reached this point: com.android.internal.telephony.gsm.SIMRecords.handleMessage(Message msg) and now am stuck cause I have no clue who calls handleMessage, or as I think It's an event which is fired after getting the MSISDN. but I have no clue where to go from here. I have asked on #android-developers and someone told me that Android doesn't do It, the Vendor code implements the baseband functions, If so does anyone of open source implementation of such a thing, or even have an idea how that could be implemented, I just need some hints or ideas which I will implement myself. Thanks all, :) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Why IoException will arise while parsing an rss.xml file using domparsing?
Most likely you have not added the INTERNET permission or your URL is broken. On Jun 7, 6:09 pm, rajeswari polani rajipol...@gmail.com wrote: hi I am parsing a rss.xml file using dom parsing in android while parsing a Document using a inputstream of that url getting a IOException .Why This problem is coming ?Is there any Suggessions .Please reply me it is urgent. Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Want to capture screenshot of current screen from phone
The Samsung Galaxy Tab 7 does support screenshots, albeit unelegantly - while holding down Back, press Power. You may have to go into another activity first before pressing Back and hitting Power at the same time LOL. On Jun 9, 2:07 am, Adam Ratana adam.rat...@gmail.com wrote: I just checked this approach out as a user had emailed me asking about screenshot capability. This definitely does the trick, but a another poster pointed out, any output from certain components (in my case the camera preview surfaceview) does not show up. Perhaps the correct approach then is to capture the output of the surface views as bitmaps, and then draw on top of them, it's not quite an instant screenshot, but will probably serve the purpose? I'll experiment with this and if I have good results will post back. Mark Murphy, you said this is impossible, did you mean in the sense of the way DDMS grabs the full-monty screenshot? I do hope that Android Handset/Tablet manufacturers catch on and implement hardware screen capturing options, a la iOS -- I don't believe screenshots are programmatically possible there either, for the same reasons, but the user can capture one at any time with a combination of hardware buttons. It will prevent us from having to come up with adhoc solutions like this, and allow the screenshot process to be user driven, and thus alleviating security concerns. I believe I read that either Samsung or Motorola may do this in future handsets? On Friday, June 3, 2011 8:30:10 AM UTC-4, New Developer wrote: Well after much trial and error I managed to capture the entire layout or activity using the following code View myView = findViewById(R.id.form); Bitmap bmp = Bitmap.createBitmap( myView.getMeasuredWidth() , myView.getMeasuredHeight() , Config.ARGB_); Canvas canvas = new Canvas(bmp); myView.draw(canvas); try { FileOutputStream out = new FileOutputStream( /sdcard/screen.jpg ); bmp.compress(Bitmap.CompressFormat.JPEG, 100, out); out.flush(); out.close(); } catch (Exception e) { e.printStackTrace(); } Not sure if this will help or not ? NOTE: that you can also save as a PNG if you want . On Jun 3, 2011, at 8:11 AM, Bharathi raja wrote: Hi, Thanks for sharing code. Code u shared will capture the entire screen, even if it is not widget component. [mean screen may have android or flash or web component] i wanted to capture all the three. Regards, Bharathiraja R On Fri, Jun 3, 2011 at 1:39 AM, New Developer secu...@isscp.com wrote: Okay I output my bitmap to file as PNG and it only shows the visible portion of the layout What is currently seen on the screen not the entire layout. So would I change the onClick Code to capture the entire layout ? thanks in advance On Jun 2, 3:35 pm, New Developer secu...@isscp.com wrote: I'm trying to do something similar Inside my button's OnClick I have View myView = arg0.getRootView(); myView.setDrawingCacheEnabled( true ); mPDF.addImage( myView.getDrawingCache() ); I'm hoping this will capture the screen to a bitmap my PDF.addImage is as follows: public void addImage(Bitmap bmp) { ByteArrayOutputStream bos = new ByteArrayOutputStream(); bmp.compress(CompressFormat.JPEG, 100 , bos); mImage += 5 0 obj \n + /Type /XObject\n + /Subtype /Image\n + /Width + bmp.getWidth() + \n + /Height + bmp.getHeight() + \n + /ColorSpace /DeviceRGB\n + /BitsPerComponent 8\n + /Length + bos.size() + \n + /Filter /ASCIIHexDecode\n + \n\n + stream\n; mImage += bos.toString() + \n; mImage += endstream\n + endobj\n\n; } 1) Is the onClick the correct way to capture the screen to bitmap ? 2) Is the PDF code the correct way to store an image inside a PDF ? thanks in advance On Jun 2, 3:11 pm, Paul Turchenko paul.tu...@gmail.com wrote: Your process will need permission to do that. ADB has it by default, but regular apps don't. Unless you're rooted, you can't do that. On Jun 2, 4:27 am, Bharathiraja R bharathira...@gmail.com wrote: Hi All, Want sample code to capture screenshot of current screen from phone, same like ddms (screen capture). Please help me out. Regards, Bharathiraja R -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to
[android-developers] Re: Loading Bitmaps in native heap
I had the same problem when loading as ARGB_565. Use inDither to get rid of very obvious stair-stepping. I would say I could spot a 16-bit image, especially with a lot of reds, on a less red screen (Xoom and Acer Iconia Tab A500) while the Galaxy Tab 7 is a whole splotch of red. However with inDither on gets a bit hard to tell! On Jun 9, 4:50 am, webmonkey webmonke...@gmail.com wrote: That works but I don't consider 16-bit to be full-resolution, color fidelity is just as important. On Jun 8, 10:25 pm, Streets Of Boston flyingdutc...@gmail.com wrote: I guess it's playing nice to other background apps. Even a foreground app can't gobble up all the memory and starve the background apps. I figured out a way to edit 9MPixel images 16-bit (i.e. 18MByte of data). It makes you program quite carefully when using the left over 6Mbyte of memory, but it's possible. On tablets, i think that the limit has been raised to a 48MByte heap. Since the 1st gen android phones never had cameras with more than 5MPixel and 2nd gen android phones never had cameras with more than 8MPixel, it worked out for my app. But if images are side-loaded (e.g. from a sd-card or downloaded from the web), which could be larger than 5 or 9 MPixel, then my app would fail to handle these. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Dialog with no Activity?
It plainly looks like it loads an activity that, seeing the intent passed, loads the dialog or possibly another activity with a translucent theme. On Jun 9, 4:35 pm, jtomasko j...@tomasko.net wrote: On the xoom tablet (3.1), after selecting a notification of a google calendar event, a dialog box (as far as I can tell) opens center screen with options to view the calendar event or dismiss it. According to my interpetation of the Andriod Dev docs, a dialog needs to be activated from an activity, so how is the Google calendar doing this? Even if the calendar is not open (such as just showing the desktop), the dialog still shows up. I need to do the same... show a dialog from a notification. Any ideas on how the Google calendar made that happen? Thanks, Jim -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 not compatable with my XOOM
I can install your app from web market as well as Honeycomb market from unrooted Motorola Zoom WiFi in Malaysia. On Jun 7, 8:43 am, Alchemy alchemyw...@gmail.com wrote: I am the developer for the following market apps. For some reason, these apps are not compatible with the XOOM. I can deploy debug versions, and side load the apk just fine on my wifi XOOM. When I go into the developer console for the app, it shows my app as being compatable with the XOOM. However when you try to access the app from the market on a xoom it will not download as it says it is not compatable with the device. Here is my manifest file Here is the market link to the app.https://market.android.com/details?id=com.pragmaticpat.playroomhdfree... I have tried different settings for SDK, screen size, folders etc... I don't understand why the developer console says it is compatable, the app runs on my xoom sideloaded but the market won't let me even download it. ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=com.pragmaticpat.playroomhdfree android:versionCode=14 android:versionName=1.94 uses-sdk android:minSdkVersion=11 android:targetSdkVersion=12/ uses-permission android:name=android.permission.INTERNET/ uses-permission android:name=android.permission.ACCESS_NETWORK_STATE/ application android:icon=@drawable/playroom_icon android:label=PlayRoom HD Free android:debuggable=false android:name=com.pragmaticpat.playroom.library.GlobalState activity android:name=com.pragmaticpat.playroom.library.GameStartUp android:launchMode=singleTop android:screenOrientation=landscape android:theme=@style/Theme.FullScreen intent-filter action android:name=android.intent.action.MAIN/ category android:name=android.intent.category.LAUNCHER/ /intent-filter /activity activity android:name=com.pragmaticpat.playroom.library.WordMatch android:screenOrientation=landscape/ activity android:name=com.pragmaticpat.playroom.library.Menu android:screenOrientation=landscape/ activity android:name=com.pragmaticpat.playroom.library.Spell android:screenOrientation=landscape/ activity android:name=com.pragmaticpat.playroom.library.BiggerNumber android:screenOrientation=landscape/ activity android:name=com.pragmaticpat.playroom.library.CountChange android:screenOrientation=landscape/ activity android:name=com.pragmaticpat.playroom.library.TellTime android:screenOrientation=landscape/ activity android:name=com.pragmaticpat.playroom.library.CountItems android:screenOrientation=landscape/ activity android:name=com.pragmaticpat.playroom.library.ToyStore android:screenOrientation=landscape/ activity android:name=com.pragmaticpat.playroom.library.ScoreBoard android:screenOrientation=landscape/ activity android:name=com.pragmaticpat.playroom.library.GameComplete android:screenOrientation=landscape/ activity android:name=com.pragmaticpat.playroom.library.SimpleMath android:screenOrientation=landscape/ activity android:name=com.google.ads.AdActivity android:configChanges=keyboard|keyboardHidden| orientation/ /application supports-screens android:smallScreens=true android:normalScreens=true android:largeScreens=true android:anyDensity=true / /manifest -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Advanced Memory Leak, What could be the cause/How to find it ?
Figure out how to get OOME quickly (usually rotating and going in and out if activities). Comment EVERYTHING out. Test that there is zero gain. Get a hprof dump when app is freshly loaded, do the rotate and in and out test, get another dump, compare the histograms (right most icon in MAT). You may find some extra objects. Click Histogram and search for the object. Right-click and expand the menus - the one you need to look for is something like ignore all phantom/soft/weak references (can't remember exact name since not at workstation). You may see loads of orphaned objects e.g. Matrix so you'd do m.reset() instead of m = new Matrix() if you want to reuse it. Once you have attained zero gain, slowly uncomment blocks of code until you find your leaks. On May 14, 12:38 am, olivier olivier.stev...@treebux.fr wrote: Dears, I am metting an OutOfMemory exception after a while, while inflating an XML View with a bitmap. The problem occurs after opening many times activities that are using many bitmap but always inflated from the XML. I check with MAT the Memory. First question : I don't retain any of my Activity in memory - If I filter on the name of my Activity, i get Objects = 0, but on some activities I could see RetainedHeap = 302. Does this indicate a leak ? After that, I try to compare my memory in different points of time, to see the objects that have been created. But I can't find any thing significant. My Question is : If I don't retain activities in memory what could be the leak reasons ? What tools/Method to use to find it ? Regards, Olivier -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Advanced Memory Leak, What could be the cause/How to find it ?
Comment everything out. Make a routine where you rotate and go in and out of the activity. Start activity fresh, do hprof dump, do the routine, get another dump. Click Histogram and click the right most icon to compare to the fresh dump. You may spot some extra objects. Click Histogram again and search for the extra objects. Right-click and look for the ignore phantom/weak/soft references (not at computer, don't remember exact menu). You may find orphaned objects e.g. Matrix as a result of doing m = new Matrix() when you can reuse with m.reset(). Aim for zero gain before uncommenting blocks of code to find the leak(s). On May 14, 12:38 am, olivier olivier.stev...@treebux.fr wrote: Comcommentment Dears, I am metting an OutOfMemory exception after a while, while inflating an XML View with a bitmap. The problem occurs after opening many times activities that are using many bitmap but always inflated from the XML. I check with MAT the Memory. First question : I don't retain any of my Activity in memory - If I filter on the name of my Activity, i get Objects = 0, but on some activities I could see RetainedHeap = 302. Does this indicate a leak ? After that, I try to compare my memory in different points of time, to see the objects that have been created. But I can't find any thing significant. My Question is : If I don't retain activities in memory what could be the leak reasons ? What tools/Method to use to find it ? Regards, Olivier -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Advanced Memory Leak, What could be the cause/How to find it ?
(Apologies for double-post... Xoom Honeycomb browser crashed twice upon posting!) Also an edit to my previous post: Click Histogram again and search for the extra objects. Right-click and click Merge Shortest Path to GC Roots and look for the exclude all phantom/weak/soft etc. references. You'll want to do the same for the 'fresh' Histogram and see who is keeping your objects alive. The target is to make the total (at the bottom) equal on both the fresh and 'after-routine' Histogram. I have only used this on Android 2.2 and 3.0. It is good to test this on as many versions as you have access to, as you may find that certain builds may leak more objects than others (the Galaxy Tab stock 2.2 seems to leak a bit compared to CyanogenMod 7.0.0 on 2.3). Also, while 3.0 has the very helpful ability to see that your Bitmaps are leaking as byte[] objects, you can already see if your code is leaking with 2.2. A leak doesn't have to have a large footprint especially in 2.2 where a harmless-looking AsyncTask may leak Bitmaps but show minimal memory use. On Jun 6, 3:00 am, B Lyon bradfl...@gmail.com wrote: what version of android? On Sun, Jun 5, 2011 at 2:51 PM, albnok alb...@gmail.com wrote: Comment everything out. Make a routine where you rotate and go in and out of the activity. Start activity fresh, do hprof dump, do the routine, get another dump. Click Histogram and click the right most icon to compare to the fresh dump. You may spot some extra objects. Click Histogram again and search for the extra objects. Right-click and look for the ignore phantom/weak/soft references (not at computer, don't remember exact menu). You may find orphaned objects e.g. Matrix as a result of doing m = new Matrix() when you can reuse with m.reset(). Aim for zero gain before uncommenting blocks of code to find the leak(s). On May 14, 12:38 am, olivier olivier.stev...@treebux.fr wrote: Comcommentment Dears, I am metting an OutOfMemory exception after a while, while inflating an XML View with a bitmap. The problem occurs after opening many times activities that are using many bitmap but always inflated from the XML. I check with MAT the Memory. First question : I don't retain any of my Activity in memory - If I filter on the name of my Activity, i get Objects = 0, but on some activities I could see RetainedHeap = 302. Does this indicate a leak ? After that, I try to compare my memory in different points of time, to see the objects that have been created. But I can't find any thing significant. My Question is : If I don't retain activities in memory what could be the leak reasons ? What tools/Method to use to find it ? Regards, Olivier -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Activity lifecycle: invoking finish
If you've noticed, cleaning stuff up let's say clearing a bitmap or nulling an image before you call another activity will result in a temporary blanking out. So onDestroy has to happen after the next activity is fully drawn. If you use 14mb in Activity A and 14mb in Activity B on a 16mb heap device you will run out of memory. I use android:process in the manifest to get around this. On May 11, 11:12 pm, Vikram vikram.bodiche...@gmail.com wrote: This seems to be the order. B.onPause() - A.onStart() - A.onResume() -B.onStop() - B.onDestroy(). which makes sense! On May 12, 10:43 am, Vikram vikram.bodiche...@gmail.com wrote: I have two activities A and B. A is in the stopped mode and B is running. When I invoke finish() on B, A.onStart() and A.onResume() are being invoked before B.onStop() and B.onDestroy(). Is this normal behavior? I find this a little strange! I want to cleanup stuff before I hand over control to B. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: onRestart from Home button or from back button
Have Activity B call Activity C using startActivityOnResult(intent, requestCode), override Activity C's onBackPressed to pass a kill flag via intent and setResult. In Activity B override onActivityResult and see if the kill flag is there and the request code matches then call finish(). So pressing back in C will go to A. On May 30, 3:22 pm, Fina Perez fina.pere...@gmail.com wrote: Hi! I thought to use that, but I'm not sure if it's going to work. The thing is sometimes I break the normal flow between activities, I mean, from activity A I start activity B, and from B, C. But when I finish activity C, I go back to the activity A, so I really dont know if onStartActivityForResult waits for the result of the activity it launched or just for a result. On May 26, 7:56 pm, TreKing treking...@gmail.com wrote: On Thu, May 26, 2011 at 3:44 AM, Fina Perez fina.pere...@gmail.com wrote: when I press the back button and navigate from one activity to the previous one inside my app. In this case, I dont need to check anything, but I really dont know who to handle this situation. any ideas? http://developer.android.com/reference/android/app/Activity.html#star..., int)http://developer.android.com/reference/android/app/Activity.html#onAc..., int, android.content.Intent) --- -- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Orientation problem
Google onConfigurationChanged and copy the code that checks if you're in landscape or portrait, into this. You'd want to save the time in onCreate in a static variable. On May 30, 2:16 pm, shanmu nathan win.sha...@gmail.com wrote: There is no bug raises when i changing the orientation.. when i changing the orientaion the activity is restarted.. On Mon, May 30, 2011 at 11:32 AM, kaushik p kaushiks...@gmail.com wrote: ok Kaushik Pendurthi. Now what is my need is when i changing the orientation my apps is work continuesly not from the begining... according to my understanding this statement means , you are trying to change the orientation while the app is running try to make set the orientations in code for ex : most media players only open in landscape mode no matter which position you hold . Eg.. Normally i run that app in portrait then time picker shows current value for instance 12:10. i change some values like 21:12. If i changing the orientation the Time picker value also changed to current value thats the problem.. all i understand here is there is a bug which rises when you do something , please be clear , i wont be able to help even if i want to . On Mon, May 30, 2011 at 11:20 AM, shanmu nathan win.sha...@gmail.comwrote: ok Kaushik Pendurthi. Now what is my need is when i changing the orientation my apps is work continuesly not from the begining... Eg.. Normally i run that app in portrait then time picker shows current value for instance 12:10. i change some values like 21:12. If i changing the orientation the Time picker value also changed to current value thats the problem.. On Mon, May 30, 2011 at 11:08 AM, kaushik p kaushiks...@gmail.comwrote: are you trying to change the orientation when your app is running or at the beginning ? Please be more clear when asking questions On Mon, May 30, 2011 at 11:02 AM, shanmu nathan win.sha...@gmail.comwrote: Hi guys, Good Morning I need help from yours. I develop one apps that time i met one problem. That is when ever i change that orientation my apps running from starting i dnt knw how to overcome that problem... I wrote separate xml's for portrait and landscape.. can anyone help me pls its very urgent... -- With Regards, SHANMUGANATHAN. A Software Engineer Trainee, Citrisys Solution, Phone: +91.44.22311173 Mail To: sayyadu...@citrisys.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- ThanksRegards Kaushik Pendurthi http://kaushikpendurthi.blogspot.com/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- With Regards, SHANMUGANATHAN. A Software Engineer Trainee, Citrisys Solution, Phone: +91.44.22311173 Mail To: sayyadu...@citrisys.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- ThanksRegards Kaushik Pendurthi http://kaushikpendurthi.blogspot.com/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- With Regards, SHANMUGANATHAN. A Software Engineer Trainee, Citrisys Solution, Phone: +91.44.22311173 Mail To: sayyadu...@citrisys.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Honeycomb Bitmap.createBitmap
I found a similiar problem going from the Samsung Galaxy Tab on 2.2 with 48MB heap to a Motorola Xoom on 3.0.1 with 48MB heap. You may notice that previously if you intentionally made an OutOfMemoryError, Honeycomb seems to try to allocate twice as much RAM. As it turns out, Honeycomb defaults to 32 bit bitmaps, so you might want to override it to 16-bit like: BitmapFactory.Options o2 = new BitmapFactory.Options(); if (compressColor) o2.inPreferredConfig = Bitmap.Config.RGB_565; o2.inPurgeable = true; o2.inInputShareable = true; o2.inSampleSize = (int) scale; bitmap = BitmapFactory.decodeStream(fis, null, o2); The app I am building also uses a big 1280x800 background drawable defined in XML - I wonder if this is also eating my heap space, and if so, whether it would be better if I loaded it as a 16-bit Bitmap and set the background in code! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en