Giter Club home page Giter Club logo

cordova-plugin-device-name's People

Contributors

becvert avatar benjaminwenzel avatar pke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cordova-plugin-device-name's Issues

How to use with ionic?

Sorry, I am new to developing with ionic and cordova. I am trying to use this nice plug-in but I don't know what import statement to use to make it work. Is it in 'ionic-native'? Thanks.

[Android] maxSdkVersion below 18 not allowed (1.3.1)

Since version 1.3.1 which requests bluetooth permissions again and sets the maxSdkVersion to 17. The upload to the play store yields the following error message: The maxSdkVersion of permission android.permission.BLUETOOTH must be at least 18.

We locked the plugin at 1.3.0 currently which means it won't work for API's below 18 I guess. But that works for now.

[Android] New Plugin Version doesn't work with 4.2 (API 17) and below

Systems:

  • Windows 10 Pro 64 bit, Core i7, 8GB RAM, all updates installed with Android Studio 2.3.3, Cordova 6.5
  • iMac (Retina 5K, 27 Zoll), Core i7, 16GB RAM, macOS Sierra 10.12.6, all updates installed with Android Studio 2.3.3, Cordova 6.5

Steps to Reproduce

  • create a fresh new Android Project, only with the cordova-plugin-device-name
  • use follow script (in this sample for Windows)
call cordova create PhoneGap_android de.test.test Test
cd PhoneGap_android
call cordova platform add android
call cordova plugin add cordova-plugin-device-name
call cordova plugin ls

Open the Project in the Android Studio and add follow line in the File

C:\Test\PhoneGap_android\platforms\android\assets\www\js\index.js

    // Update DOM on a Received Event
    receivedEvent: function(id) {
        var parentElement = document.getElementById(id);
        var listeningElement = parentElement.querySelector('.listening');
        var receivedElement = parentElement.querySelector('.received');

        listeningElement.setAttribute('style', 'display:none;');
        receivedElement.setAttribute('style', 'display:block;');

        console.log('Received Event: ' + id);

        //added from me to test the deviceName plugin
        console.log(cordova.plugins.deviceName.name);
    }

Now start the app on a real Device, in this sample i use the Emualtor to show the problem easier

Use Android 5.0 or higher, also is fine:

API Level 21

api21

But use Android lower then 5, follow error occure and it is impossible to detect the devicename:

API Level 16, 17, 18

image

image

image

[Android] How come Bluetooth adapter is required?

Not a rant, only genuine curiosity :)

To the best of my knowledge, Android's device name isn't tied up to just Bluetooth operations. It is also used as a label for a user's registered devices.

Hence, I find it strange that Bluetooth adapter is a requirement for this plugin to work properly.

Any advice? What am I missing here?

[iOS] Plugin no longer working on iPadOS 16.x

I've been using this great plugin all the way up until iPadOS 15.7. However, I've upgraded to iPadOS 16.1 and I am no longer returned the name of my device. Instead I get just "iPad" (regardless of the name of my device).

Can this be fixed? Or have Apple stopped us from programmatically getting a device's name?

I realise this repo hasn't been updated since 2019 but I'm hopeful of a reply.


  • iPad 15.7 (left) vs. 16.1 (right)

iPadOS 15 7 vs  16 1

[Android] Bluetooth permission issue fix not working

The fix for the #11 bug doesn't work when there's no space before the self-closing xml element: <uses-permission android:maxSdkVersion="18" android:name="android.permission.BLUETOOTH"/>.

Could you update merge-bluetooth-permission.js with the following RegExp to handle both cases?
var result = data.replace(/<uses-permission android:maxSdkVersion="18" android:name="android\.permission\.BLUETOOTH"\s?\/>/, '');

[Android] BLUETOOTH permission issue

This plugin is add the BLUETOOTH permission in the AndroidManifest.xml.

        <config-file target='AndroidManifest.xml' parent='/manifest'>
            <uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="18" />
        </config-file>

But when we actually use Bluetooth with the cordova-ble-central-plugin for example, this permission is added twice in the AndroidManifest.xml because of the android:maxSdkVersion="18" which leads to the compilation to fail.

Removing android:maxSdkVersion="18" solved the issue. Would you like me to issue a PR for that?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.