我在连接到Linkedin API时遇到了一些麻烦.
我正在关注这个https://developer.linkedin.com/docs/android-sdk和这个https://developer.linkedin.com/docs/android-sdk-auth,但我收到此错误代码:
{
"errorCode": "INVALID_REQUEST",
"errorMessage": "either bundle id or package name \/ hash are invalid, unknown, malformed"
}
Run Code Online (Sandbox Code Playgroud)
到目前为止,我的实现非常简单:
public void shareOnLinkedin() {
AuthListener authListener = new AuthListener() {
@Override
public void onAuthSuccess() {
Log.d(TAG, "Success");
}
@Override
public void onAuthError(LIAuthError error) {
Log.d(TAG, error.toString());
}
};
LISessionManager
.getInstance(getApplicationContext())
.init(ColectionDetailActivity.this, buildScope(), authListener, true);
}
private static Scope buildScope() {
return Scope.build(Scope.R_BASICPROFILE, Scope.W_SHARE);
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
... …
Run Code Online (Sandbox Code Playgroud) 我有一个为我的应用程序定义的intent-filter,它是这样的:
!-- Accepts URIs that begin with "urban://success” -->
<data
android:host="success"
android:scheme="urban" />
Run Code Online (Sandbox Code Playgroud)
这个深层链接似乎适用于其他浏览器,但对于Android for Chrome则不然.
我从服务器得到的答案如下:
urban://success?utf8=%E2%9C%93&json=%7B%22status%22%3A%...
Run Code Online (Sandbox Code Playgroud)
任何帮助将不胜感激.
最好的祝福.
是否可以替换获取intent-filter的活动
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Run Code Online (Sandbox Code Playgroud)
通过配置口味?
我已经实现了一个Socket Listener来读取从GPS发送的数据,但它占据了我90%的CPU.我知道这是我的代码导致这一点,但我不知道在哪里.
这是我的主要课程:
public class PortToDB {
ServerSocket serverSocket = null;
public void listenSocket(){
try{
serverSocket = new ServerSocket(50000);
} catch (IOException e) {
System.out.println("Could not listen on port 50000. " + e);
System.exit(-1);
}
while(true){
GPSData gd;
try{
gd = new GPSData(serverSocket.accept());
Thread t = new Thread(gd);
t.start();
} catch (IOException e) {
System.out.println("Accept failed: 50000. " + e);
System.exit(-1);
}
}
}
public static void main(String[] args) {
PortToDB portToDb = new PortToDB();
portToDb.listenSocket();
}
}
Run Code Online (Sandbox Code Playgroud)
这是我的Runnable类:
class …
Run Code Online (Sandbox Code Playgroud) Swift 是在编译时保留方法查找列表还是在特定内存位置调用函数?
此致。
关于这个:http : //davedelong.tumblr.com/post/58428190187/an-observation-on-objective-c
android android-intent android-permissions android-6.0-marshmallow