android-intent

Permission Denial: opening provider android.support.v4.content.FileProvider

亡梦爱人 提交于 2019-12-24 07:57:20
问题 I was having some problem when trying to perform an application upgrade in Android emulator. The flow of the scenario is from an Activity, I will execute AsyncTask A which open up fragment A , then inside AsyncTask A , I will check if version upgrade is available. If available and user selected "Okay" from fragment A , I will proceed to AsyncTask B to open up fragment B which show a message to user saying that upgrading is in process. In AsyncTask B doInBackground() , I will execute the

My Broadcast receiver get execute even if my application is not working

99封情书 提交于 2019-12-24 07:45:46
问题 My broadcast receiver is Still getting execute even if My application is not working. as an example I am using android.intent.action.NEW_OUTGOING_CALL to check outgoing call and than i stop music and push notification .. but even i close my app and kill all task and after if i call than i get notification of my app.. So how do i manage to work my broadcast when i am using my app. I have crated Service to play music and 2 broadcast receiver file for incoming and outgoing. Help to solve this

Updating app widget on orientation change

余生长醉 提交于 2019-12-24 07:45:25
问题 I have an app with a main activity and an app widget. The app widget needs to be updated whenever the screen orientation changes (it computes its bitmap size and this depends on the current orientation). How can I cause the widget to update on orientation change? I found the ACTION_CONFIGURATION_CHANGED event but am not sure how to use it since the documentation say that it cannot be registered in the manifest. If it helps, I already have a BroadcastReciever that updates the widget on

Android Error Cancelling event due to no window focus

给你一囗甜甜゛ 提交于 2019-12-24 07:39:36
问题 I am learning Android, and trying to make multi screen app to get better at it. I have 3 activities. 1) Main 2) Game 3) GameOver Main has game button, when pressed starts intent for the Game Activity. And after timer finishes in Game, I pass score variables to GameOver Activity over intent. This flow works fine. But when I press back button after I see results in GameOver activit, the app minimizes. When I unMinimize the app it shows the Main activity screen (which actually want, but without

Unable to set proper Context to cancel alarmmanager

怎甘沉沦 提交于 2019-12-24 07:31:21
问题 I have created an alarm with a notification and a button to stop the alarm but it seems that there is some issue with the Context that I have to get in order to cancel the AlarmManager . I have researched a lot and I think I have applied most of the things I found but somehow can't get this to work. I am aware the PendingIntent has to be the same and it appears to me they are with the same request codes too. AlarmSlave.class - Sets Alarm public class AlarmSlave /*extends Service*/ { private

force open android app through schema

☆樱花仙子☆ 提交于 2019-12-24 07:09:39
问题 Here is my story. I have an android app that shares my website link. on Android devices I want to check if the user has my android app open android application and show corresponding content to that link, but if do not have my app open up that link in the browser. I use DeepLinkDispatch for this, but I have a problem, when user click on shared link, android ask client to choose which app open this link (include my app), but i want to force open my app. (if installed on device) 回答1: That is

How to start an activity upon the completion of a timer?

北慕城南 提交于 2019-12-24 06:46:09
问题 I'm trying to start a new activity "SMS.java", if I dont respond to my timer within 30secs. After 30secs, the new ativity should be started. Can anyone help me out??? The class Timer on line 5 extends a CountDownTimer.. Here's the code: //TimerAct.java public class TimerAct extends Activity { static TextView timeDisplay; Timer t; int length = 30000; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);

want to close application completely

我只是一个虾纸丫 提交于 2019-12-24 06:44:29
问题 i want to close my whole application. i have tried out finishActivity() on back press but it doesn't work. I want to close my application on back press event completely. How could i do it? public void onImageViewClicked(View view){ switch(view.getId()){ case R.id.viewStk: intent = new Intent(MainActivity.this,ViewStkActivity.class); startActivityForResult(intent, 12); break; case R.id.about: Intent aboutIntent = new Intent(MainActivity.this,AboutActivity.class); startActivity(aboutIntent);

Overriding the Activity/Task behavior in Android

自古美人都是妖i 提交于 2019-12-24 06:42:05
问题 I'm writing a simple Android app, and I'd like better control over the navigation/relationship between the activities. I don't want my activities to act like android activities...I don't want them to stack up within the Task. I want one Activity (let's call it MainActivity ) to be the landing point and always be at the bottom of the stack, and I want only one instance of my second activity (call it SecondActivity ) to be above it in the stack...would be nice to reuse it as well. I thought I

My Program stops after 2nd intent in android

孤街醉人 提交于 2019-12-24 06:42:04
问题 My android application stops after startActivity () call of my 2nd intent. It works perfectly for the first time with intents. But on the 2nd time its control doesn't pass to 3rd activity. I haven't displayed anything on 2nd activity. Is it the problem? Or is something with my AndroidManifest.xml file? Can some one help me? I have added the intent filter of three activities as shown below.Is it the problem? I am new to android so please help me! <intent-filter> <action android:name="android