Re: [android-developers] how to create map api key for google map v1

2014-03-26 Thread TreKing
On Tue, Mar 25, 2014 at 10:34 PM, Abhilash Baddam <
abhilash.androiddevelo...@gmail.com> wrote:

> My existing key is not working. While developing the app, I used different
> machine now in the same code i am making changes in some other machine,
> after making the changes if i run the app then the map is not getting
> loaded need to change the map api key it seems.
>

This is because the different machines have different debug keys which
require different map keys. However, regardless of your machine, if you
have your original release key, that should continue to work for your
release build.


> Do we need to create the api key every time if we make changes in
> different machines?
>

You need a new key for each unique signing certificate. On different
machines, the debug certificate will be different, hence you'll need a
different key.


> How can i use the existing key now?
>

Pull your debug key off the old machine, if you can. Or build in release
mode when testing your map.

On Wed, Mar 26, 2014 at 12:48 PM, Abhilash Baddam <
abhilash.androiddevelo...@gmail.com> wrote:

> any help on this :)


Bro, relax. This is a volunteer group and you posted your question late at
night U.S. time on a school night. Wait patiently for help and bump your
thread only after a few days.

-
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 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/d/optout.


[android-developers] Re: Not receiving onDismiss() callback

2014-03-26 Thread deepwinter2
Did you solve this issue?  I have not been able to get searchmanager 
callbacks to work.

On Friday, June 12, 2009 1:56:27 PM UTC-7, Stephen Yu wrote:
>
> Hi, 
>   Here is some sample code that I use the SearchManager to show the 
> search UI in my activity.  My issue is that the onDismiss() below is 
> not called. 
>
> protected void onCreate(Bundle savedInstanceState) 
> { 
> ... 
> mSearchManager = (SearchManager) getSystemService 
> (Context.SEARCH_SERVICE); 
> mSearchManager.setOnDismissListener(new 
> SearchManager.OnDismissListener() { 
>public void onDismiss() { 
>   // Do something 
>} 
> }); 
> mSearchManager.setOnCancelListener(new 
> SearchManager.OnCancelListener() { 
>public void onCancel() { 
>   // Do something 
>} 
> }); 
> startSearch(null, false, null, true); 
> } 
>
> When the user enter a text in the search UI and start the search, my 
> onDismiss() method in the SearchManager.OnDismissListener is not 
> called. 
> Here is what I found in the SearchManager/SearchDialog/Dialog code 
> that may be the root cause of the issue. 
>
> 1) SearchDialog:launchQuerySearch calls 
> 2) Dialog:dismiss() calls 
> 3) mDismissAction.run() (Thread.currentThread() should still be equal 
> to mUiThread in the if statement in the dismiss()) 
> 4) Dialog:dismissDialog() calls  (note SearchDialog:onStop() is called 
> before Dialog:sendDismissMessage() in the dismissDialog() method) 
> 5) SearchDialog:onStop() calls 
> 6) Dialog:setOnDismissListener(null) which reset the mDismissMessage = 
> null So, by the time the Dialog:sendDismissMessage() is called in 
> Dialog:dismissDialog() on step 4, the Message.obtain 
> (mDismissMessage).sendToTarget() is not called since mDismissMessage 
> is null and my activity's onDismiss() is not called. 
>
> Probably the SearchDialog should have reset the listeners in its 
> onDestroy() instead of onStop(). 
> Would you please verify if it is the root cause of the issue and if a 
> proper fix can be implemented? 
>
> Thanks, 
> Stephen 
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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/d/optout.


Re: [android-developers] External Storage lockout in 4.4 update on some Samsung devices.

2014-03-26 Thread Nathan
And get this. Apparently Google Play Support is blaming me. 

==
"What I suggest is that you contact the developer and ask them when they are
going to release an update that is compatible with Kit Kat. After they do
this the app should work as it did before you perform the update."

I got pretty steamed and have been contacting them. 
 
Someone responded:
"your target SDK is 17, platform version 4.2. Currently the customer's 
device is running Kit Kat, platform version 4.4.2."
"For the reasons stated above it looks like the app is not compatible with 
the user's device."

Well, apparently Google Play support doesn't know the difference between 
target SDK and MaxSDK, but they are willing to think that they do. Or maybe 
they do have some information that suggests rolling the targetSDk will fix 
this problem. But there is no such information at the Android developer 
site. Really wish it were that simple. 

Nathan

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To 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/d/optout.


Re: [android-developers] Re: Rating Hijacking !

2014-03-26 Thread Kostya Vasilyev
2014-03-26 22:28 GMT+04:00 Jose_GD :

> Any news regarding this issue?
>
> I don't know if I didn't pay attention before or if it's a brand new
> feature of the Play app. Now you can rate an app immediately after tapping
> Install (or Buy), *before* the install completes! How can you have an
> opinion for an app you actually didn't use at all?
>

Haven't you heard about Google Mindreader -- part of the latest Play
Services update?

Sorry, could not resist :)

PS - that's a very nice looking widget.

-- K


