Wenn ihr unter Windows arbeitet, dann werdet ihr wahrscheinlich Treiber für Euer Smartphone brauchen.
Auf der OEM USB Drivers Seite findet ihr eine Anleitung für die Installation und
eine Liste mit den gängigsten Smartphoneanbietern.
Es kann sein, dass ihr den ADB Server neu starten müsst, bevor die IDE eurer Gerät erkennt.
Außerdem solltet ihr noch das USB-Debugging auf eurem Gerät zulassen:
The first time I started with this issue i didn't even know where to start. So i asked a question on SO - the answer helped me to get the right direction.
Now i solved this issue and want to share the solution in this post:
The HTTP Request to get the public posts looks like this:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Just enter your userId and set the collection to "public". After clicking on "execute" you can see the request to the server and the response from the server.
To get a successful response from the server you have to Authorizing your API request.
Every request that an application sends to google needs an "API Key".
How to get an API Key for the G+ API?
First you have to create a new project in the Googles API Console:
Then you have to enable the "Google+ API" Service:
enable Google+ API Service
accept terms of use
your Google+ API Service is enabled
After the previous steps you can find you API Key at the menu item "API Access":
your API Key
Example:
Show Author, published date of post and the posts content on a php website:
First download the php client library called "google-api-php-client" at the client libraries page
After unzipping the *.gz and than the *.tar file you should see the php client library "google-api-php-client"
create a simple "index.php" (at the same folder where you find the php client library) where you want to show your posts, it can look like this:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create a "show_posts.php" and copy the following code inside the file:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Since Android 3.0 there was added a window feature to the API called "action bar" (Design Patterns).
The action bar provides two navigation modes: tabs and drop-down-list.
Before you start to develop an app you make some basic decisions about the UI Design.
If you decide to use the action bar with "NAVIGATION_MODE_TABS" you have to make you familiar with the android system and how it handles this navigation mode:
Sometimes action bar tabs are showing as drop-down-list, this behaviour can be helpful to save space.
But it's also annoying if you expect tabs and the system shows a drop-down-list (this issue is tracked here; good explanation on SO by CommonsWare).
Now, how to solve this issue?
first you have to think about your UI layout and if you really want to show always tabs you have to take a "ViewPager" with "PagerTabStrip".
if you already developed an app there are some workarounds (described in this post ): one of this is very simple: just set the navigation mode of the action bar after you're adding the tabs.
A problem occurred configuring project ':myApp'. > Failed to notify project evaluation listener. > Could not resolve all dependencies for configuration ':myApp:_Flavor1DebugCompile'. > Could not find com.google.android.gms:play-services:4.0.30. Required by: myAppProject:myApp:unspecified
check in SDK Manager if "Google Repository" is installed (so link)
After installation of AS 0.2.10 the studio didn't show any "build variants" and I got the following message: "Gradle 'linkedGradleProject' project refresh failed: A path must be specified!" In my gradle settings (File -> Settings -> Gradle) I wanted to use "default gradle wrapper (recommended)". But this option was disabled and a comment was "(not configured for the current project)". Also I recognized that the linked gradle project was the wrong one (the root folder of my android studio projects -> in earlier times there was a bug in AS where changes in the gradle.build file caused a reorganization of the prject: the IDE generated an "*.iml" file to the parent folder of the project).
The solution was simple:
close the project
import project
choose the "settings.gradle" file of you project
a dialog occurs: "Import Project from gradle"
now you have the option to "Use default wrapper (recommended)"
if you still get the message of the "linkedGradleProject" just restart the IDE than it shouldn't appear again. But the important thing is that the IDE shows your "build-variants"!