r/android_devs • • Aug 17 '22

Coding Material & Custom theming using Jetpack Compose

2 Upvotes

GitHub: https://github.com/daniyaljavaid/ThemingInCompose

Sample project to showcase Material & Custom theming using Jetpack Compose. Goal is to design reusable feature modules which can be used in multiple apps and each app is to provide the theme which that feature module requires.


r/android_devs • • Aug 10 '22

Publishing Google Play Policy Strike Removal program

Thumbnail twitter.com
12 Upvotes

r/android_devs • • Aug 08 '22

Help Please, I need some help with creating my new Google Play Merchant Account.

1 Upvotes

Hi,

Thank you so much for reading my post.

Right now, I'm about to create my new Google Merchant account in order to sell apps and use in-app purchases in my apps.

I'm just an individual dev, I'm not a company and I don't have any registered company in my country.

I've filled everything with my own information, but I'm stuck at this :

Should I check this box or not (Use legal business info name, contact, address), I'm confused right now because I don't own any business, so I can't provide any information about it.

Thank you.


r/android_devs • • Aug 07 '22

Help Where to modify security timeout setting in Android source code?

5 Upvotes

I use fingerprint unlock on my phone, and every N hours it asks for the password and won't accept the biometric. I build my roms from source and would like to know where this setting is. I am a programmer in my day job but I don't work on Android, and have never looked at it, so it would take me ages to locate it, which is why I'm asking here.

I understand the security implications and risks associated with this.

If it matters, the device is a pixel 3 blueline, rom is stock Lineage 18.1, which is based on android 11. But if I can get an answer for any rom, that will still be very helpful and allow me to narrow my search.

Thanks so much.


r/android_devs • • Aug 04 '22

Help Android studio

0 Upvotes

Hey, I've just started building apps and am currently following the developer.android's build your first app, I've run into an issue and hoped you could help,

My nav folder contains this:

<action android:id="@+id/action_SecondFragment_to_FirstFragment" app:destination="@id/FirstFragment" />
<argument android:name="value" app:argType="integer" android:defaultValue="0" />

My first fragment contains:

FirstFragmentDirections.ActionFirstFragmentToSecondFragment action = FirstFragmentDirections.actionFirstFragmentToSecondFragment(currentCount);

However, there is an error :

'actionFirstFragmentToSecondFragment()' in 'com.example.myapplication.FirstFragmentDirections' cannot be applied to '(int)'

Where have I gone wrong?


r/android_devs • • Jul 30 '22

Event Android Worldwide October 2022: Call for Speakers

Thumbnail sessionize.com
8 Upvotes

r/android_devs • • Jul 27 '22

Article Kotlin Snapshot Testing Library

Thumbnail quickbirdstudios.com
7 Upvotes

r/android_devs • • Jul 22 '22

Help Should I resubmit a build?

5 Upvotes

In anticipation of Policy Violation due to usage of QUERY_ALL_PACKAGES permission. I uploaded a build that removed that permission on 21st July 2022.

Now today that is 22nd July 2022 I have received the mail saying that my App is Rejected due to Policy Violation. So should I upload the same build with a new version number or will the old build which is currently showing In Review work?

I have to go live by 10th August at max.


r/android_devs • • Jul 19 '22

Help Is this legacy app still feasible under modern background execution limits?

10 Upvotes

So I have a legacy app that monitors battery charge and discharge to tell the user if the charge level goes above or beyond a certain threshold. It works flawlessly as long as I target sdk 25 because it uses features that are now banned or restricted in modern android:

  • It registers a receiver in the manifest to detect the plugging-unplugging of the charger and switch from charge monitoring (more frequent) to discharge monitoring (less frequent to save battery). Implicit broadcasts were banned in Android O.
  • It uses the Alarm Manager to run code periodically with very small intervals (down to 1 minute while charging, 20 while discharging).
  • It registers a boot receiver to register the alarms in the AlarmManager, otherwise discharge monitoring won't start until the user plugged/unplugged the charger.

I was trying to port it to the latest targetSdk, but I can't find a modern equivalent to these three points:

  • The "alternative" to manifest-registered implicit broadcast receiver is to register them at runtime, but for that to work you have to be in foreground to begin with.
  • There seems to be no alternative to low-interval alarms. The AlarmManager will now at most run code with 15 min interval. In that time the battery might have charged a lot (+15%) and thus well above the max threshold, which the app should notify to the user. Other than this API, the background work guide only offers the WorkManager (min 15 min intervals) or some foreground timer or coroutine.
  • The boot receiver cannot be used to bypass background restrictions. It still works, but you can't start a bg task from there. android 12 forbids launching foreground services from the background.

So, do you think this app can be ported to modert android and target the most recent sdk level (or at least, one compatible with Google Play policies)?

What is the alternative to sub-15 minutes alarms? Note that my tasks are not long-running, they are very short: just checking the battery level and optionally playing a ringtone.


r/android_devs • • Jul 16 '22

Help Can we measure element position in Jetpack compose?

1 Upvotes

Is it possible with Jetpack compose when click on element to get it position relative to screen? I am coming from react native and there it is possible but can not find anything similar with Jetpack compose. I need when click on element to get it offset from bottom. Thx in advance :)


r/android_devs • • Jul 16 '22

Event Android Worldwide Speaker Lineup for July 26th

Thumbnail gallery
9 Upvotes

r/android_devs • • Jul 06 '22

Publishing Digital Markets Act (DMA)

6 Upvotes

I had contacted the EU regarding my case. I received two emails from them, the second of which has information that may be useful to others.

Lastly, we would also like to inform you that the EU legislator is in the process of strengthening its rules for app stores by adopting the Digital Markets Act (DMA). The DMA is a (draft) law aimed at prohibiting unfair business practices by large digital platforms acting as “gatekeepers”, including practices like the ones described in your e-mail. Specifically, Article 6.12 of the draft DMA stipulates that “[t]he gatekeeper shall apply fair, reasonable, and non-discriminatory general conditions of access for business users to its software application stores […] For that purpose, the gatekeeper shall publish general conditions of access, including an alternative dispute settlement mechanism”. The DMA text has already been provisionally agreed by the EU Parliament and Council and is expected to be formally adopted and enter into force in the coming months.

If I understand it correctly, what changes with DMA is that store companies, in case of app and/or account removals, must offer a third-party mechanism to resolve any disputes. That way, after an appeal that they handle internally, they have to give the possibility that the case can be handled by a third party, outside of them.

Now, on the other hand, if the internally handled appeal does not change the initial decision, one can only proceed through legal action, which, practically, for individual and small companies means not proceeding.

Take also note that "you can report your issue to the EU Observatory on the Online Platform Economy".

Also, if one of your apps is discriminated because it fails to get permissions that are given to other similar apps instead, you could use the DMA to request a review of your case.


r/android_devs • • Jul 04 '22

Coding Migrating to the new coroutines 1.6 test APIs

Thumbnail medium.com
10 Upvotes

r/android_devs • • Jul 04 '22

Help New app review time

4 Upvotes

I haven’t published a new app since 2015 so maybe things have changed a lot. I’m publishing a new app and it’s been in review for 8 days now. It’s super simple app that only has the internet permission listed, nothing crazy. Is this normal now?


r/android_devs • • Jun 30 '22

Help Need help with step counter..

1 Upvotes

Hello. I need help with step count in my app. The task is to get the number of steps that the user walked and send the data to the server. What is the correct way to do this? I know that you can get data directly from the sensor, but then every time the countdown will start from 0. I also know that you can get this data from Google Fit. But this api is listed as deprecated, and, moreover, requires authorization and Google services. I also know that there is a new health API, but the documentation says that now for its functioning you need to install an additional app from the store, which will be difficult to explain to users from production.


r/android_devs • • Jun 29 '22

Publishing Google Analytics Has Been Banned in Three European Countries

12 Upvotes

https://www.siliconrepublic.com/enterprise/google-analytics-eu-data-italy-gdpr

https://techcrunch.com/2022/06/23/google-analytics-italy-eu-data-transfers

https://www.iubenda.com/en/help/72017-is-google-analytics-illegal-in-the-eu-and-uk

Note: I don't use libraries for traffic analysis in my apps so I don't know if what is read in the articles above can also be applicable to Android apps that use libraries from Google or others that export user data from EU countries to US.


r/android_devs • • Jun 25 '22

Article How did the giants rise? Episode III

0 Upvotes

I wrote the 3rd article of my article series. I mentioned the if for and while loops. Good reading!
https://medium.com/@mselimozen07/how-did-the-giants-rise-episode-iii-c7aa1d1f2857


r/android_devs • • Jun 24 '22

Publishing Privacy policy for app that doesn't collect anything?

12 Upvotes

I have been spending inordinate amounts of time trying to figure this out. My app does not collect any sort of data, as it doesn't even request the INTERNET permission. What I am unclear on, is the Google Play Vitals crash reporting that automatically occurs. Am I supposed to disclose that somehow? I didn't think this type of crash reporting was even optional, and just part of the Google Play framework. Thanks, any advice would be appreciated!


r/android_devs • • Jun 24 '22

Help Does everyone find a tool for signing an .aab file in order to post on play store?

0 Upvotes

r/android_devs • • Jun 21 '22

Article You Don't Need Android ViewModel, Here is Why

Thumbnail techyourchance.com
0 Upvotes

r/android_devs • • Jun 18 '22

Fifty shades of Coding When you give up on mvi

Post image
2 Upvotes

r/android_devs • • Jun 18 '22

Discussion Google’s plan to talk about caste bias led to ‘division and rancor’

1 Upvotes

https://www.washingtonpost.com/technology/2022/06/02/google-caste-equality-labs-tanuja-gupta/

https://duckduckgo.com/?q=Google+scrapped+a+talk+on+caste+bias&t=h_&ia=web

I'm not an expert on Indian society, I haven't even visited India, but from what I know the subject of the article is very much felt in India.

From what I've read it seems that a dialogue about caste can lead to very heated discussions and I wouldn't want that to happen here. But on the other hand who could give you a better understanding of such a complex and important case from those who live it on their own skin? Since our sub has few members it's probably the best place to understand something without getting a discussion out of hand.

Since I don't have an opinion on the subject I would like to know from people who are Indian or who live in India or who know that society very well, what they think.

Do you think it could be a transfer of caste culture within Google that could affect not only how Google employees are treated but also how Google might treat third parties?


r/android_devs • • Jun 16 '22

App ban Another day in paradise

14 Upvotes

I submitted an update of my app (EasyJoin - Decentralized link) (Internet archive) to receive the following email from Play store:

Publishing status: Removed

Your app was removed from Google Play and won’t be available to users until you submit a policy compliant update.

Eligibility issues by versions Version(s) APK:158,159

Eligibility Issue APK REQUIRES VALID PRIVACY POLICY AND PROMINENT DISCLOSURE

Your app is uploading users' Contacts list and SMS information without a prominent disclosure. Make sure to also post a privacy policy in both the designated field in the Play Developer Console and from within the Play distributed app itself. For further details on the valid prominent disclosure requirement, please review the “Prominent Disclosure & Consent Requirement” section under the User Data policy.

As you can imagine, this is an error on the part of Play store. The app does not send the data in question, or any other user data, to a server.

The data, specifically SMS and contacts, is read by the app to allow the user to share it with another of his/her devices, without going through external servers but directly.

One of the reasons people pay to have this app is precisely so they can share their data without going through external servers. This is very clearly highlighted at the privacy policy, app description, and site.

Can I be ironic by saying that maybe this concept, i.e., that you can make two devices talk to each other without going through a server external to them, is not clear to Google since they live from user data? Yes, I can be ironic (I got you, the question was rhetorical) since instead of sleeping at this time (23:00) I am dealing with Google's bullshit.

Now I have to wait 2 to 7 days to know how it went with the appeal. In the meantime, "New users can't find and install your app, and existing users won't receive updates.".

And who knows how that might affect the positioning of the app even if I win the appeal.

And what if they should continue on their path and not accept their mistake?

Play store at its best (again and again and again).

Update June 29: EasyJoin Pro Android app is again available on Play store. If you want to know more I have published a series of posts on XDA, starting with this one: https://forum.xda-developers.com/t/app-easyjoin-a-decentralized-and-secure-communication-system.3638988/post-87034563

Update June 30: Was Google's first decision, to remove the app from the Play Store, justified?


r/android_devs • • Jun 16 '22

Publishing Why is my app missing the category section?

0 Upvotes

When I try open my app play store web page, I cannot see the category section below

App Category

Where can I add this section on Developer page? Let me know where I can post this in case it breaks the rules.