سؤال

I need to fetch the IMEI numbers from the android devices when my web page is loaded in the browser, pages would be written in php .. i need to get the imei numbers from the devices and post it to some pages on server for authentication purpose ..

i came across many work around that is possible through java client application but that is not useful for my project...

I have tried with SNMP protocols to get all system information like disk drives/ system process list/ up time/ down time and basic system description but that wont provide level of information which would be needed to accomplish this task..

Is there any way to fetch IMEI numbers or any unique ids of the systems on web using php application..


How this can help can any body suggest.. get instance of Java class java.lang.System in PHP $system = new Java('java.lang.System'); inside php program..

The idea is to write java program that implements the IMEI fetching i.e How to get the device's IMEI/ESN programmatically in android? inside php program to fetch the system information...

Refer: php.net/manual/en/java.examples-basic.php

any body have suggestion to work around.

Thanks,

هل كانت مفيدة؟

المحلول

So, essentially you only want to have your web page available, that Android devices access?

Your client is a browser and browser just doesn't send out that kind of information. Look at the request headers for what's available. And this would be a huge privacy issue if it did.

So if you really have that kind of requirements, you have to create your own Android app. And while there is Quercus (that can run PHP on JVM), I think a mash-up browser with Android Java SDK would be a lot easier to accomplish. PHP5 is very similar in syntax to Java anyways.

Check http://developer.android.com/reference/android/webkit/WebView.html for the browser-side and How to get the device's IMEI/ESN programmatically in android? for IMEI.

نصائح أخرى

Will your webpage be loading inside an app? If yes, then you could use How to get the device's IMEI/ESN programmatically in android? to get the same

Otherwise, if you are just loading the page inside the phone's browser, I am afraid it will not allow you to do access the IMEI

By the way, there are several other ways of authentication besides IMEI. Do you have any specific requirements to use only IMEI. If you post your authentication needs, we might be able to suggest alternative solutions.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top