intent

Group menu items work but don't display checkmark

匿名 (未验证) 提交于 2019-12-03 02:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 选择语言 中文(简体) 日语 英语 中文(繁体) 由 翻译 强力驱动 问题: I have a working app with an overflow menu. All the code in the menu works, but no checkmarks are being shown after I click on a single-clickable, grouped menu item. Am I doing something fundamentally wrong? I thought that this displaying of the checkmark was automatic to Android and that the system would do this for me. Android knows it is in a group, it knows that only one can be selected, and it knows which one I selected! So..... Android should know how to display the checkmarks. Code XML <menu xmlns

Copy Image from FilePicker/Intent to another Directory

匿名 (未验证) 提交于 2019-12-03 02:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to copy Image i receive from Intent to another directory. But I am unable to get it working yet. Need Help. My Logcat: Source: protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (resultCode == Activity.RESULT_OK) { switch (requestCode) { case SELECT_PICTURE: { Uri selectedImageURI = data.getData(); if (Build.VERSION.SDK_INT < 19) { String selectedImagePath = getPath(selectedImageURI); Bitmap bitmap = BitmapFactory.decodeFile(selectedImagePath);

Android - Unable to receive local broadcast in my activity from service

匿名 (未验证) 提交于 2019-12-03 02:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have my main activity that start a service (Location service) and I want that service to broadcast the new location each time a new location is found. Thanks to the log I know the service is working and I have new locations every seconds or so, but I never get the broadcast. MainActivity.java public class MainActivity extends Activity { private static final String TAG = "mainActivity"; private CMBroadcastReceiver mMessageReceiver = new CMBroadcastReceiver(); /** Called when the activity is first created. */ @Override public void onCreate

Embed external Intent in main Activity

匿名 (未验证) 提交于 2019-12-03 02:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have seen a number of examples of using an ActivityGroup to embed multiple Activites in a single view. In each of these cases, the Activities being loaded are internal to the current application. In addition, they all appear to take over the entire view. I would like to start an external Activity using an Intent for a particular mime type. Specifically, if the device has a PDF viewer installed, I would like to start that Activity to view a PDF. However, I would like it to appear within the View of my running application Activity, keeping

Processing notifications in Xamarin Forms Android

匿名 (未验证) 提交于 2019-12-03 02:33:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm using the library https://github.com/aritchie/notifications and I can create and schedule notifications properly. I wish to process them in Android so that depending on the notification - it will navigate to a particular page when the user taps on it. I've found that the below event is fired when I tap on a notification (in my Android Project) protected override void OnNewIntent(Intent intent) { } However, I can't find any info in the intent from my notification in order to build up navigation to a particular page. Any advice would be

Button Listener not get registered on first click In android

匿名 (未验证) 提交于 2019-12-03 02:33:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: As i am new to android here i got the problem for button listeners I am using OnClickListener for busttons but it doesnot performs after first click once i click more than one it performs well but how to make it possible on first click it self here is my code: public class DashbordActivity extends Activity implements OnClickListener { ImageButton btnLogout , btnSearch , btnOENew , btnAENew , btnSync ; // Session Manager Class SessionManager session = null ; @Override protected void onCreate ( Bundle savedInstanceState ) { super .

c2dm : how to receive the message in the device? (using PHP)

匿名 (未验证) 提交于 2019-12-03 02:33:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have the registration id and auth token for c2dm. And then I pass store these values in db. and using php, i could send one message to c2dm server. But my problem is I dont know how to receive the message in the application. I am not sure whether my way of getting the message is correct or not. Anyway i will give it below. I have one activity which registers to the c2dm using registration intent. and one receiver to receive the reg_id and notification message. it is registering with c2dm and not to receive message. manifest <intent-filter>

Samsung Intent For OnActivityResult coming Null when call camera

匿名 (未验证) 提交于 2019-12-03 02:33:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using following code to get picture from camera. Except samsung it is working fine in other mobiles. please let me know what i am doing wrong. final File root = new File(Environment.getExternalStorageDirectory() + File.separator + "temp" + File.separator); root.mkdir(); final String fname = "img_" + System.currentTimeMillis() + ".jpg"; final File sdImageMainDirectory = new File(root, fname); outputFileUri = Uri.fromFile(sdImageMainDirectory); // Camera. final List<Intent> cameraIntents = new ArrayList<Intent>(); final Intent

Error: java.lang.NullPointerException: Attempt to invoke virtual method &#039;android.content.res.XmlResourceParser

匿名 (未验证) 提交于 2019-12-03 02:33:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am getting this error.I am new to android studio and i need to create this plugin for unity to install an apk at runtime Error - Attempt to invoke virtual method 'android.content.Context Android.content.Context.getApplicationContext()' on a null object reference Plugin Class - package com.example.unitypluginappinstall; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.net.Uri; import android.support.v4.content.FileProvider; import java.io.File; public class PluginClass extends

Android - getting “can&#039;t deliver broadcast” error on dynamically registered broadcast receiver

匿名 (未验证) 提交于 2019-12-03 02:33:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to perform a relatively simple task: I have a fragment that starts a service to pull some JSON from a remote server. I then want to pass that JSON back to the original calling fragment using a broadcast, with the BroadcastReceiver defined as an anonymous class in the fragment. However, whenever I try to do this, I keep getting the following error: E/AndroidRuntime: FATAL EXCEPTION: main Process: com.roundarch.codetest, PID: 21974 android.app.RemoteServiceException: can't deliver broadcast at android.app.ActivityThread$H