Closed vicatcu closed 7 years ago
I also just noticed, if I do the following:
cordova plugin remove cordova-plugin-hotspot
ionic plugin add cordova-plugin-hotspot
ionic plugin list
I get: cordova-plugin-hotspot 1.2.7 "Cordova HotSpot Plugin"
... even though 3 days ago 1.2.8 was "released" and the changes therein seem possibly related? How do I tell cordova to give me 1.2.8?
Wierdly, even if I say ionic plugin add cordova-plugin-hotspot@1.2.8
I still end up with 1.2.7. And npm says 1.2.8.
Continuing documentation of my personal odyssey, I was able to get my version updated in the project by following the breadcrumbs on this SO post. I did:
npm install -g cordova-check-plugins
cordova-check-plugins --update=auto
... and got this output...
***************************
* Plugin update available *
***************************
plugin: cordova-plugin-hotspot
source: npm://cordova-plugin-hotspot@1.2.8
installed version: 1.2.7
remote version: 1.2.8
Updated 'cordova-plugin-hotspot' from 1.2.7 to 1.2.8
... still not getting any action out of the plugin. I also went out and found apktool, so that I could read the manifest from the created APK file, and it's contents looks like this:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:hardwareAccelerated="true" package="com.ionicframework.ionicwifiscan371508" platformBuildVersionCode="24" platformBuildVersionName="7.0">
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<application android:debuggable="true" android:hardwareAccelerated="true" android:icon="@mipmap/icon" android:label="@string/app_name" android:supportsRtl="true">
<activity android:configChanges="locale|keyboard|keyboardHidden|orientation|screenSize" android:label="@string/activity_name" android:launchMode="singleTop" android:name="com.ionicframework.ionicwifiscan371508.MainActivity" android:theme="@android:style/Theme.DeviceDefault.NoActionBar" android:windowSoftInputMode="adjustResize">
<intent-filter android:label="@string/launcher_name">
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE"/>
</activity>
</application>
</manifest>
@hypery2k any ideas? i'm eager to get this working :-)
sorry, but didn't know what exactly happened that it doesn't work for you. But currently I'm very busy with other stuff.
@hypery2k no problem, busy is good, congrats :-)
facing the same problem as @vicatcu getting older version 1.2.7 always
the changelog says version 1.2.8 and before that 1.2.6, I guess some versioning issue, also the permission removed in version 8(write_settings) doenot exist in my plugin.
In the mean time I added "uses-permission android:name="android.permission.WRITE_SETTINGS" this line, (which was removed in 1.2.8 build) into my Android.manifest.xml file and my app works now.
I am getting my feet wet with this plugin and made a bare bones ionic2 application to try it out. Did that using:
Changed src/pages/home.ts to this:
Changed src/pages/home.html to this:
Loaded it onto my Galaxy S7 over USB with the command :
ionic run android
Neither the then(), nor the catch(), seem to execute on the promise returned by HotSpot.scanWifi(), like the promise never resolves or rejects. So, with my phone still attached, I ran the commandadb shell
, and then from with the shelllogcat
and scanned the output for references to HotSpotPlugin and Cordova, and I encountered the following log messages:I also came across this other issue that was closed 3 days ago, and this reference from the wiki. And I found the manifest in the ionic project under platforms/android/AndroidManifest.xml, but it's not clear to me what is critical for compliance with the needs of this plugin. Currently my manifest looks like this:
... the original Manifest generated by ionic looked like this:
Just like @alvaroslm in issue #55 I'm just wanting to scan available networks, connect and disconnect from them in my app. Can anyone out there tell me where I'm going wrong here?