我想通过Facebook上的分享意图与我的应用程序预先填充的标题分享照片.
示例代码
Intent intent = new Intent();
intent.setAction(Intent.ACTION_SEND);
intent.setType("image/*");
intent.putExtra(Intent.EXTRA_TEXT, "eample");
intent.putExtra(Intent.EXTRA_TITLE, "example");
intent.putExtra(Intent.EXTRA_SUBJECT, "example");
intent.putExtra(Intent.EXTRA_STREAM, imageUri);
Intent openInChooser = new Intent(intent);
openInChooser.putExtra(Intent.EXTRA_INITIAL_INTENTS, extraIntents);
startActivity(openInChooser);
Run Code Online (Sandbox Code Playgroud)
这是我得到的屏幕截图

如果设置类型为图像/*,则上传照片时不会预填充文本.如果设置为文本/普通照片不显示.....
如何在我的Android应用程序中实现应用程序内购买?
我提到了
http://developer.android.com/guide/market/billing/billing_integrate.html#billing-service
这个链接,但我不明白绑定到MarketBillingService步骤.
请给我一个恰当的例子..
我正在尝试从PopupWindow中显示ListView.但是当我尝试调用ListView的setOnItemClickListener时,没有任何问题可以解决.这是Java文件
PopupWindowActivity.java
public class PopupWindowActivity extends Activity {
String[] data = { "DATA 1", "DATA 2", "DATA 3", "DATA 4", "DATA 5", "DATA 6" };
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.a);
final Button btnOpenPopup = (Button) findViewById(R.id.openpopup);
btnOpenPopup.setOnClickListener(new Button.OnClickListener() {
public void onClick(View arg0) {
LayoutInflater layoutInflater = (LayoutInflater) getBaseContext()
.getSystemService(LAYOUT_INFLATER_SERVICE);
View popupView = layoutInflater.inflate(R.layout.main, null);
final PopupWindow popupWindow = new PopupWindow(popupView,
LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
ListView listView = (ListView) popupView.findViewById(R.id.listView1); …Run Code Online (Sandbox Code Playgroud) 我在我的电脑上安装了最新的genymotion.它的工作依赖于API 18和19但是当我尝试使用API 21启动Genymotion模拟器时,它不起作用.永远用" android " 显示黑屏.

我开发了一个用于读书的Android应用程序.Book页面和音频从Amazon Bucket下载.下载后,它存储在SD卡上.
我为下一页和上一页放置了两个按钮.当我显示页面它给了我内存异常.
11-03 10:59:39.199: E/AndroidRuntime(13566): FATAL EXCEPTION: main
11-03 10:59:39.199: E/AndroidRuntime(13566): java.lang.OutOfMemoryError
11-03 10:59:39.199: E/AndroidRuntime(13566): at android.graphics.BitmapFactory.nativeDecodeStream(Native Method)
11-03 10:59:39.199: E/AndroidRuntime(13566): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:493)
11-03 10:59:39.199: E/AndroidRuntime(13566): at android.graphics.BitmapFactory.decodeFile(BitmapFactory.java:299)
11-03 10:59:39.199: E/AndroidRuntime(13566): at android.graphics.BitmapFactory.decodeFile(BitmapFactory.java:324)
11-03 10:59:39.199: E/AndroidRuntime(13566): at android.graphics.drawable.Drawable.createFromPath(Drawable.java:880)
11-03 10:59:39.199: E/AndroidRuntime(13566): at org.Infoware.childrenbible.GeneralHelper.setImgfromSDCard(GeneralHelper.java:608)
11-03 10:59:39.199: E/AndroidRuntime(13566): at org.Infoware.childrenbible.CoverPageActivity.onCreate(CoverPageActivity.java:205)
11-03 10:59:39.199: E/AndroidRuntime(13566): at android.app.Activity.performCreate(Activity.java:4465)
11-03 10:59:39.199: E/AndroidRuntime(13566): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
11-03 10:59:39.199: E/AndroidRuntime(13566): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
11-03 10:59:39.199: E/AndroidRuntime(13566): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
11-03 10:59:39.199: E/AndroidRuntime(13566): at android.app.ActivityThread.access$600(ActivityThread.java:123)
11-03 10:59:39.199: E/AndroidRuntime(13566): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
11-03 …Run Code Online (Sandbox Code Playgroud)