Questions tagged [android-identifiers]
59 questions
2
votes
0 answers
Can Settings.Secure.Android_ID be null?
I'm looking to use Settings.Secure.Android_ID in my app. However I was wondering if it could ever be null. According to one of the answers on the topic in 2010 it could be null (Is there a unique Android device ID?). However the Android official doc…
![](../../users/profiles/4884605.webp)
H.Nguyen
- 1,241
- 2
- 15
- 21
2
votes
0 answers
Android Studio deletes ids used by kotlinx.android.synthetic
In Android Studio, when generating an APK for release, I tend to use the functionality Remove Unused Resources.
If I check Delete unused @id declarations too it will delete ids, which are actually referenced by kotlinx.android.synthetic imports.
Is…
![](../../users/profiles/3679505.webp)
Casni
- 29
- 5
2
votes
0 answers
AndroidStudio always use @+id
I saw a lot of posts about the Difference between "@id/" and "@+id/" in Android, and correct me if I'm wrong but it seems that @+id is kind of a setter and @id is kind of a getter (broad simplification).
Playing around with Android Studio, it seems…
![](../../users/profiles/3888000.webp)
Dan Chaltiel
- 5,597
- 4
- 36
- 62
2
votes
1 answer
Get caller identity in service's onBind() in Android
In the onBind() method of a service I'd like to check whether the caller has a particular permission. For that I need to find the identity of the caller.
I expected the following code to return the caller package name but instead I get the package…
![](../../users/profiles/3715151.webp)
Daniel
- 1,830
- 22
- 40
2
votes
2 answers
How do I get the String representation of a View's id
I have a view and i have it's resource id ( i.e. R.id.xxx ) and i want to extract the xxx part and convert it to a String.
Is that possible to do?
Just to be clear, I have view.getId() a resource integer, not the actual name of the id.
![](../../users/profiles/4342369.webp)
Pavle Pavlov
- 169
- 2
- 11
2
votes
0 answers
Resources identifiers to screen configurations
I'm developing an app and my current task is to support different screen sizes. My problem is that a lot of devices have the same identifiers.
For example, large-hdpi supports Nexus 7, Galaxy Note & Galaxy Tab. But in the Note and Tab all layout…
![](../../users/profiles/558433.webp)
Marcos Vasconcelos
- 17,773
- 29
- 104
- 165
1
vote
0 answers
Generate UUID in Android Studio and use the same UUID after reinstalling the App
In this project that I'm working on, I want a unique ID for a Device that is using my App. I've decided to
use UUID (Universally Unique Identifier) in my project. Basically what I want is to assign this UUID to any files generated by my App.
My…
![](../../users/profiles/15098932.webp)
ManuKovera
- 23
- 1
- 6
1
vote
1 answer
Android O device ID clarification
what does it mean by 'For apps installed on a device running Android 8.0, the value of ANDROID_ID is now scoped per app signing key, as well as per user. '
https://developer.android.com/about/versions/oreo/android-8.0-changes.html.
Is that means if…
![](../../users/profiles/3565768.webp)
user3565768
- 43
- 9
1
vote
0 answers
Is it possible to have android ID length less than 16?
I have used Android_ID as unique ID during my app registration. Since Android ID is 64 bit hex string, I considered it's length will be 16 and validating it during registration. But few of the android devices had the length as 15. If its 64 bit hex…
![](../../users/profiles/6687990.webp)
karan
- 54
- 6
1
vote
1 answer
What is the format of a Windows Phone Advertising ID string? What is the typical length?
What are examples of the Device ID unique to Windows Phones?
As I do not have a Windows phone, I cannot look up any values myself.
Specifically I'm wondering about the typical length of Advertising IDs that Windows uses that are similar to…
![](../../users/profiles/1866674.webp)
Glenn Strycker
- 4,376
- 6
- 27
- 48
1
vote
3 answers
Android: Android ID changes on App Update. Something Unique instead?
I get android id with code below:
DeviceID = Secure.getString(this.getContentResolver(),
Secure.ANDROID_ID);
But it changes on every update. Is it wrong way to get it or is there anything different that i can use, that never…
![](../../users/profiles/5646240.webp)
Nikoloz14
- 207
- 4
- 13
1
vote
2 answers
How to Generate the ID of a Random Toggle Button, Then SetChecked(True) That Specific Toggle Button
I have two ToggleButtons and I want to be able to randomly select the id of one of those buttons, and set check that button to true. I tried This but is does not work as setChecked is not available for an Int or String. Any help would be much…
![](../../users/profiles/3870864.webp)
kh_eden147
- 43
- 9
1
vote
1 answer
In android version 4.0 or higher, is ANDROID_ID completely unique?
In android version 4.0 or higher, is the bellow androidId completely unique?
androidId = android.provider.Settings.Secure.getString(getContentResolver(),android.provider.Settings.Secure.ANDROID_ID);
![](../../users/profiles/2888648.webp)
supermonkey
- 593
- 9
- 23
1
vote
1 answer
Wont find R.Id. in fragment
I'm trying to get a text view to link to a site, but it won't find the id from xml in android. Any help would be great. Here's the code
It wont find the R.id.textviewlink
public class Fragment_2 extends Fragment{
public View…
![](../../users/profiles/2407147.webp)
user2407147
- 1,308
- 2
- 21
- 35
0
votes
1 answer
Is it possible to get the resource ID of the applied theme to a specific View?
Given a View, is it possible to get the resource ID of the currently-applied theme? I don't mean to the whole activity (though it would inherit from that theme if there's no specific view applied to it), I mean, if I have: