小编Jee*_*123的帖子

自定义Android Intent.ACTION_SEND

我正在使用Intent来共享网址和主题.在此意图过滤器中显示所有共享应用程序.我只想要(facebook/gmail/message/skype/twitter)弹出窗口中的这些选项.这可以自定义共享意图过滤器.

 Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);
 sharingIntent.setType("text/plain");
 String shareBody = adapter.getDetails("url";
 sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT,"subject");
 sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareBody);
 startActivity(Intent.createChooser(sharingIntent, "Share via"));
Run Code Online (Sandbox Code Playgroud)

谢谢

android facebook android-intent

29
推荐指数
2
解决办法
6万
查看次数

如何在Windows Phone通用应用程序上执行图表

我是新的Windows Phone通用应用程序,我需要实现条形图/饼图.

尝试了很多dll,Metro UI,WinRtXamlToolKit和WinRtXamlToolKit.Controls.DataVisualization这些dll无法正常工作.

给我一个好主意在Windows Phone Universal App上执行此操作.如何以编程方式执行图表.

谢谢

windows-phone-8.1 win-universal-app

11
推荐指数
1
解决办法
3395
查看次数

Android Facebook remote_app_id与存储的ID错误不匹配

在我的应用程序用户必须通过Facebook登录,但我收到此错误,

**my logcat error:**

02-14 18:00:01.821: WARN/fb4a:fb:OrcaServiceQueue(10988): Exception during service
02-14 18:00:01.821: WARN/fb4a:fb:OrcaServiceQueue(10988): com.facebook.orca.protocol.base.ApiException: remote_app_id does not match stored id 
02-14 18:00:01.821: WARN/fb4a:fb:OrcaServiceQueue(10988):     at com.facebook.orca.protocol.base.ApiResponseChecker.b(ApiResponseChecker.java:74)
02-14 18:00:01.821: WARN/fb4a:fb:OrcaServiceQueue(10988):     at com.facebook.orca.protocol.base.ApiResponseChecker.a(ApiResponseChecker.java:103)
02-14 18:00:01.821: WARN/fb4a:fb:OrcaServiceQueue(10988):     at com.facebook.orca.protocol.base.ApiResponse.g(ApiResponse.java:208)
02-14 18:00:01.821: WARN/fb4a:fb:OrcaServiceQueue(10988):     at com.facebook.katana.server.protocol.AuthorizeAppMethod.a(AuthorizeAppMethod.java:267)
02-14 18:00:01.821: WARN/fb4a:fb:OrcaServiceQueue(10988):     at com.facebook.katana.server.protocol.AuthorizeAppMethod.a(AuthorizeAppMethod.java:28)
02-14 18:00:01.821: WARN/fb4a:fb:OrcaServiceQueue(10988):     at com.facebook.orca.protocol.base.SingleMethodRunner.a(SingleMethodRunner.java:125)
02-14 18:00:01.821: WARN/fb4a:fb:OrcaServiceQueue(10988):     at com.facebook.katana.server.handler.PlatformOperationHandler.c(PlatformOperationHandler.java:274)
02-14 18:00:01.821: WARN/fb4a:fb:OrcaServiceQueue(10988):     at com.facebook.katana.server.handler.PlatformOperationHandler.a(PlatformOperationHandler.java:175)
02-14 18:00:01.821: WARN/fb4a:fb:OrcaServiceQueue(10988):     at com.facebook.orca.server.OrcaServiceQueue.d(OrcaServiceQueue.java:218)
02-14 18:00:01.821: WARN/fb4a:fb:OrcaServiceQueue(10988):     at com.facebook.orca.server.OrcaServiceQueue.d(OrcaServiceQueue.java:38)
02-14 18:00:01.821: WARN/fb4a:fb:OrcaServiceQueue(10988):     at com.facebook.orca.server.OrcaServiceQueue$3.run(OrcaServiceQueue.java:169)
02-14 18:00:01.821: WARN/fb4a:fb:OrcaServiceQueue(10988):     at android.os.Handler.handleCallback(Handler.java:587) …
Run Code Online (Sandbox Code Playgroud)

android facebook

8
推荐指数
1
解决办法
2万
查看次数

Android ICS SOAP方法不起作用?

我在三星galaxy tab中测试了SOAP方法,并且工作正常.

相同的代码,我在Android冰淇淋三明治上测试,并没有工作.

