activity

Google sign in failed after frequent signing in and out

匿名 (未验证) 提交于 2019-12-03 02:31:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I can sign in my app with Google account at first several times. Everything is fine. But if I sign in and out about 20 times in a one or two minutes. Google sign in failed and in onActivityResult function, it returns error code 12501, resultCode = 0; I'm using the phone: Nexus 6, Android 5.1.1 Here is my code: private GoogleSignInOptions mGso; private GoogleApiClient mGac; public void init(@NonNull final BaseActivity activity) { mGso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN) .requestIdToken(activity.getString(R

Prevent new activity instance after clicking on notification

匿名 (未验证) 提交于 2019-12-03 02:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: application (non-wanted) behavior - application is started, some text is put into text-box and notification is created through button action. user "clicks" the home button, application is "minimized", notification is available in bar user selects the notification and the application is "maximized" BUT - instead of the original instance, new instance is started (e.g. in the newest instance is missing the original text; when the latest instance is closed there is still the original instance with original text ) . the code of the notification

Can't call a Bluetooth BroadcastReceiver method in a Service

匿名 (未验证) 提交于 2019-12-03 02:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have this Service class: public class BluetoothService extends Service { private static Activity mActivity; @Override public IBinder onBind(Intent intent) { return null; } @Override public void onCreate() { IntentFilter intentFilter = new IntentFilter(); intentFilter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED); this.registerReceiver(bluetoothReceiver, intentFilter); } @Override public void onDestroy() { if (bluetoothReceiver != null) { this.unregisterReceiver(bluetoothReceiver); } } @Override public void onStart(Intent intent, int

How to obtain Changeset of an activity?

匿名 (未验证) 提交于 2019-12-03 02:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: We are able copy to clipboard changeset of our activities. But often we need to get changeset of our team member's activities. We are able to see it through GUI. but we would like to copy the list of changeset to some text file. Is it possible to get changeset using cleartool? I was trying with following command but still it fails V:\>cleartool lsactivity -l "PBI#503# to Model"\@My_PVOB This is the error i got : cleartool: Error: Unable to determine VOB for pathname "My_PVOB". V: is the drive where my integration stream is mapped 回答1: You

fitsSystemWindows on Fragment, Activity and DrawerLayout combination

匿名 (未验证) 提交于 2019-12-03 02:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Problem The activity layout has a DrawerLayout with a FrameLayout as content to Fragment and a LinearLayout to be opened and closed by drawer. The fragment used on content has a FrameLayout with fitsSystemWindows flag and a Toolbar . If I insert the fragment at onCreate() all occurs as expected, the FrameLayout starts on position 0 and the Toolbar starts below the statusbar. But outside the onCreate() the same code fails, the fitsSystemWindows not works with FrameLayout . An important point, I need the Toolbar and fitsSystemWindows flag on

“Tag <Activity > attribute name has invalid character ' '. ” Android Mainfest

匿名 (未验证) 提交于 2019-12-03 02:26:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am getting the error "Tag attribute name has invalid character ' '. " in the Android Manifest, while there is no obviously invalid character. Here is the code: <activity android:name="Quiz 31" android:configChanges="orientation|keyboardHidden" android:label="Quiz 31" android:screenOrientation="portrait" android:theme="@android:style/Theme.NoTitleBar" > <intent-filter> <action android:name="com.SoulSlayerAbad.AMQ.QUIZ31" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity> As you can see, no ' '

Android - Build a notification, TaskStackBuilder.addParentStack not working

匿名 (未验证) 提交于 2019-12-03 02:24:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to launch an activity from a notification like the Android docs explain, but when I open the notification and then press the back button, the HomeActivity (parent) doesn't open, instead the application closes. What am I doing wrong? Intent resultIntent = new Intent(context, MatchActivity.class);; resultIntent.setFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK); TaskStackBuilder stackBuilder = TaskStackBuilder.create(context); // Adds the back stack for the Intent (but not the Intent itself) stackBuilder.addParentStack(MainActivity.class)

Start activity from preference-headers

匿名 (未验证) 提交于 2019-12-03 02:24:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm implementing n-layer PreferenceActivities 1st layer PreferenceActivity is loaded from preference-headers. First header creates fragment of settings which is a PreferenceFragment. Second is a browser activity (2nd is an example from developer.android.com) which opens specified Url. The third one I want to be a next level of PreferenceAtivity that also will be loaded from preference-headers. First two work fine but 3rd is crashing an app with the exception: "android.content.ActivityNotFoundException: No Activity found to handle Intent {

Codeigniter random session logouts (Already tried override session class AND raising session_time_to_update

匿名 (未验证) 提交于 2019-12-03 02:23:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have tried both suggestions at: Codeigniter session bugging out with ajax calls But even with $config['sess_time_to_update'] = PHP_INT_MAX I am still seeing random logouts. I also took the suggestions of creating class MY_Session User's are still reporting random logouts and my logs also seem to indicate this. EDIT: Here is my session config: $config['sess_cookie_name'] = 'phppos'; $config['sess_expiration'] = 86400; $config['sess_expire_on_close'] = TRUE; $config['sess_encrypt_cookie'] = FALSE; $config['sess_use_database'] = TRUE; $config

send intent from service to activity

匿名 (未验证) 提交于 2019-12-03 02:22:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to return the result from an IntentSerivce to the mainactivity using an intent, but I can't get it to work. The IntentService receives the intent from the activity without a problem, does it's thing and gets a JSONstring . Now the only problem left is to send this String back to the activity. Here is the method in the mainactivity: public String RTConn(String query){ System.out.println("Querying Rotten Tomatoes."); Intent rtIntent = new Intent(MainActivity.this, RTConnection.class); rtIntent.putExtra("query", query); bindService