Is it possible to add a google plus button added to my android app and have it linked to the one that one that is displayed at the top of the google play store , below the app name? So that when people click the button in the app, the count on the play store would go up.
According to the G+ docs, a +1 button is associated with a particular URL. So, if you can figure out what URL the +1 button in Google Play is associated to, then you should be able to construct a G+ button following the thread here (that I know you've already seen) with that URL and you should be all set. My best guess is that it's the play store URL associated with your app...http://play.google.com/store/apps/details?id=your.package
Sounds like you also want the user to end up in Google Play after they click? If so, just follow the directions here - perhaps you could subclass PlusOneButton or set some click handler on it (calling super) to allow the whole G+ functionality to work before navigating them to the Play Store.
Related
I have recently started automating iOS apps on iPhone real devices with the XCUI test setup.
I got a scenario where my app contains 5 screens in the home page, each screen contains a unique card number and its balance so i have to fetch the card number from the screen and verify it with my input(expected) card number, if both are same then i have to click on the card screen otherwise if both are not same then i have to swipe right to the second screen and do the same process.
I was able to automate this scenrio in android perfectly because in android each screen is clearly differentiated with a unique card number but when i inspect the card number screen on iOS app it was showing all the list of cards attached to the app. in this case its getting difficult for me to get the card number from the app and verify it with my input card number . please see the below code which am already using it for android
String oysterCardVisibleNumberOnApp= data.get("PrestigeCardNumber");
while(!action.getText(HomePage.oysterCardNumber,"oysterCardNumber").equalsIgnorecase(oysterCardVisibleNumberOnApp))){
action.swipeRightToLeft();
}
it would be great if any one has any idea how to retrieve the list of elements/cards from the iOS app please let me know. or if you know any new methods in XCUI setup will help me to achieve this then please let me know. your help will be much appreciated :)
Please see the below Android Screen & iOS Screen pictures for getting more clarity
Android Screen
iOS Screen
Thank you
If you stop at a breakpoint for instance and you use:
po XCUIApplication().descendants(matching: .any)
in the debug console, you will get a list of all descendant elements from the main Application element. It will also give you a loose view of the structure.
You can then change .any to more specific element types e.g. .textField or .buttons.
You might be able to use the Accessibility Inspector in xcode for this:
https://developer.apple.com/library/content/documentation/Accessibility/Conceptual/AccessibilityMacOSX/OSXAXTestingApps.html
Based on areas you select in your app, it gives back detailed descriptions on each one. But what it brings back depends on the structure of your application. I was trying to do something similar in my own ios application and this helped me a bit.
You can use XCUIApplication().debugDescription to get a print out of the UI tree that XCUITest sees. You can also update the application code to set custom identifiers for your UI elements (these are only seen by XCUITest). for example card-1, etc.
I am developing an App that has a lock screen widget where it has a play, pause, prev and next. When I connect my phone to an Android wear, it automatically shows this buttons and it works fine. I would like to add a "Like" button that would automatically be shown on the lock screen and the android wear. I know that I can create a Notification and add action for the like. But I want to know if is it possible to achieve that using only RemoteControlClient?
Have you tried using rating with the flag FLAG_KEY_MEDIA_RATING ? It seems that it's the only way to maintain generic methods and avoid having to set custom code on the wear side (or through notifications).
This flag can be set with setTransportControlFlags
Flag indicating a RemoteControlClient supports ratings. This flag must
be set in order for components that display the RemoteControlClient
information, to display ratings information, and, if ratings are
declared editable (by calling addEditableKey(int) with the
RATING_KEY_BY_USER key), it will enable the user to rate the media,
with values being received through the interface set with
setMetadataUpdateListener(OnMetadataUpdateListener).
Unfortunately, few or not example exists on the web. I discovered only one (unanswered) question relative to this on SO :
Android 4.4 KitKat Rating API
edit
It think all this stuff is now well out of date, there have been many changes to this as android has developed. I'll post an answer when I have worked it out (if noone else has).
I really just want a background app to get first crack at bluetooth messages.
end of edit
I have an android app that needs input from the user - I want to use bluetooth headset buttons (actually bluetooth watch/band buttons - but technically the same!).
I have been looking at media button examples, there are many here and elsewhere which all basically say:-
1) Put receiver/intent in manifest
2) Register receiver in main activity
3) Do processing in the receiver class
This isn't working for me (even cutting and pasting sample code), with no errors, but no events being triggered.
However I also found this:
http://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html
Which is a dedicated bluetooth headset api... has it superceded the media button approach? or is it just higher in the food chain? Should this be used instead of the Media Button Event stuff - or are they just different perspectives?
If the media button stuff is the way, I can post my non-working code, but don't want to waste anyones time if its an out of date approach!
Thanks!
For examples of using bluetooth buttons - this is an excellent example...
https://code.google.com/p/media-button-router/
It detects a hit on the headset 'play' button then pops a dialog asking which app to direct the 'play' to - it plays the choices via the headset so one can be selected without viewing the screen.
Is there in SDK Android Wear a Class representing a push-button (the push button on the side of the watch)
If it's possible, can I assign a comportment and a method to this push-button, the push-button can be pressed, or clicked, by the user to perform an action.
I found this http://developer.android.com/reference/android/widget/Button. Html
but I think this Class representing a button widget, not what I want
No, there is no way (at this point) to override action for power off button. Also as CurlyCorvus and Nicolas mentioned you provided link to UI Button (not hardware one) class, and you provided screens with non-Android Wear devices.
I'm developing an android application in which I've used Google Map v2 API.
I've placed one marker on the map, now I want to set its "OnLongClickListener".
As I can see from Eclipse there are only two listeners available for marker:
googleMap.setOnMarkerClickListener(listener);
googleMap.setOnMarkerDragListener(listener);
Could anybody show me any easy way to handle marker's LongClick event??
I've gone through two solutions here:
Setting a LongClickListener on a map Marker
How to detect long click on GoogleMap marker
as both of the solutions you posted have shown - there is no long click event on markers in the maps api. the first link you posted had a solution that might be able to suit your needs but isn't perfect by any means
i would suggest going here to the gmaps issues page and browsing through the feature requests and adding one if it does not exist