English 中文(简体)
在从外部的pdf读物者返回时不要求取得积极效果
原标题:onActivityResult() not called when returning from external pdf reader
  • 时间:2011-07-22 13:02:48
  •  标签:
  • android
  • pdf

I m 开始从像这样的法典中读出一个版本:

public static final int MY_INTENT_FLAG = 1;
String documentName = "filename.pdf";
File file = new File(getFilesDir(), documentName);
if (file != null && file.exists()) {
   Uri filePathUri = Uri.fromFile(file);
   Intent intent = new Intent(Intent.ACTION_VIEW);
   intent.setDataAndType(filePathUri, "application/pdf");

   try {
      startActivityForResult(intent,MY_INTENT_FLAG);
   } catch (ActivityNotFoundException e) {...}
}

该文件对开放并读。 然而,当我向来自pdf的读者发出背顿时,并不叫作精算师。 为什么如此? 这完全是因为它的读者在完成学业时没有制定结果守则? 我在我的装置上有缩略语阅读器。

I want to know when I get back from the external Activity so that the user don t need to login again in this case.

感谢你提供的任何投入

问题回答

Why is this? Can it simply be because that particular pdf reader does not set a result code when finishing? I have Acrobat Reader on my device.

是的,通常情况是这样。

为了收回成果,儿童活动需要打电话:,首先请打电话)。 如果“结果”没有传播给父母的活动。

You can get a onActivityResult() method but you can not get the result from child activity because it is not returning result by setResult()

并且你正在告诉你检查记录,以便你有其他办法核对记录。

<>>例如

You can save username and password to preference and you can read the login details from it If details present in it then user is login and if not then you can popup login screen to user.





相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签