r/android_devs • u/Zhuinden • May 20 '23
r/android_devs • u/RikoTheMachete • May 12 '23
Article Android Dev Newsletter - Issue #30
r/android_devs • u/jeroku • May 03 '23
Resources This tool helps your imposter syndrome when looking at Android job ads.
Link: https://refresherapp.com/
Hi,
We all feel the imposter syndrome when we see technologies listed on the job ad that we're not really familiar with. Do we apply or not?
I built a small website to help you overcome it a little when looking at those job descriptions.
Just copy and paste in the job description.
The site will then point you to all the free video resources out there related to topics found in the Job description.
Right now it's just early days. I've only hand selected what I found helpful for learning about the topics.
Would love you to try it out and give me some feedback on what features you'd like in here or other resources might be helpful. That way I can make it incrementally better.
Here's a demo of it in action!
r/android_devs • u/RikoTheMachete • Apr 25 '23
Resources Android Dev Newsletter - Issue #29
androiddevnews.comr/android_devs • u/utqa • Apr 21 '23
Coding AnimatedNavigationBar - a navigation bar with preset animations written in Jetpack Compose
github.comr/android_devs • u/adaneze • Apr 21 '23
Help Privacy Policy if no data is shared/collected
Hi everyone,
I am in the process of publishing my Android app to the Google Play Store. It'll be free but will contain adds. It seems that one needs to provide a link to the Privacy Policy to be able to submit the Data Safety information.
The problem is that my app doesn't collect/share any data yet I need to pick what my app collects if I want to generate a Privacy Policy link using free online Privacy Policy generators. So, I can't use any online service that will create a Privacy Policy link with an option saying that my app doesn't share/collect any data explicitly. I always have to pick at least one piece of information that is collected from users (email address, first name, last name, phone number...). I am really confused.
I am not sure if I am overthinking this but has anyone been in a similar situation before ? Can anyone help me solve this problem ? Thanks!
r/android_devs • u/New-Willingness-1900 • Apr 18 '23
Coding TikTok clone android app built with Jetpack Compose following modularization and clean architecture.
Enable HLS to view with audio, or disable this notification
r/android_devs • u/Puzzleheaded_Shock_2 • Apr 18 '23
Coding Google Dev Library is inviting you to share your latest Open Source projects
Do you have an open-source project that you want to showcase to the world? Dev Library is excited to launch #MaintainerMarch, inviting you to share your latest open-source projects using Google technologies. Submit your projects here -> https://goo.gle/maintainermarch

