Giter VIP home page Giter VIP logo

nearby_service's Issues

communicate just with two phones

Hello @ksenia312 !
Good job! this works perfectly on my android phone and it's easy to integrate to other flutter applications.
My test for this nearby service worked only in the case I have 3 phones, the first create an hotspot and the two others connect to it and start sharing files..

Is it possible to use just two phones where the first create an hotspot and the second connect ?

Thanks,

Wifi manager not initialized error

Exception will be thrown on
Android devices

62% Android 14
12% Android 13
7% Android 10
6% Android 15
13% other (5)

Fatal Exception: java.lang.RuntimeException: Unable to destroy activity {de.bladenight.bladenight_app_flutter/de.bladenight.bladenight_app_flutter.MainActivity}: wj.s: lateinit property wifiManager has not been initialized
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5901)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:5933)
at android.app.servertransaction.DestroyActivityItem.execute(DestroyActivityItem.java:47)
at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:60)
at android.app.servertransaction.TransactionExecutor.executeLifecycleItem(TransactionExecutor.java:282)
at android.app.servertransaction.TransactionExecutor.executeTransactionItems(TransactionExecutor.java:150)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:93)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2595)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at android.app.ActivityThread.main(ActivityThread.java:8592)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)

Caused by wj.s

      Caused by wj.s: lateinit property wifiManager has not been initialized
   at com.xenikii.nearby_service.NearbyServiceManager.disconnect(NearbyServiceManager.java:15)
   at com.xenikii.nearby_service.NearbyServiceManager.disconnect$default(NearbyServiceManager.java:5)
   at com.xenikii.nearby_service.NearbyServicePlugin.onDetachedFromEngine(NearbyServicePlugin.java:56)
   at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.remove(FlutterEngineConnectionRegistry.java:122)
   at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.remove(FlutterEngineConnectionRegistry.java:16)
   at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.removeAll(FlutterEngineConnectionRegistry.java:11)
   at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.destroy(FlutterEngineConnectionRegistry.java:10)
   at io.flutter.embedding.engine.FlutterEngine.destroy(FlutterEngine.java:31)
   at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onDetach(FlutterActivityAndFragmentDelegate.java:105)
   at io.flutter.embedding.android.FlutterActivity.onDestroy(FlutterActivity.java:18)
   at android.app.Activity.performDestroy(Activity.java:9251)
   at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1561)
   at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5888)
   at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:5933)
   at android.app.servertransaction.DestroyActivityItem.execute(DestroyActivityItem.java:47)
   at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:60)
   at android.app.servertransaction.TransactionExecutor.executeLifecycleItem(TransactionExecutor.java:282)
   at android.app.servertransaction.TransactionExecutor.executeTransactionItems(TransactionExecutor.java:150)
   at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:93)
   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2595)
   at android.os.Handler.dispatchMessage(Handler.java:107)
   at android.os.Looper.loopOnce(Looper.java:232)
   at android.os.Looper.loop(Looper.java:317)
   at android.app.ActivityThread.main(ActivityThread.java:8592)
   at java.lang.reflect.Method.invoke(Method.java)
   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)

Issue is monitored by Chrashlytics

PathAccessException: Cannot copy file to 'storage/emulated/0/Download/1710925172445988.jpg'

I got feedback that this error occurs: "PathAccessException: Cannot copy file to 'storage/emulated/0/Download/1710925172445988.jpg'". The requester asked to add external storage permission for Android 10

I'm opening an issue, maybe the one who left the review will notice :)
I guess you need to add the requestLegacyExternalStorage parameter to the application tag in your AndroidManifest.xml.

Example:

 <application
        android:requestLegacyExternalStorage="true"
        android:name="io.flutter.app.FlutterApplication"
        android:icon="@mipmap/ic_launcher"
        android:label="yourapp">
        <activity
            android:name=".MainActivity"
            android:launchMode="singleTop"
            android:theme="@style/LaunchTheme"
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
            android:hardwareAccelerated="true"
            android:windowSoftInputMode="adjustResize">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.category.LAUNCHER"/>
            </intent-filter>
        </activity>
        <!-- Don't delete the meta-data below.
             This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
        <meta-data
            android:name="flutterEmbedding"
            android:value="2" />
    </application>

I can't fix this on the plugin side unfortunately..
If I'm wrong, tell me!

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.