以下是我的代码,

HttpPost httppost = new HttpPost("xxxxxx");        
            httppost.setHeader("Content-type", "text/xml; charset=utf-8");
            httppost.setHeader("SOAPAction", SoapAction);

            StringEntity se1 = new StringEntity(env,HTTP.UTF_8);
            se1.setContentType("text/xml");  
            se1.setContentEncoding(new BasicHeader(HTTP.CONTENT_TYPE, "text/xml; charset=utf-8"));
            httppost.setEntity(se1);  

            HttpClient httpclient = new DefaultHttpClient();
            BasicHttpResponse httpResponse = (BasicHttpResponse) httpclient.execute(httppost);

            System.out.println("res------"+httpResponse.getStatusLine().toString()+" code  "+httpResponse.getStatusLine().getStatusCode());

            //Checking response 
            if(httpResponse!=null){
                inputStream = httpResponse.getEntity().getContent();


                BufferedReader r = new BufferedReader(new InputStreamReader(inputStream));
                StringBuilder total = new StringBuilder();
                String line="";
                try {
                    while ((line = r.readLine()) != null) {
                        total.append(line);
                    }
                } catch (IOException e) {
                    // TODO Auto-generated …
Run Code Online (Sandbox Code Playgroud)

android soap xml-parsing

6
推荐指数
1
解决办法
204
查看次数

Android ActionBar(ActionBarCompat)Spinner下拉列表?

我目前正在为ActionBar(ActionBarCompat)工作,我需要一些关于actionbar的澄清.

我正在使用像这样的微调器布局,

<Spinner 
        android:id="@+id/SpinnerList"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" />
Run Code Online (Sandbox Code Playgroud)

我的代码,

public class MainActivity extends ActionBarActivity implements  OnItemSelectedListener{
    private boolean mAlternateTitle = false;

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        ActionBar bar = getActionBar();
        bar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);

        Spinner spinner = (Spinner) findViewById(R.id.SpinnerList);
        ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this, R.array.locations, android.R.layout.simple_spinner_item);
        adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
        spinner.setAdapter(adapter);
        spinner.setOnItemSelectedListener(this);
}
}
Run Code Online (Sandbox Code Playgroud)

它在我的android galaxy ace中显示正常的微调器.我需要输出如下所示,是那个位置android 2.3.请给出建议.

在此输入图像描述

谢谢.

android android-actionbar android-actionbar-compat

6
推荐指数
2
解决办法
3万
查看次数

Android facebook sdk 3.0注销无法正常工作?

我正在使用facebook sdk 3.0登录我的应用程序.登录工作正常.一旦我注销我的应用程序,它就不会发生.

我的注销码:

Facebook mFb=new Facebook("xxxxxxxx");
mFb.logout(this);
Run Code Online (Sandbox Code Playgroud)

给我一些想法来做到这一点.

android facebook facebook-graph-api

4
推荐指数
1
解决办法
5964
查看次数

Windows Phone 8.1 BackPressed无法正常工作

Windows Phone 8.1全新推出.基本功能是后退按钮点击.这个功能不正常的是这款Windows Phone 8.1.这种行为还是我犯了错误.

下面的代码在主页中使用,但是这个代码在点击后也从所有其他类调用.我只需要在主页上访问以下方法.

请检查以下代码,并向我推荐好的解决方案.

请查看我的代码:

 public HomePage()
 {
  this.InitializeComponent(); 
  Windows.Phone.UI.Input.HardwareButtons.BackPressed += HardwareButtons_BackPressed;
 }

    void HardwareButtons_BackPressed(object sender, BackPressedEventArgs e)
    {

    }
Run Code Online (Sandbox Code Playgroud)

谢谢

windows-phone-8.1

4
推荐指数
1
解决办法
2015
查看次数

Android内部吐司不工作?

吐司不在课堂上工作,

这是我的代码:

public class ToastClass {

public ToastClass (Context activity){   
        callToast(activity);
    }   
    public void callToast(Context activity){
            Toast.makeText(activity, "success", Toast.LENGTH_SHORT).show();
    }   
}
Run Code Online (Sandbox Code Playgroud)

错误我得到了这个,

 java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
Run Code Online (Sandbox Code Playgroud)

我需要在课堂上做任何办法.

谢谢.

android toast

0
推荐指数
1
解决办法
1651
查看次数