Questions tagged android-activity

Explore the latest questions and answers asked by our top developers.

How can i create a foreground service which keeps track of which applications are being opened?

I am creating a productivity app which needs to know which apps is currently being used by the user. This is the code pertaining to the foreground service which I am using: public class DemoService extends Service { @Override public void onCreate() { super.onCreate(); Log.d("obscure_tag", "DemoService has been created!"); startForeground(1, createNotification("Click me and turn me […]

By Pro
Published
Categorized as activity-manager, android, android-activity, foreground-service

Execute code on every activity launch and result

In the past I used "startActivityForResult" and "onActivityResult". Those methods are now deprecated. Therefore I want to use the modern alternative "registerForActivityResult". Unfortunately, however, I cannot figure out a way to achieve the old functionality with this new model. I used to override "startActivityForResult" and "onActivityResult" of "AppCompatActivity" to run specific code before any activity […]

By Lyxodius
Published
Categorized as android, android-activity, kotlin

How can I change my android activity on button click? – Stack Overflow

I am new to programming and don’t know how to jump from one activity to another activity. The first Activity name is Splash and the Second one name is Home. I am trying to jump from Splash to Home. Can Anybody help me to do so? Source: Android Studio Questions

By its b a k a r
Published
Categorized as android-activity, android-studio, java, stack-overflow

Cannot navigate to other activity with pendingintent

I have defined an reactactivity on my react native app in android so my service which is when running on browser apps like chrome can navigate to if a remoteview is clicked. In my service, I set remoteview to be clickable with a goal to navigate to this activity screen: RemoteViews remoteView = new RemoteViews(getPackageName(), […]

By Kim M
Published
Categorized as android, android-activity, react-native

No matching client found for package name java

Build File : activity No matching client found for package name ‘com.androidtest.apps’ Execution failed for task ‘:app:processReleaseGoogleServices’. No matching client found for package name ‘com.anfroidtest.apps’ Source: Android Studio Questions

By Amine Dev
Published
Categorized as android-activity, android-studio, firebase, java

Android loses Bluetooth connection while switching between Activities

I am new to Android Development and I am working with Bluetooth serial communication between STM32 board and Android phone so far I have referred to these projects Simple Android Bluetooth Application with Arduino Example and Bluetooth chat example. My project has separate connectedThread Class, a MainActivity and Bluetoothactivity which handles data and bluetooth connection. […]

By andrexstack
Published
Categorized as android, android-activity, bluetooth, bluetooth-socket, java

How to call Android activity from Flutter module

I have an android project in which I added a flutter module. I can call flutter UI from activity. But how can I do it vice versa? Android Project -> MainActivty -> Flutter Module If I press the back button on flutter UI, it brings me back to the previous Activity. How can I do […]

By Abhishek VD
Published
Categorized as android, android-activity, flutter-module

fatal error when I insert a new button in an activity – AndroidStudio

Goodmorning everyone! I briefly explain the problem I need to solve. I have a MainActivity which shows a list of channels, clicking on a channel I enter a new activity (InfoActivity) which shows information and a button. If I try to add another button the following error is generated. If I remove buttonA everything works […]

By Sara
Published
Categorized as android, android-activity, android-studio, button, java

Intent for playing several videos

I want to play several videos in player that user will select, like playlist. But i only know how to play one video. Here is my code Intent intent = new Intent(Intent.ACTION_VIEW) .putExtra(MediaStore.Video.Media.TITLE, context.getResources().getString(R.string.season) + " " + season + " " + context.getResources().getString(R.string.episode) + " " + episode + " (" + title + […]

By Vitaliy Martynyuk
Published
Categorized as android, android-activity, android-intent, java

Crash with orientation change

I’m trying to make an app about ordering cakes in the android studio app anyways whenever I try and change the orientation on it to a landscape version the application crashes and I can’t figure out why here’s the log 2022-01-03 14:20:01.285 27423-27423/com.revolution.nextdessertcheckboxes E/AndroidRuntime: FATAL EXCEPTION: main Process: com.revolution.nextdessertcheckboxes, PID: 27423 java.lang.RuntimeException: Unable to start […]

1 2 3 4 133

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq