=================================
=================================
=================================
ios android 고유 키값(기기의 고유넘버 또는 고정 시리얼) 얻기 ane 파일
모바일기기(ios,android 등등)을 adobe air로 개발중, 고유키값을 가지고 구분해야할 일이 많아서 ios 고유넘버를 쓰려고 하는데 ios6이후 개인보안 여파로 udid와 mac address 를 못쓰게 되어서 찾은 ane 파일이다. 사용법은 기존 ane 라이브러리를 추가시키고 xml에 <extensions> 확장 목록에 추가하여 빌드 시켜주면 된다.
ANE 파일 다운로드 아래 링크
파일출처: https://github.com/freshplanet/ANE-DeviceId
API:
AirDeviceId.getInstance().getID("key"); //key값을 섞어서 고유의 키를 생성하는것 같다 이건 다른기기에도 똑같은 값을 같는 고유의 키이다
AirDeviceId.getInstance().getIDFA(); //기기의 고유번호 (advertisingIdentifier) identifies //IDFA-identifierForIdentifier
AirDeviceId.getInstance().getIDFV(); //기기의 고유번호 IDFV (Vendor ID) (identifierForVendors) //IDFV-identifierForVendor
//IDFA, IDFV 관련 링크
http://tech.tapjoy.com/product-overview/sdk-change-log/tapjoy-and-identifiers?lang=ko
http://security.stackexchange.com/questions/22709/privacy-implications-of-idfa-idfv-iphone-ios
http://stackoverflow.com/questions/15984325/alternative-way-to-create-lifetime-unique-id
http://zengrong.net/post/2152.htm
=================================
=================================
=================================
IOS 관련 IDFA, IDFV
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.
Privacy implications of IDFA/IDFV? (iPhone/iOS)
Apparently, iOS 6 introduced IDFA, "identifier for advertisers", which identifies your device so that advertisers can track you and send you ads. It appears they also introduced IDFV, "identifier for vendor". How do IDFA and IDFV work? What exactly do they identify? Are they different for each app on your phone, or are they the same for all apps on your phone? What are the privacy implications of IDFA and IDFV? Can they be used to track you? How do they compare to UDID and to cookies on the web, as far as the privacy impact? Do users have any way to tell which apps are gathering this information? Also, if you set "Limit Ad Tracking" to On in settings, what happens under the covers? How does that change what information apps receive? Background: Apple Has Quietly Started Tracking iPhone Users Again, And It's Tricky To Opt Out;Apsalar's Take on Apple's Recent Announcement; How To Get Advertisers To Stop Tracking Your iPhone. privacy ios |
2 Answers
The IDFA (advertisingIdentifier) identifies the device but is reset when the device is erased. The IDFA is intended for use by advertising networks which need to be able to identify users across apps. As far as privacy is concerned, the IDFA is very similar to the UDID, but does the following to mitigiate the UDID privacy issues:
|
Ars Technica has an article with an overview of IDFA and IDFV. It explains how these new mechanisms provide users with greater control over their privacy. IDFA is a persistent identifier that is consistent across all apps, and thus allows cross-app tracking. However, users can disable IDFA by setting "Limit Ad Tracking" to On. IDFV is a persistent identifier that is different for each app. This still allows tracking of users, but does not allow correlating your activities with one app against your activities with another app. The comments on that article clarify that, if the user sets "Limit Ad Tracking" to On, then this sets a global flag (advertisingTrackingEnabled) that advertising code is supposed to check before reading the IDFA. Advertisers are supposed to write their code to check this global flag and not collect the IDFA if it is set (though there is no technical measure that prevents them from doing so; they are on their honor). Thus, in this sense it is vaguely akin to the "Do Not Track" flag. Technically, it would be possible for an advertiser to still collect the IDFA even if the user has set "Limit Ad Tracking" to On. We have to hope that Apple has a way to detect that and would ban the advertiser from the app store. |
=================================
=================================
=================================
IOS, 안드로이드 각종 디바이스기기 정보 얻기. ane
사용법은 기존 ane 라이브러리를 추가시키고 xml에 <extensions> 확장 목록에 추가하여 빌드 시켜주면 된다.
아래와같이 for문을 돌면서 각종 정보가 나온다.
ios에서 시리얼넘버나 맥어드레스는 막혀나 나오지 않으니 참고. (개발자가 ane를 새로 업데이트해주면 나올수도..)
// var dictionary:Dictionary = SystemProperties.getInstance().getSystemProperites();
// for (var key:String in dictionary)
// {
// var readingType:String = key;
// var readingValue:String = dictionary[key];
//
// }
// dictionary = null;
ANE 파일 다운로드 아래 링크
파일출처:
https://github.com/mateuszmackowiak/SystemProperties
=================================
=================================
=================================
츌처: http://www.as3gamegears.com/air-native-extension/device-identification/
Device Identification Extension
TITLE | SystemNFO |
Extension ID | com.flashvisions.mobile.android.extensions.system.SystemNFO |
FUNCTION | Provides access to device identification data such as, IMEI code, IMEI SV code, Device Serial Number, MODEL and IMSI code. |
API LEVEL | API Level 1 |
PERMISSIONS | <uses-permission android:name="android.permission.READ_PHONE_STATE"/> |
FREE VERSION | Download * IMEI and SERIAL not available in free version |
BUY NOW | BUY THIS EXTENSION HERE |
DISCLAIMER (Read Me!)
views: 2525
Price: $0.00
ShareThis
Avg. Customer Rating:
Your Rating: 1 2 3 4 5
2 Comments - Leave a comment
Leave a Reply - Quote
- See more at: http://flashvisions.com/goodies/air-android-extensions/device-identification/#sthash.OOVdq2fo.dpuf
Device Identification is a Native Extension that provides access to device identification data. It is possible to read the IMEI code, IMEI SV code, Device Serial Number, MODEL and IMSI code.
Sample
import com.flashvisions.mobile.android.extensions.system.data.DeviceIdentity; import com.flashvisions.mobile.android.extensions.system.SystemNFO; var systemInfo:SystemNFO = new SystemNFO(); var result:DeviceIdentity = systemInfo.getDeviceIdentity(); trace(result.IMEI); trace(result.IMEISV); trace(result.IMSI); trace(result.MODEL); trace(result.SERIAL); trace(result.PHONENUMBER);
Air Native Extension, Android Commercial, Free. URL.
last reply was november 24, 2012
- YopSolothx for that !
- November 23, 2012
- DovyskiYou’re welcome!
- November 23, 2012
- Chris5$ and thats work only on android ?
- January 2, 2013
- DovyskiIt’s not that bad Chrishave you test to build an ANE like this one ?
- January 2, 2013
- I agree that it could be much better if iOS was supported as well.
- January 2, 2013
- DovyskiNo, I haven’t. In fact I never tried to build any ANE so far.
- January 2, 2013
- BayoHi, can’t access the files. Links please.
- January 3, 2013
- DovyskiHi Bayo! Looks like their website is down for now. I am not an affiliate or something, I just listed their ANE here. I am afraid you will have to wait until the website is back online.
- January 3, 2013
- ChrisHi, i have build a free version
https://github.com/goabonga/DeviceIDExtension - January 3, 2013
- DovyskiHey there! That’s awesome! I will add your version to the site tomorrow. Thanks!
- January 3, 2013
- Chrisif you have ideas for others extensions, send me an email, i can build it
- January 3, 2013
- DovyskiThat’s outstanding! Thank you again for the contribution.
- January 3, 2013
- Adobe AIR Native Extensions for Mobile-24/7 Software[...] Device Identification Native Extension that provides access to device identification data. It is possible to read the IMEI code, IMEI SV code, Device Serial Number, MODEL and IMSI code. [...]
- January 15, 2013
- BayoHi Chris, can you please walk me through now to use the extension? I have it downloaded already. And while at it, is it applicable to iOS too or just Android? Thanks
- February 17, 2013
- pedro vicentenot work with Flash Professional CS5.5
- April 11, 2013
- sanu philipHow to use this for action script 3?
- September 6, 2013
=================================
=================================
=================================
출처: http://forum.starling-framework.org/topic/detect-device-modelperformance
- Hi all,POSTED 2 YEARS AGO #
- Is there any way to detect which device (i.e. iPhone4, 4S etc) an Air app is running on?
- ctp2ndThe flash.system.Capabilities class has some useful information you can use to guess which device your app is currently being viewed on. You could do something like:
- Novice Bird
Joined: Feb '12
Posts: 8
package
{
import flash.system.Capabilities;
public class MyClass extends Sprite
{
private var _device:String;
public function MyClass()
{
var resolutionY:Number = 960; // picking a default device to emulate
// iPhone 4's resolutionY is 960
if (!Capabilities.isDebugger) // quick check to see if we're using the debugger
{
resolutionY = Capabilities.screenResolutionY; // if not, use the device's
// resolution. When using the
// debugger the screenResolutionY
// will reflect your monitor's
// screenResolutionY, not the
// debugger player.
}
// a shorter way to do the above
// var resolutionY:Number = (!Capabilities.isDebugger)?Capabilities.screenResolutionY:960;
if(resolutionY == 960) // now we just guess the device based on that resolution
{
_device = 'iphone4'; // high def iphone (4, 4s)
}
else if (resolutionY == 480)
{
_device = 'iphone'; // low def iphone (3g, 3gs, iPod Touch)
{
else if (resolutionY == 1024)
{
_device = 'ipad'; // ipad ( 1 & 2)
}
else if (resolutionY == 2048)
{
_device = 'ipad3'; // ipad (3) supposedly
}
}
}
}
There is probably a better way to do this and hopefully someone will share that. This is, at the most basic level, functional.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Yes, this is a good approach.
Or you can use a native extension (ANE) if you want to rely on native APIs on the OS t detect this or get more detailed information about the device.
Thibault
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks for the responses. I really need to be specific on the phone model and need to differentiate between and an iPhone 4 and a 4S as these have significantly different performance. Not sure whether to apply some benchmark test when the game loads or to go for an ANE.
I'll mull it over. Thanks for the help guys!
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
We are told many times in docs not to use Capabilities.os to control application logic (though Adobe's flashx.textLayout lib does).
Let the user beware, but in the current impls of AIR mobile, Capabilities.os on iOS platforms will return strings like 'iPhone OS 5.0.1 iPad2,2" or 'iPhone OS 5.0.1 iPhone3,1' where the actual hw.machine sysinfo text is included at the end.
So again, you might not want to rely on this but given the naming conventions, a lowercase.indexOf('iphone3,') or lowercase.indexOf('iphone4,') will distinguish 4 from 4S.
(Search the web for multiple listings of current hw.machine values in iOS.
Including the comma at the end as a distinguisher helps ignore the variants but also won't break you when the iPhone 10 comes out
Not advocating this solution one way or the other personally if there are other feature ways of distinguishing models...
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Definitely a preliminary benchmark is the way to go, it will work anywhere you deploy. This is something that even guys from Adobe are thinking about doing natively but its actually pretty easy to implement yourself.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Yes, I'd rather go for the benchmark. I'm not 100% sure of the best way to approach performing this test though. I will do some digging, but in the meantime if anyone has a tried and tested method that they would describe, it may help.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I would go for pure fillrate test, I mean thats the major hog for all games anyway. Unless you are doing some heavy logic, AI or physics that may impact the CPU significantly which is simply not going to happen in 99% of games.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Capabilities.screenResolutionY will not render 2048 with the new iPad (iPad 3). I have the 3rd generation iPad and the iPad 2 and both render the same "screenResolution" as well as dpi (which is showing 132 on both iPad 2 and the new iPad). What we need is a way to gather the ppi since those numbers are different I think, but I don't know how. Anybody?
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I have different layouts and graphics for the different devices in my IPA, so this was pretty important. Figured I would share my findings.
I tested out Jeff's suggestion above and that method works on the new iPad (iPad 3).
Here is my code that worked on my iPad 2, new iPad and my iPhone 4S:
var myOS:String = Capabilities.os;
var myOSLowerCase:String = myOS.toLowerCase();
if(myOSLowerCase.indexOf("ipad3,", 0) >= 0) {
// go to Scene for new iPad 3
} else if(myOSLowerCase.indexOf("ipad2,", 0) >= 0) {
// go to Scene for iPad 2
} else if(myOSLowerCase.indexOf("iphone4,", 0) >= 0) {
// go to Scene for iPhone 4 and 4S
} else {
// trace("not detected device"); // Probably should have a catch all and show iPhone 4 version - since that would scale the best
}
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
this little bit of code is what i've been using in all of my starling based games because, well, i can. As we said back in my youthful days: She ain't the prettiest sheep in the flock, but she'll do well enough for me.
// =================================================================================================
//
// ctp2nd's constants / iOS device detect-o-matic
// This is probably far from optimal, but, as I tell my wife, 'It was good for me.'
// <a href="http://www.ctpstudios.com" rel="nofollow">http://www.ctpstudios.com</a> | ctp2nd @ gmail / gtalk / twitter
//
// =================================================================================================
package
{
//
import flash.geom.Rectangle;
import flash.system.Capabilities;
public class Constants
{
// first check to see if we're on the device or in the debugger //
public static const isDebugger:Boolean = Capabilities.isDebugger;
// set a few variables that'll help us deal with the debugger//
public static const isLandscape:Boolean = true; // most of my games are in landscape
public static const debuggerDevice:String = "iPhone3"; // iPhone3 = iPhone4,4s, etc.
// we create an object here that'll keep a detailed abount of the current environment.
public static const DeviceDetails:Object = getDeviceDetails();
public static const GameWidth:int = DeviceDetails.width; // set an Easy reference for Height & Width
public static const GameHeight:int = DeviceDetails.height;
public static const CenterX:int = DeviceDetails.x; // Calculate the CenterX & Y for the screen
public static const CenterY:int = DeviceDetails.y;
// I find that having a rect that accurately represents the screen size is useful, so I make one here for both main orientations.
public static const GameScreenLandscape:Rectangle = new Rectangle(CenterX, CenterY, GameWidth, GameHeight);
public static const GameScreenPortrait:Rectangle = new Rectangle(CenterY, CenterX, GameHeight, GameWidth);
public static function getDeviceDetails():Object {
var retObj:Object = {};
var devStr:String = Capabilities.os;
var devStrArr:Array = devStr.split(" ");
devStr = devStrArr.pop();
devStr = (devStr.indexOf(",") > -1)?devStr.split(",").shift():debuggerDevice;
if ((devStr == "iPhone1") || (devStr == "iPhone2")){
// lowdef iphone, 3, 3g, 3gs
retObj.width = 480;
retObj.height = 320;
retObj.x = 240;
retObj.y = 160;
retObj.device = "iphone";
retObj.scale = 1;
} else if ((devStr == "iPhone3") || (devStr == "iPhone4") || (devStr == "iPhone5")){
// highdef iphone 4, 4s, 5?
retObj.width = 960;
retObj.height = 640;
retObj.x = 480;
retObj.y = 320;
retObj.device = "iphone4";
retObj.scale = 2;
} else if ((devStr == "iPad1") || (devStr == "iPad2")){
// ipad 1,2
retObj.width = 1024;
retObj.height = 768;
retObj.x = 512;
retObj.y = 384;
retObj.device = "ipad";
retObj.scale = 1;
} else if ((devStr == "iPad3")){
//what ipad 3... i mean 'The new iPad', sorry
retObj.width = 2048;
retObj.height = 1536;
retObj.x = 1024;
retObj.y = 768;
retObj.device = "ipad";
retObj.scale = 2; // oops! thanks for pointing that out
} else {
//Wait, it wasn't ANY of those devices? Oh well, lets make an ASS of yoU and ME
//I'm assuming the OS reported something stupid, so we'll default to the high def iPhone graphics
retObj.width = 960;
retObj.height = 640;
retObj.x = 480;
retObj.y = 320;
retObj.device = "iphone4";
retObj.scale = 2;
}
return retObj;
}
}
}
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
To detect a device its best to use the "os" property of the flash.system.Capabilities class.
For Apple's devices, it returns the "internal name", refer to this wiki -
iPhone -
http://theiphonewiki.com/wiki/index.php?title=IPhone
iPad -
http://theiphonewiki.com/wiki/index.php?title=IPad
iTouch -
http://theiphonewiki.com/wiki/index.php?title=IPod_touch
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
=================================
=================================
=================================
'ADOBE > ActionScript' 카테고리의 다른 글
actionScript 액션스크립트로 프린터 제어하기 관련 (1) | 2020.09.22 |
---|---|
액션스크립트 actionScript 한글 포함 url 인식 인코딩 깨짐 URLLoader 한글깨짐 현상 관련 (0) | 2020.09.22 |
ios air 네트워크 정보 NetworkInfo native extension sample ios 네트워크정도 air로 알아내기 주소, 맥어드레스 등등 (0) | 2020.09.22 |
[AS] adobe 액션스크립트 소켓 타임 아웃 관련 (0) | 2020.09.22 |
adobe air action script SoftKeyboardEvent 모바일 기기 키패드(가상키보드) 이벤트 관련 (0) | 2020.09.22 |
download package ? where? URL?