>
> No wonder my app 3 months ago had a 4.4 rate and now has a 4.16 rate. And
> the last update was 4 months ago...
>
> Thanks for any clues
>
> José
>
> https://play.google.com/store/apps/developer?id=Jos%C3%A9+Gonz%C3%A1lez+D%27Amico
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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/d/optout.


[android-developers] Re: Rating Hijacking !

2014-03-26 Thread Jose_GD
Any news regarding this issue?

I don't know if I didn't pay attention before or if it's a brand new 
feature of the Play app. Now you can rate an app immediately after tapping 
Install (or Buy), *before* the install completes! How can you have an 
opinion for an app you actually didn't use at all?

No wonder my app 3 months ago had a 4.4 rate and now has a 4.16 rate. And 
the last update was 4 months ago...

Thanks for any clues

José
https://play.google.com/store/apps/developer?id=Jos%C3%A9+Gonz%C3%A1lez+D%27Amico


El miércoles, 22 de enero de 2014 19:43:29 UTC-3, Nobu Games escribió:
>
> I got feedback today from Google Play support acknowledging my complaints 
> about that quick-rating widget:
>
> Thank you for contacting the Google Play developer support team. I 
>> sincerely apologize for the inconvenience.
>>
>> We really appreciate your thoughtful feedback, and we'll be sure to take 
>> your thoughts into consideration as we work to improve Google Play.
>>
>> Thanks for your understanding and continued support!
>>
>
> Fingers crossed that this issue will get sorted out soon :-)
>
> On Tuesday, January 21, 2014 1:33:59 PM UTC-6, Nobu Games wrote:
>>
>> I'm still far from being top or even mid-tier in terms of app downloads 
>> but this morning I also got my first 2-star mystery rating for a paid app 
>> of mine - no comment and no Google+ name I could respond to. That didn't 
>> happen to me so far since most users tried the free version first and then 
>> decided to buy afterward.
>>
>> This wouldn't have bothered me that much but nevertheless I wanted to see 
>> for myself how that "recommendation rating widget" looks like on my phone. 
>> So I opened the Google Play store app and scrolled down the lengthy front 
>> page with several swipe movements. And I suddenly saw that an image was 
>> flashing and quickly changing to "1 star". I accidentally rated some random 
>> app while swiping the screen.
>>
>> This bug 100% reproducible:
>>
>>1. Touch one of the stars
>>2. Move your finger up or down outside the recommendation box
>>3. Lift finger
>>4. App gets rated
>>
>> This can happen quickly and accidentally while scrolling down the screen. 
>> Since I am right-handed (as the majority of people), my thumb naturally 
>> reaches to the left side of the screen, where the worse rating options are 
>> (1 and 2 stars). I bet this happens thousands of times every day without 
>> people even realizing what they just did. I sent a bug report to Google 
>> Play support about that issue.
>>
>> I also have to agree that the phrasing of the recommendation is 
>> completely misleading. If it weren't for this thread here I would have 
>> thought that I'd be rating recommendations and not apps. If I were asked to 
>> rate my favorite "scanner app" with the question "rate this item to get 
>> recommendations", I would give that recommendation a bad rating because I 
>> am already 100% happy with my scanner app and I'm absolutely not interested 
>> in more apps like that. I guess something along these lines may have 
>> happened with my paid app this morning.
>>
>> Google Play really has to fix that as quick as possible. This new 
>> recommendation widget is a substantial change in the overall rating system 
>> Google had no experience with before. Stuff like that should be extensively 
>> tested before put into production mode. Real users should have been 
>> observed while interacting with that new widget. Real users should have 
>> been asked how they interpret the meaning of that new feature. To make that 
>> feature more useful it should be either decoupled from recommendations and 
>> be absolutely straightforward: "Do you like this app? Rate it". If 
>> recommendations are more important than that then it should be a simple 
>> thumbs up / thumbs down and the result must not affect the rating of the 
>> recommended app.
>>
>>
>> On Friday, December 27, 2013 4:37:06 AM UTC-6, Tolriq wrote:
>>>
>>> Hi,
>>>
>>> My app rating is being hijacked by competitors and I don't know what to 
>>> do :(
>>> I've tried to contact Google but there's no category for that and they 
>>> don't answer from the other category contact :(
>>>
>>> My app is 4.9 rating since a very very very long time and all very very 
>>> few bad rating always had comments.
>>> Since 14 days I start to have lot's of 1 or 2 stars rating without any 
>>> comments and without having released a new version or the app having 
>>> problems.
>>> There's still the same amount of 4 / 5 star rating coming every day.
>>>
>>> This graph for the 6 last months from Play Store console : 
>>> http://postimg.org/image/i2bpm94vt/ shows the problem clearly and 
>>> proves without a doubt the hijacking action :(
>>>
>>> What are the possible actions against that ?
>>> This is a shame that years of work can be attacked so easily :(
>>>
>>> How to contact some Google representative to have this investigated ?
>>>
>>> Regards,
>>> Tolriq
>>>
>>

-- 
Y

[android-developers] Re: How to inject mock objects in Android?

2014-03-26 Thread Andrew Mackenzie
I think with your current code, getInstance() will return null in your test.
You might want to check that

Well, the quickest hackyest thing that works fine and will get you running 
is:
- add a setter to your service class that overrides the assignment to mBar 
that is done on construction.
Depending on how you structure you packages for test, you can leave it 
package default scope and not publicly expose it beyond the test code.

If you want to spend more time, then you might want to look at Dagger and 
have it @Inject the Bar into the service when the system Constructs it for 
you, and then you override the Injection during the test with a Test Dagger 
Module that injects the Mock.

Andrew

On Monday, 24 March 2014 05:37:13 UTC+1, Yuvi wrote:
>
>
>  Hi,
> 
> I am facing issue while unit testing :
>
> // Service class that have to be tested.
>
> class FooService extends Service{
>
> public static FooService sFooService;
>
> private Bar mBar = new Bar();
> //Other private objects
>
> @Override
> protected void onCreate()
> {
> sFooService = this;
> }
>
> public static FooService getInstance()
> {
> return sFooService;
> }
>
> @Override
> protected void onDestroy()
> {
> sFooService = null;
> }
>
> public void doSomething()
> {
> //do Some stuff here
> if(done)
> {
> mBar.perfomAction(true);
> // Now this performAction method doing many stuffs using some 
> other classes
> // that may have dependency and initialized from some else. Hence 
> throwing exceptions.
> // Therefore need to mock Bar class. but how ??
> }
> else
> {
> mBar.perfomAction(false);
> }
> }}
>
>
> // Test Class
>
> class FooTest extends ServiceTestCase{
>
> protected void setUp() throws Exception
> {
> super.setUp();
> MockitoAnnotations.initMocks(this);
> startService(new Intent(getContext(), FooService.class));
>
> }
>
> protected void tearDown() throws Exception
> {
> super.tearDown();
> }
>
> public void testdoSomething()
> {
> Bar bar = mock(bar.class);
> doThrow(new RuntimeException re).when(bar).performAction(true);
>
> //How to inject bar mocked object?
>
> assertNotNull(FooService.getInstance());
>
> try
> {
> FooService.getInstance().doSomeThing();
> Assert.Fail("Runtime exception should be thrown");
> }
> catch (RuntimeException re)
> {
>
> }
> }}
>
>
> Now, here how can I inject bar mocked object which is created using 
> Mockito ?
>
> I have googled this, and found that some guys suggested to create getter 
> and setter for Bar class. Which I don't think is a valid solution, because 
> there could be number of private object, that will be visible to outside 
> FooService class.
>
> Regards,
>
> Yuvi
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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/d/optout.


Re: [android-developers] how to create map api key for google map v1

2014-03-26 Thread Abhilash Baddam
any help on this :)


On Wed, Mar 26, 2014 at 9:04 AM, Abhilash Baddam <
abhilash.androiddevelo...@gmail.com> wrote:

> Hi Treking,
>
> Thanks for the reply.
>
> My existing key is not working. While developing the app, I used different
> machine now in the same code i am making changes in some other machine,
> after making the changes if i run the app then the map is not getting
> loaded need to change the map api key it seems.
> Do we need to create the api key every time if we make changes in
> different machines?
> How can i use the existing key now?
>
>
> On Wed, Mar 26, 2014 at 5:09 AM, TreKing  wrote:
>
>>
>> On Tue, Mar 25, 2014 at 1:03 PM, Abhilash Baddam <
>> abhilash.androiddevelo...@gmail.com> wrote:
>>
>>> I have developed an app long time back using google map api v1, there i
>>> have used mapview. Now i want to make some changes in that but i couldnt be
>>> able to create map api key for that app now.
>>>
>>
>> What happened to your existing key?
>>
>>
>>> How can i create the map api key for that.
>>>
>>
>> You can't.
>>
>>
>>>  I know that map api v1 is deprecated but to use map api v2 in my app ,
>>> i have to make so many changes in my app which i do not want.
>>>
>>
>> Yup, it sucks.
>>
>>
>>> Cant i create the map api key for google map v1
>>>
>>
>> No, you cannot
>>
>>
>>> Can anyone suggest me???
>>>
>>
>> I suggest you find your old V1 key, remove the map from your app, or
>> embrace V2!!!
>>
>> Good luck.
>>
>>
>> -
>> 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 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/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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/d/optout.


[android-developers] Padding offsets for a TextView to perfectly align with an EditText

2014-03-26 Thread Simon Giddings
I am building a layout where text is displayed in a TextView.
When the user taps on the text, I want to display an EditText widget to 
allow for the text to be modified.

I use a relative layout to ensure have the two widgets in the same position.
The edit text is declared first and then the the TextView is made to align 
to the top and bottom of the EditText.

However, I have seen that the text displayed in the EditText is offset down 
and to the left.
I need to ensure that, for the user, the text does not appear to move at 
all when "switching" to the EditText.

Do I need to use padding values to align the text displays ?
If I do, is this guaranteed to work on all displays ?

Here is the relevant part of my layout :










-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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/d/optout.