[android-developers] Different Business Models in different countries
Hi All, Would appreciate some advice. We are a US based company working to monetize a South African language app. As Google has not included South Africa in the list of approved Google Merchants, the workflow we would need to create in order to publish a paid non-advertising app that can be purchased by South Africans through Google Play (without entering a 3rd party credit card or pre-paid card or something else) is painful to say the least. My questions: 1. How have other publishers successfully monetized paid apps other than ad supported in countries that are not "merchant supported". 2. Could we publish it as an ad supported app in South Africa and a paid app in the countries which are merchant supported (US, Australia, etc)? Thanks very much in advance. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. To post to this group, send email to android-developers@googlegroups.com. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/d6d4a663-52ec-4cc0-9506-25fcbb81130b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [android-developers] Re: How to detect application launch and shutdown events?
http://developer.android.com/reference/android/app/Application.html#onTerminate() ... reads: This method is for use in emulated process environments. It will never be called on a production Android device, where processes are removed by simply killing them; no user code (including this callback) is executed when doing so. On Saturday, May 22, 2010 4:33:29 AM UTC-5, Martin Wallgren wrote: You can implement your own Application class. (MyApplication extends Application) and set it as your Application in the manifest. application android:name=MyApplication . . . In MyApplication you implement onCreate and onTerminate. See the docs for Application http://developer.android.com/intl/fr/reference/android/app/Application.html /Martin On May 22, 10:44 am, Narendar narendardisco...@gmail.com wrote: Hi all, How to detect application launch and shutdown events? I have used BroadcastReceiver for detecting incoming message, outgoing call and so on. but now I want to use Application Launch and its Shut Down event from my application.. Kindly waiting for any suggestion/link/source code Regards, Narendar Software Engineer -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@googlegroups.comjavascript: To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com javascript: For more options, visit this group athttp:// 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-d...@googlegroups.comjavascript: To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com javascript: For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: Drawable is not drawn after setDrawableByLayerId
Since this hits the top of my search list for this issue, I thought I would give this thread an answer... From what I can tell, LayerDrawable. setDrawableByLayerId is useless on lots of devices (strangely works well on Nexus S). I suggest building a new LayerDrawable instead. On Wednesday, February 3, 2010 1:06:12 PM UTC-6, tt6 wrote: Hi, I'm having a problem with displaying a drawable. I have a ImageButton and a LayerDrawable. I set up an array of Drawable that has one Drawable for the background (index 0) and one for the image (index 1). The button would display different background on different states of the button. What I've done is when the button state changes I replace the background Drawable like: elements[0] = background drawable object elements[1] = image drawable object layers = new LayerDrawable(elements); layers.setId(0, 0); layers.setId(1, 1); ... LayerDrawable ld = (LayerDrawable)button.getDrawable(); boolean result = ld.setDrawableByLayerId(0, new backgroundDrawable); ... The problem is the initial old background is gone but the new one is not displayed. What have I done wrong or missed? 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: How to determine screen resolution programmatically
Since this hit high in google search I thought I'd update it with how I currently get screen width. I am not saying its the best way (maybe though)... but Display.getWidth is deprecated so Philips code from 2008 should not be used. Cheers. @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); DisplayMetrics metrics = new DisplayMetrics(); getActivity().getWindowManager().getDefaultDisplay().getMetrics(metrics); mScreenWidth = getDps(metrics.widthPixels); } On Sunday, December 30, 2007 9:31:17 AM UTC-6, Ian wrote: On Dec 30, 4:48 am, Philip professionalasskic...@gmail.com wrote: Is there any way to programmatically determine the screen resolution of the device? Yes, but be careful what you want. This code in your Activity: @Override public void onCreate(Bundle icicle) { . . . WindowManager w = getWindowManager(); Display d = w.getDefaultDisplay(); int width = d.getWidth(); int height = d.getHeight(); . . . will get you the *physical* display resolution. This is *not* the size of your application, due to the status bar, title bar, etc. To get your application's window size, as far as I know you have to wait for View.onSizeChanged(int width, int height, int oldw, int oldh); to be called; this is *after* you've already created your GUI. This means that if you're doing your own layout, you'll have to adjust it in View.onSizeChanged. You can see how I handled this in Scrambled Net: http://code.google.com/p/netscramble/ Look in the source for BoardView: http://netscramble.googlecode.com/svn/trunk/ScrambledNet/src/org/hermit/netscramble/BoardView.java Ian -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Pop Up Dialog with edit box
Hey, So i'm trying to create a pop up dialog box that can accept a text entry, think of a high score entry window for a players name. I cant do this with Alert Dialogs, i cant do this with Inflate as it alwyas has a transpaent background and i can never get it centered...Any other ideas If you could provide some sample xml and code that would be amazing. Cheers Adrian -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Centering a table in a dynamically created layout
Hey Guys, So my problem is i have tried almost everything i can think of to center a programitacally created table in a programitically created layout. I've tried all the usual layout params center setting but still nothing: Score List is a set of pairs of scores (Name, Score). I'm just looping through and adding them to cells in a table and its always aligned left when i run it. ArrayListScore scoreList = new ArrayListScore(); public LinearLayout getHighScoresView(Context context) { final RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams( RelativeLayout.LayoutParams.FILL_PARENT, RelativeLayout.LayoutParams.FILL_PARENT); layoutParams.addRule(RelativeLayout.CENTER_IN_PARENT); RelativeLayout relLay = new RelativeLayout(context); LinearLayout linLay = new LinearLayout(context); TableLayout td = new TableLayout(context); TextView name; TextView score; TableRow tr; TableLayout.LayoutParams lopForMainRow = new TableLayout.LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT); lopForMainRow.gravity = Gravity.CENTER_HORIZONTAL; td.setLayoutParams(lopForMainRow); for (int i = 0; i scoreList.size(); i++) { tr = new TableRow(context); name = new TextView(context); score = new TextView(context); name.setText(scoreList.get(i).name); score.setText(Integer.toString(scoreList.get(i).score)); tr.addView(name); tr.addView(score); td.addView(tr); } relLay.addView(td, lopForMainRow); linLay.setOrientation(LinearLayout.HORIZONTAL); linLay.addView(relLay); linLay.setGravity(Gravity.CENTER); return linLay; } Cheers Adrian -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] In-App Billing broken in 3.0.27
Hello, I started noticing strange behavior in my own app, so I tried the Dungeons sample app and I'm seeing the same behavior there: 1. Purchase managed product 2. Observe that the order is in the un-actionable Cancelled state in the Checkout console (details follow) Jul 29 8:09 AM Order cancelled Google cancelled this order. Reason: Took too long to deliver Jul 29 8:08 AM Order received You received a new order. Google has sent the customer an order confirmation email. 3. Attempting to re-purchase yields this error: You already have a pending order for this item. Is anyone else seeing this behavior? Things have been so quiet, I wonder if anyone is even using in-app billing through Google. Thanks, Randall -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] When is Google going to devote more resources to Honeycomb
I can't believe that Google has not devoted a lot more manpower to improving Honeycomb. Honeycomb is probably one of Google most important new products. Google needs to give a time frame when the current version will be finished and bug free. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Intercepting the Android phone dialer
Thank you very much for helping me out! Kinda got this to work. To intercept the call completely, you have to set the priority to -1 like this: intent-filter android:priority=-1 action android:name=android.intent.action.NEW_OUTGOING_CALL / category android:name=android.intent.category.DEFAULT / /intent-filter And also, you'll need to set the PROCESS_OUTGOING_CALLS permission: uses-permission android:name=android.permission.PROCESS_OUTGOING_CALLS / There's no way (that I know of) to test it in the emulator. I have to have a friend to install the app in his phone and test it out for me. It works for him, my app will intercept the phone number sent by the dialer and it'll never do the actual call. The problem is that my friend will NEVER make a call unless he uninstall my app. I want people to have an option to call using my app or the dialer itself. Right now, my app is a BroadcastReceiver class. So, it'll ALWAYS listen to the NEW_OUTGOING_CALL intent passively. I'm thinking about making my app a background service instead of a broadcast receiver, maybe that'll work? I believe that's how SipDroid does it. It's getting late now and I need to sleep. I'll probably have some time tomorrow or so to research more about it and I'll post my findings here if I find a correct way to do it. On Jul 12, 11:28 am, Denis Souza denis.so...@gmail.com wrote: You can declare a BroadcastReceiver to for the NEW_OUTGOING_CALL intent such as: intent-filter android:priority=1 action android:name=android.intent.action.NEW_OUTGOING_CALL / category android:name=android.intent.category.DEFAULT / /intent-filter That would intercept an outgoing call after it's dialed. More on this:http://developer.android.com/reference/android/content/Intent.html#AC... I don't know how you would actually make the call go through a SIP connection but I guess this is a good start. There's an open source project called Sipdroid that does exactly that. Maybe you can take a look at their source code to see how it's done. On Jul 12, 3:46 am, Randall randallnori...@gmail.com wrote: I'd like to know this as well. Did you find out how to do it, yet? On Jun 30, 1:41 pm, Jaap jaap.hait...@gmail.com wrote: Maybe I did not explain myself well. What I want is somebody to use the defaultphoneapplication on Android but when the call button is pressed my application gets thenumberand no call is being placed. Jaap On Jun 26, 10:30 pm, Jaap jaap.hait...@gmail.com wrote: Hi, There are some programs to make calls via SIP with android. Nice thing is that they work transparently. That is you can use the standard androidphonedialerbut the call goes via SIP. How can you use the androiddialerto do this? Thanks Jaap -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Intercepting the Android phone dialer
I'd like to know this as well. Did you find out how to do it, yet? On Jun 30, 1:41 pm, Jaap jaap.hait...@gmail.com wrote: Maybe I did not explain myself well. What I want is somebody to use the defaultphoneapplication on Android but when the call button is pressed my application gets thenumberand no call is being placed. Jaap On Jun 26, 10:30 pm, Jaap jaap.hait...@gmail.com wrote: Hi, There are some programs to make calls via SIP with android. Nice thing is that they work transparently. That is you can use the standard androidphonedialerbut the call goes via SIP. How can you use the androiddialerto do this? Thanks Jaap -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Facebook Connect in WebView Failing
My site's Facebook Connect login scheme does not work when I load my site in a WebView. However, everything works fine when loaded in the emulator's browser. Other sites' Facebook Connect logins are also failing in a WebView so I don't think it's an issue with my site's login code. I hope I am just missing a WebView setting, but I cannot figure out what I need to do to get this to work. I am using a WebView with setJavaScriptEnabled(true). Here are some additional details: - the facebook connect button renders properly in the WebView - facebook login dialog pops up when this button is clicked - after filling submitting the user's credentials, I can see that the WebView tries to load a URL that looks something like http:// mywebsite/xd_receiver.htm?. - The WebView is blank even though the URL loads without any errors Thanks for the 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: WebView + Cookie Problem
that's correct. The server rejects the session cookie and I have to login, but the same session cookie works fine when used with other messages to the server. The odd thing is that this doesn't happen all the time. The cookie will occassionally work in the given code snippet so I thought it might be a timing issue with how I'm calling sync() On Oct 23, 1:21 pm, Jason Proctor jason.android.li...@gmail.com wrote: i use this mechanism and it works for me. do you log out what's going on in this section and see if anything untoward is happening? I have a server that sends my android app a session cookie used for authenticated communication. I am trying to load a WebView with a URL pointing to that same server and I'm trying to pass in the session cookie for authentication. I am observing that it works intermittently but I have no idea why. Below is the code that I'm using to do this. Any help will be greatly appreciated. String myUrl = http://mydomain.com/;; CookieSyncManager.createInstance(this); CookieManager cookieManager = CookieManager.getInstance(); Cookie sessionCookie = getCookie(); if(sessionCookie != null){ String cookieString = sessionCookie.getName() +=+sessionCookie.getValue()+; domain=+sessionCookie.getDomain(); cookieManager.setCookie(myUrl, cookieString); CookieSyncManager.getInstance().sync(); } WebView webView = (WebView) findViewById(R.id.webview); webView.getSettings().setBuiltInZoomControls(true); webView.getSettings().setJavaScriptEnabled(true); webView.setWebViewClient(new MyWebViewClient()); webView.loadUrl(myUrl); -- jason.vp.engineering.particle --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Saving Cookie to Database
Thanks for the reply jcpalmer. My knowledge of an android app lifecycle is not great. Will using onSaveInstanceState() preserve the cookie between different uses of the app? That is, if the app receives a cookie then the app exits later, will onSaveInstanceState() be able to retrieve this cookie when the app is next launched? Secondly, I'm using the org.apache classes to receive/send cookies and did not see straightforward way to obtain a string representation which could be used to instantiate a Cookie. I really have no idea how to save and restore a cookie. Any guidance would be greatly appreciated. Thanks On Jun 1, 4:11 pm, jcpalmer jcpal...@rochester.rr.com wrote: A cookie can be represented as a String. Wouldn't be easier to store this String as a member of your Activity, and stored onSaveInstanceState() ? Then get it back onCreate(). Simple is a relative term. Yes, it can absolutely be done with a database, but not easier than above. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Saving Cookie to Database
If anybody is interested, looks like the solution is to use BasicClientCookie to create cookies from strings. On Jun 1, 6:07 pm, Randall callmenanner...@gmail.com wrote: Thanks for the reply jcpalmer. My knowledge of an android app lifecycle is not great. Will using onSaveInstanceState() preserve the cookie between different uses of the app? That is, if the app receives a cookie then the app exits later, will onSaveInstanceState() be able to retrieve this cookie when the app is next launched? Secondly, I'm using the org.apache classes to receive/send cookies and did not see straightforward way to obtain a string representation which could be used to instantiate a Cookie. I really have no idea how to save and restore a cookie. Any guidance would be greatly appreciated. Thanks On Jun 1, 4:11 pm, jcpalmer jcpal...@rochester.rr.com wrote: A cookie can be represented as a String. Wouldn't be easier to store this String as a member of your Activity, and stored onSaveInstanceState() ? Then get it back onCreate(). Simple is a relative term. Yes, it can absolutely be done with a database, but not easier than above. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Can Android browser load from local server via 802.11 ad hoc?
Can one use an Android phone to access basically local (think intranet for example) web servers to view pages? I ask this question because some cell phones with some phone network appear to use a special server to funnel cell phone requests thru and that the server offloads from the browser part of what a browser normally does. I get the impression that the Opera mobile browser works this way. I want to talk to local devices that serve web pages and connect directly to them from phones. Does the Chrome browser in Android have the full functionality that Chrome has on a PC? Can it parse HTML, do XMLHttpRequest, and otherwise act like a modern browser? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Accessing video buffer?
I'm trying to make a screenshot app for Android. I understand that I cannot have my program to access different apps and pull their View object to take a screenshot. Is there a way for me to access the video buffer, so I can take the video the content and save it as a 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---