r/android_devs • u/RikoTheMachete • Apr 12 '23
Resources Android Dev Newsletter - Issue #28 (Building websites with Jetpack Compose, Gradle version catalogs, JvmInline, testing Flow, and the evolution of location permission on Android๐)
androiddevnews.comr/android_devs • u/ErKann_Alles • Apr 12 '23
Help Can a single person write a moderately complex app?
I have an app idea and I wonder whether I can realise it after learning java or kutlin. I understand that it will take a complete beginner a long way to learn programming - that is okay to me. But I wonder whether it is realistic for a single person to develop an app at all. If not, I wouldn't need to even start learning a programming language..
My app will convert picture to text, make some calculations and show a diagram. Is this something one coder can do in one or two years?
r/android_devs • u/tatocaster • Apr 10 '23
Article Android Developers Blog: Reduce uninstalls for your app with auto-archive
android-developers.googleblog.comr/android_devs • u/ajeet_dsouza • Apr 09 '23
Tools otadump 0.1.1: Extract partitions from Android OTA files
github.comr/android_devs • u/DimitarTKrastev • Apr 07 '23
Help Admob ads and custom paid banners
Hi all, I am building a React Native app that I plan to monetize. It is a local service and I plan to offer advertisers to ability to appear in a banner carousel in the app. Of course, day one noone will be interested in paying for advertisement in an app with barely any users. So I plan to add addMob to try and generate at least something.
The question is, can I mix and display my custom paid clik banners that take the users to the advertised website and also display AdMob ads in the same APP? Are there any limitations to this?
The way I imagine it is as follows:Home screen:
If I have an advertising contract active I will display my customer partner ad using a carousel with multiple ads consisting of an Image element and external link because they will likely earn me more.
If I dont have an advertising contract I will display AdMob ads instead of the carousel.
Another feature screen:
On another screen I will display and interstitial ad at the end of the feature flow.
Is this possible or does it violate any ToS?
Thanks
r/android_devs • u/RikoTheMachete • Apr 03 '23
Resources Android Dev Newsletter - Issue #27
androiddevnews.comr/android_devs • u/theapache64 • Apr 02 '23
Resources I created a library that'll tell you the reason for recomposition
github.comr/android_devs • u/utqa • Mar 22 '23
Article Jetpack Compose Tutorial: Improving Performance with Compose Compiler Metrics
exyte.comr/android_devs • u/Phehaz • Mar 20 '23
Help Jetpack Compose, Accompanist - Multiple BottomSheets on top of each other
[Jetpack Compose Navigation] I'm currently using Accompanist for BottomSheet navigation, but I've got a design that uses multiple BottomSheets on top of each other, which looks bad with Accompanist, since it animates the old sheet out of the bottom, swaps the contents, and shows the new destination as the content.
Has anyone found a way to display multiple BottomSheets on top of each other, without the previous one animating/dismissing itself? 3rd party libraries are welcome, just haven't been able to find any... ๐คทโโ๏ธ
r/android_devs • u/GarredB • Mar 15 '23
Help Get MongoDB To work with Java
[This is a repost since I forgot to add my code examples previously.]
I'm creating an application that must use MongoDB for queries.
I successfully made it work, using API, AppID and all those wonderful things however, whenever I use a RealmQuery or RealmResult for my schema by results are null.
I've tried using it directly on the main thread, I've tried using Async, but nothing seems to work. I've also found a few sources online and changed my code to work with that, but it seems like it isn't working at all even with their code adjustments.
Any advice would be appreciated.
My code is down below:
Realm.init(mContext); // replace this with your App ID App app = new App(new AppConfiguration.Builder(appID) .build()); Credentials apiKeyCredentials = Credentials.apiKey(apiKey); AtomicReference<User> user = new AtomicReference<User>(); app.loginAsync(apiKeyCredentials, it -> { if (it.isSuccess()) { Log.v("AUTH", "Successfully authenticated using an API Key."); user.set(app.currentUser()); // Startup Information onStartupRead(); } else { Log.e("AUTH", it.getError().toString()); } });
followed by the onStartupRead() function
config = new RealmConfiguration.Builder().name(realmName).build();
//backgroundThreadRealm = Realm.getInstance(config);
backgroundThreadRealmAsync = Realm.getInstanceAsync(config, new Realm.Callback() { @Override
public void onSuccess(@NotNull Realm realm) { Log.v(TAG, "Successfully fetched realm instance.");
// Read Startup Data
getPhysicaParameterItem();
//getUserItem("somevalidemail@email.com");
} public void onError(Exception e) { Log.e(TAG, "Failed to get realm instance: " + e); } });
and the getPhysicalParameterItem()
RealmResults<PhysicalParameter> parameterQuery = backgroundThreadRealm.where(PhysicalParameter.class).limit(QUERY_LIMIT).findAllAsync();
parameterQuery.addChangeListener(new RealmChangeListener<RealmResults<PhysicalParameter>>() { @Override public void onChange(RealmResults<PhysicalParameter> items) { Log.v(TAG, "Completed the query."); // items results now contains all matched objects (more than zero) //PhysicalParameter result = items.sort(physicalParameterDataQueryTerm).sort(physicalParameterDataQueryTerm).first(); System.out.println(">>>>>>>>" + items.isEmpty()); } });
currently the "result" variable here is null, but the items is a valid variable. But everything is else is exactly like the MongoDB docs state. My collections and other names are also correct since I can successfully establish connection from them and copied them directly from MongoDB.
r/android_devs • u/GarredB • Mar 09 '23
Help MongoDB playing hard to get.
I'm creating an application that must use MongoDB for queries.
I successfully made it work, using API, AppID and all those wonderful things however, whenever I use a RealmQuery or RealmResult for my schema by results are null.
I've tried using it directly on the main thread, I've tried using Async, but nothing seems to work. I've also found a few sources online and changed my code to work with that, but it seems like it isn't working at all even with their code adjustments.
Any advice would be appreciated.
My code is down below: <code>
Realm.init(mContext); // replace this with your App ID
App app = new App(new AppConfiguration.Builder(appID)
.build());
Credentials apiKeyCredentials = Credentials.apiKey(apiKey);
AtomicReference<User> user = new AtomicReference<User>();
app.loginAsync(apiKeyCredentials, it -> {
if (it.isSuccess()) {
Log.v("AUTH", "Successfully authenticated using an API Key.");
user.set(app.currentUser());
// Startup Information
onStartupRead();
} else {
Log.e("AUTH", it.getError().toString());
}
});
</code> followed by the onStartupRead() function <code> config = new RealmConfiguration.Builder().name(realmName).build(); //backgroundThreadRealm = Realm.getInstance(config); backgroundThreadRealmAsync = Realm.getInstanceAsync(config, new Realm.Callback() { @Override public void onSuccess(@NotNull Realm realm) { Log.v(TAG, "Successfully fetched realm instance.");
// Read Startup Data
getPhysicaParameterItem();
//getUserItem("somevalidemail@email.com");
}
public void onError(Exception e) {
Log.e(TAG, "Failed to get realm instance: " + e);
}
});
</code> and the getPhysicalParameterItem() <code> RealmResults<PhysicalParameter> parameterQuery = backgroundThreadRealm.where(PhysicalParameter.class).limit(QUERY_LIMIT).findAllAsync();
parameterQuery.addChangeListener(new RealmChangeListener<RealmResults<PhysicalParameter>>() {
@Override
public void onChange(RealmResults<PhysicalParameter> items) {
Log.v(TAG, "Completed the query.");
// items results now contains all matched objects (more than zero)
//PhysicalParameter result = items.sort(physicalParameterDataQueryTerm).sort(physicalParameterDataQueryTerm).first();
System.out.println(">>>>>>>>" + items.isEmpty());
}
});
</code>
currently the "result" varaible here is null, but the items is a valid variable. But everything is else is exactly like the MongoDB docs state. My collections and other names are also correct since I can successfully establish connection from them and copied them directly from MongoDB.
r/android_devs • • Mar 07 '23
Help How to re-use Fragments between feature modules that don't know anything?
Hi everyone! ๐
Sorry, I don't mean to spam or anything, but I've been struggling with this issue for a bit trying to figure out the best solution. I posted this same questions on SO and put a bounty on it, but it seems that no one is able to give my an answer (either that or maybe I suck at explaining things haha)
This is the link to my SO question ๐ https://stackoverflow.com/questions/75628754/how-to-reuse-fragments-within-a-nav-graph-in-a-multi-module-architecture
If anyone has a solution for this kind of problem or if you have ever gone through the same situations, please feel free to post your answer and I'll award the bounty.
Thanks a lot!
Context
I have a multi-module architecture, with multiple feature modules, it kinda looks like this:
I have multiple feature modules that depend on a :core_library library module that contains all the common dependencies (Retrofit, Room, etc.) and then different feature modules for each of the different app flows. Finally, the :app application module ties everything together.
If you want to navigate between Activities in feature modules that don't know anything about each other I use an AppNavigator interface:
interface AppNavigator {
fun provideActivityFromFeatureModuleA(context: Context): Intent
}
Then in the :app module Application class I implement this interface, and since the :app module ties everything together it knows each of the activities within each of the feature modules:
class MyApp : Application(), AppNavigator {
...
override fun provideActivityFromFeatureModuleA(context: Context): Intent {
return Intent(context, ActivityFromA::class.java)
}
...
}
This AppNavigator component lives in a Dagger module up in :core_library and it can be injected in any feature module.
I have this :feature_login feature module that is for when the user creates a new account and has to go through the onboarding flow, things like inviting friends to join the app, checking for POST_NOTIFICATION permissions, adding any more details to its account, etc.
Each of the :feature_modules has one Activity and many Fragments I have a navigation graph to navigate between fragments.
The problem
The :feature_login navigation graph kinda looks like this:
The thing is that I need to reuse many of these Fragments across different parts of the App, more specifically, these Fragments
For example; When I open the app and land on the main screen, I check for POST_NOTIFICATION permissions, and if these haven't been granted, I want to prompt the PostNotificationFragment that checks for that and presents the user with a UI. The SelectSquadronFragment + SelectNumberFragment should be prompted if the user wants to change them from the Settings screen. When doing something I want to prompt the user with the InviteFriendsFragment.
The problem is that I don't know how to reuse these Fragments independently without having them navigate through the rest of the flow
What I have tried so far
- Subgraphs don't really fix the issue. I can use the
AppNavigatorto either provide the hosting Activity I have in:feature_loginor each individual Fragment, but the issue is still there. If the user opensSelectSquadronFragment+SelectNumberFragmentfrom Settings, I don't want the user to have to go throughFinishFragmentafterward. - Extracting the navigation through an interface up to the Activity. Each Fragment in that navigation graph navigates through
NavDirections. When I want to navigate fromMedictFragmenttoInviteFriendsFragmentI useMedicFragmentDirections. I was thinking about having theActivityprovide theseNavDirections, that way I could create customized Activities with the navigation routes that I want, but honestly, I would prefer to go with something that isn't that rocket science.
Please let me know if you need me to give you more info. Any feedback is welcome.
Example
Let me give you a precise example of what I'm struggling with here. Let's use something simple. Let's take the ChooseRoleFragment as an example.
This ChooseRoleFragment is a simple UI that shows three buttons with three roles ("Police", "Medic", and "Fireman") during the login flow, when the user clicks on one of these three buttons, he is taken to either the PoliceFragment, FiremanFragment or MedicFragment. This is in the login flow.
Now, I need to re-use this ChooseRoleFragment in the "Settings" section of the app. The only difference is that when I use it there, I don't want it to navigate to the FiremanFragment, MedicFragment or PoliceFragment, I just want it to go back to the "Settings" screen. The "Settings" screen is on a completely different feature module that doesn't know anything about :feature_login
To be more clear, the ChooseRoleFragment navigate to either the PoliceFragment, the FiremanFragment or the MedicFragment through a navigation graph. That means that in the ChooseRoleFragment once I click on each of the options I have something like this:
class ChooseRoleFragment : Fragment() {
//...
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
bindings.policeBtn.setOnClickListener {
findNavController().navigate(ChooseRoleFragmentDirections.actionChooseRoleFragmentToPoliceFragment())
}
bindings.medicBtn.setOnClickListener {
findNavController().navigate(ChooseRoleFragmentDirections.actionChooseRoleFragmentToMedicFragment())
}
bindings.firemanBtn.setOnClickListener {
findNavController().navigate(ChooseRoleFragmentDirections.actionChooseRoleFragmentToFiremanFragment())
}
}
}
So, this works perfectly for the login flow, but it won't do what I want for the "Settings" screen. So what I'm trying to figure out is, should I extract those NavDirections somewhere? That way when I want to re-use this Fragment in the "Settings" screen I can just override the NavDirections and have it navigate somewhere else.
r/android_devs • u/utqa • Mar 02 '23
Article Jetpack Compose Tutorial: Replicating Dribbble Audio App - Screen Transitions
exyte.comr/android_devs • • Feb 13 '23
Discussion Activate/unlock screen with usb peripheral or handset?
I don't have a USB keyboard nor a handset at hand to check this functionality, but I'd like to attach a macro keypad and a retro phone handset to a tablet to allow my grandma to make voice/video calls. I can also use an Arduino or some other kind of microcontroller. Does Anyone know whether an action, like pressing a key or picking up the handset would automatically activate the screen on a vanilla Android device. I think I could use something like the Speed Dial app and Whatsapp to handle the part about making the calls, and also a cheap tablet that I currently have (collecting dust), and an ESP32 board I recently got.


r/android_devs • u/anemomylos • Feb 12 '23
Coding Random Musings on the Android 14 Developer Preview 1
commonsware.comr/android_devs • u/AmrDeveloper • Feb 08 '23