intent

android android.provider.MediaStore.ACTION_VIDEO_CAPTURE return null onActivityResult with nexus 7

匿名 (未验证) 提交于 2019-12-03 02:06:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using intent for record video. so i use following code on recordVideo button's click Videofilepath = ""; Intent intent = new Intent(android.provider.MediaStore.ACTION_VIDEO_CAPTURE); startActivityForResult(intent,REQUEST_VIDEO_CAPTURED); and in onActivityResult protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (resultCode == Activity.RESULT_OK) { switch (requestCode) { case IMAGE_PICK: this.imageFromGallery(resultCode, data); break; case IMAGE_CAPTURE: this.imageFromCamera(resultCode, data); break; case

How to protect background service/alarms to be kill in newly launched devices in customized OS like oppo - coloros, vivo-funtouch os, Xiomi-MIUI os?

匿名 (未验证) 提交于 2019-12-03 02:06:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a WakefulBroadcastReceiver with IntentService , every half hour alarm called and doing some stuff. I have already handle doze mode with setExactAndAllowWhileIdle() method. Some new smart phones with customized os recently launched in market they have their own customized os based on android os. Like oppo with color os, vivo with funtouch os, xiomi with MIUI os. In the OSs there is a feature to clear memory. They have one touch clear memory option. for example if user clear recent app list or remove app from recent app list app's all

Using Crop intent Getting java.lang.SecurityException: Unable to find app for caller android.app.ApplicationThreadProxy@4266ae80

匿名 (未验证) 提交于 2019-12-03 02:06:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am using crop intent to crop the image,most of time it run fine,but sometime getting java.lang.SecurityException: Unable to find app for caller android.app.ApplicationThreadProxy@4266ae80 I attached logcat , 08 - 07 11 : 33 : 21.190 : I / BugSenseHandler ( 3337 ): Registering default exceptions handler 08 - 07 11 : 33 : 21.230 : I / BugSenseHandler ( 3337 ): Flushing ... 08 - 07 11 : 33 : 21.230 : I / BugSenseHandler ( 3337 ): Registering default exceptions handler 08 - 07 11 : 33 : 25.104 : D / AndroidRuntime ( 3629 ): Shutting

What are alternative ways to launch my app?

匿名 (未验证) 提交于 2019-12-03 02:05:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I can launch my app by: Tapping on its icon in launcher Registering "visible" intent-filter (I mean - user clicks for example "Send with.." then chooses my app) Entering numeral code in dialer and "call" - "invisible" intent, user cannot choose app, he just enters code Are there any other ways to launch my app? (I'm mostly interested in something else like "invisible" intent from paragraph 3). Assume that we have clean device only with default system apps (most popular of Google apps are also counted as default) and my app Ways for usual

Context.startForegroundService() did not then call Service.startForeground()

匿名 (未验证) 提交于 2019-12-03 02:05:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using Service Class on the Android O OS. I plan to use the Service in the background. The Android recommendation states that startService should use startForegroundService. If you use startForegroundService, the Service throws a Context.startForegroundService() did not then call Service.startForeground() error. What's wrong with this? 回答1: From Google's docs on Android 8.0 behavior changes : The system allows apps to call Context.startForegroundService() even while the app is in the background. However, the app must call that service's

Android create shortcuts on the home screen

匿名 (未验证) 提交于 2019-12-03 02:03:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: What I want to do is: 1) I'm inside an activity, there are 2 buttons. If I click the first one a shortcut is created in my home screen. The shortcut open an html page that has been previously downloaded, so I want it to use the default browser but I don't want to use internet cause I already have the page. 2)The second button create another shortcut that starts an activity. And i want to pass to the activity some extra arguments (As strings for example)........... Are those things possible? I found some link and some similar questions like

kotlin.TypeCastException: null cannot be cast to non-null type com.midsizemango.databasekotlin.Note

匿名 (未验证) 提交于 2019-12-03 02:03:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to code my app in Kotlin, but I am getting null cannot be casted to non-null type and app force stops when I open EditNoteActivity at EXTRA_NOTE probably. Any Help is Highly Appreciated Code: class EditNoteActivity : AppCompatActivity() { var note: Note? = null private val editNote: TextView? = null private val fabdrwble: Boolean? = null private val notesData: MutableList ? = null private var databaseHelper: DatabaseHelper? = null private val save: Boolean? = null private var saveButton: FloatingActionButton? = null private val

Failed to resolve target intent service, Error while delivering the message: ServiceIntent not found

匿名 (未验证) 提交于 2019-12-03 02:03:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I try to make gcm work. When our server sends a push notification I got these two errors in my app's log: E/GcmReceiver(8049): Failed to resolve target intent service, skipping classname enforcement E/GcmReceiver(8049): Error while delivering the message: ServiceIntent not found. In my app's folder I got the google-services.json file. I have added the 2 needed services and the receiver to my Manifest: I have also added these two as java classes. The gcm token providing and uploading to our server's is fine. I also got the push

NullPointerException On Android.os.Bundle

匿名 (未验证) 提交于 2019-12-03 02:01:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have some problem with my code, when I need to transfer some data from one Activity to another one. First Activity ( ViewCashflow ) and I want transfer some data from ViewCashflow to second Activity ( NewTransaction ). Here its working well with no error, the data transferred successfully. But, I don't know what's going on when I run the second Activity directly (not from first Activity like before when I transfer the data) I got null pointer exception on the method that I use to receive the data from first Activity . I have tried to

android eclipse button OnClick event

匿名 (未验证) 提交于 2019-12-03 02:01:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have 2 files: main_activity.xml and home.xml. I made a button in main_activity.xml Here is the code snippet: And then, I have my home.xml. I want the button to open up home.xml. How can i do this? I don't know any java and I am new to android development. Here is my home.xml below: And below is my AndroidManifest.xml: And that's all I have. Please, if you reply, tell me where to add the code such as the directory or between code snippets. 回答1: For managing click activity in android ,you can do as below Implement OnClickListener on