How to enable the building of the "Hotspot & tethering" settings app in AOSP? - android-source

I have an AOSP build for my Android 10 device.
The 'Network & internet' UI is missing the 'Hotspot & tethering' settings app. (Wifi is working, but only as an upstream interface.)
Which file in AOSP controls whether the 'Hotspot & tethering' settings app is included in the build?

The answer was to add the <item> line, below, to ./frameworks/base/core/res/res/values/config.xml.
<!-- List of regexpressions describing the interface (if any) that represent tetherable
Wifi interfaces. If the device doesn't want to support tethering over Wifi this
should be empty. An example would be "softap.*" -->
<string-array translatable="false" name="config_tether_wifi_regexs">
<item>"softap.*"</item>
</string-array>

Related

Proper way to branch iOS & Android AdMob App ID Development & Production settings in Flutter

I'm using AdMob in Flutter, and I can branch the Ad Unit ID via kDebugMode. However, the AdMob App ID is hardcoded into AndroidManifest.xml (Android) and Info.plist (iOS) respectively. I cannot apply the checking of debug mode in these files.
How can I switch between debug and production modes to use different AdMob App IDs? Thanks.
I heard I can use Product Flavors, but I'm unsure it's the right way to do so.
in iOS, I add an user-defined settings in Build Settings named ADMOB_APPID, then in Info.plist, I use the value $(ADMOB_APPID) in GADApplicationIdentifier property.
But I have no clue how I can do it in Android.

Running google-vr unity daydream app on google pixel

Im trying to run the sample app provided in the daydream page on the google pixel phone.
1) I chnaged the build settings to android.
2) Went to player settings enabled Virtual reality support and selected google daydream as the platform.
3) I changed the Minumum API to API level 24.
4) I added the folder containing my adb to the path variable in windows.
5) I also set the path of the android SDk.
6) I enabled USB debuggin on Pixel
However when I run my app , I get the following errors:
Device daydream not supported in Editor Mode. Please run on target device.
And..
Failed to read from controller emulator app event socket.
Verify that the controller emulator app is running.
build the apk and start it on your device. build and play requires adb.
As I suppouse, you want to DEBUG your Daydream app on your Programming Environment (Unity in this case).
Note:This solution allows you to debug on your PC but you'll need one Pixel Phone connected to your PC, and one Daydream Controller.
First of all I recommend you to download the samples provided by Google on Github if you have not done it yet:
https://github.com/googlevr/gvr-unity-sdk/releases
When you load any scene you'll see that the Daydream basic set is composed for a hierarchy like:
The two selected components are key for your porpouse cause if you want to debug Daydream from your PC you'll need to "link" your daydream controller with InstantPreview App. Instant preview will downloaded instantly on your phone if you got in your scene the "GvrInstantPreviewMain".
InstanPreview Google Info: https://developers.google.com/vr/develop/unity/instant-preview
When the app has been opened, can happen 3 things on your pixel phone:
Everything works as it should.
Daydream Instant Preview infom to correct the device by USB.
Kind of Grey screen with some text.
If you're on 2.
This seems to happen when your Unity Project is desynchronized from your phone and you'll see something like:
Close InstantPreviewApplication on your phone, close your unity project (remember to save your progress), and open again your unity project. That has almost always solved me.
If you're on 3.
This seems to happens when instan preview is waiting for Unity Play Mode.
You only need to press Play on you Unity Poject.
Remember to press (and mantain) synchronize button on your Daydream controller if you can move the headset camera but can't find your controller reticle.
This works for me.
I also append my own Unity project with this scheme that works bought for Daydream and GearVR in case helps someone else to test my solution:
https://github.com/ls29322/VR_GalleryApp

Unity ads displaying an ad example and not the real ads

http://prntscr.com/cv3hc3 and http://prntscr.com/cv3hh0 seems to be perfectly set up, while my ads still display the "unity ads" example. How can I display real ads and get money from it?
Turning test mode in the UnityAds dashboard on and back off again did it!
Have you set test mode to false? this is from the Unity blog:
If we are running our project in the
editor we will see a generic billboard ad. If we are running this on
device and test mode is set to true (see above) then we will see a
placeholder ad. Finally, if we are on device and test mode is false we
will see a real live ad.
source: https://blogs.unity3d.com/2015/04/09/integrating-unity-ads/
I am not sure if your build target is properly set up, but this is a point worth mentioning as well:
NOTE: Since ads are currently only supported for iOS and Android, your
editor will have to be targeting one of those platforms in order to
see any test ads. Before going further you may want to switch your
platform to either iOS or Android in the Unity build settings
(File->Build Settings)
source https://blogs.unity3d.com/2015/04/09/integrating-unity-ads/
just uncheck the TestMode in services then try to build the app and install it in real devices then it works great.

How to simulate highlight text for mobile devices on Chrome Dev Tools?

I'm curious if it's possible to simulate highlight text on "touchstart" via Chrome Dev Tools instead of testing directly on phone.
I tried mobile view but the touch icon doesn't seem to highlight the text when I drag it.
Thanks a lot.
This level of detail isn't available within Device Mode. You'd need to use an emulator.
Device Mode is only meant to provide the upper 85-90% of what most developers will need to test their web applications. It is not meant to handle everything (as that highlight UX is platform-specific) nor is it meant to replace actual device testing.
Pretty old question, But instead of an emulator now we can use chrome's new feature Remote Debugging.
Here are steps:
Enable Developer Options - To enable tap Build Number 7 times
Settings > About Phone > Build Number
The above location may vary depending on your Android version.
Enable USB Debugging
Settings > System > Developer Options > USB debugging
Connect your mobile device to your computer using USB cable and tap OK
to allow USB debugging.
Open chrome://inspect/#devices and in the Remote Target section check whether your device is listed, if not make sure to unlock your device.
In the Devices section, click Port forwarding and enter your website port(e.g: 8080) and then in the next field enter IP and port(e.g: localhost:8080)
Open chrome on your mobile and goto localhost:8080
You can still use chrome devtools to debug, simply click on inspect in the Remote Target section.

iPhone SDK Modify WiFi Settings

I need to be able to modify the WiFi settings on a iOS device (iPhone and iPad), most of the libraries are found so far via google search are private libs... Apple don't like this, does the SDK allow this in another way?
Thanks
Without jail breaking the device, you cannot modify the Wi-Fi settings. This is because all iOS applications are sandboxed, meaning they only have access to the data Apple allow deems necessary to the functioning of the app. For iOS apps, the documents directory constitutes the application's sandbox and the application cannot create or modify files or directories outside of these directories. So even if you found a way to modify Wi-Fi settings, your app would be rejected by Apple. Hope this helps!
Apple does not expose any public APIs that allow you to do this.