Initially, I started this thread to gain some insight into what I was doing wrong with my APNs. The discussion sparked quite a bit of interest from the Aussie users who (like me) were sick of tedious re-entering info each rebuild.
As I've now fixed the problem I was having I thought it would be useful for me to share my findings.
So far I have:
APNs
Voicemail Settings
default settings for new builds
Australian APN Configurations
APNs (Access Point Names) let the phone know how to connect to the internet, by providing additional connection information.
Since there's currently only 1 provider in Australia (Optus) that are carrying G1 devices, the settings for everyone else are hard to find.
Below is the apns-conf.xml information including the Australian providers that I have put together. I could really use some feedback as to what works and doesnt.
You can apply these settings manually or by pushing apns-conf.xml into /system/etc
Supported Carriers:
optus internet -works
PHP:
<apn carrier='Optus Internet'
apn='yesinternet'
user='*'
password='*'
server='*'
mmsc='null'
mcc='505'
mnc='02'
type='default'
/>
optus mms -works
PHP:
<apn carrier='Optus MMS'
apn='mms'
proxy='202.139.83.152'
port='8070'
user='*'
password='*'
server='*'
mmsc='http://mmsc.optus.com.au:8002/'
mmsproxy='61.88.190.10'
mmsport='8070'
mcc='505'
mnc='02'
type='mms'
/>
IDEAS -untested
PHP:
<apn carrier='IDEAS'
apn='e-ideas'
user='*'
password='*'
server='*'
mmsc='null'
mcc='525'
mnc='01'
type='default'
/>
IDEAS MMS -untested
PHP:
<apn carrier='IDEAS MMS'
apn='e-ideas'
proxy='165.21.42.84'
port='8080'
user='65IDEAS'
password='IDEAS'
server='*'
mmsc='http://mms.singtel.com:10021/mmsc'
mmsproxy='165.21.42.84'
mmsport='8080'
mcc='525'
mnc='01'
type='mms'
/>
3netaccess
PHP:
<apn carrier='Three'
apn='3netaccess'
mcc='505'
mnc='06'
type='default'
/>
3services -Working
PHP:
<apn carrier='3services'
apn='3services'
mmsc='http://mmsc.three.net.au:10021/mmsc'
mmsproxy='10.176.57.25'
mmsport='8799'
mcc='505'
mnc='06'
type='mms'
/>
Virgin Internet -untested
PHP:
<apn carrier='Virgin Internet'
apn='virgininternet'
user='*'
password='*'
server='*'
mmsc='null'
mcc='505'
mnc='02'
type='internet'
/>
Virgin MMS -untested
PHP:
<apn carrier='Virgin MMS'
apn='virginmms'
proxy='202.139.083.152'
port='8070'
user='*'
password='*'
server='*'
mmsc='http://mms.virginvibe.com.au:8002/'
mmsproxy='202.139.083.152'
mmsport='8070'
mcc='505'
mnc='02'
type='mms'
/>
Vodafone Internet -tested
PHP:
<apn carrier='Vodafone Internet'
apn='vfinternet.au'
user='*'
password='*'
server='*'
mcc='505'
mnc='03'
type='default'
/>
Vodafone MMS -tested
PHP:
<apn carrier='Vodafone MMS'
apn='live.vodafone.com'
user='*'
password='*'
server='*'
mmsc='http://pxt.vodafone.net.au/pxtsend'
mmsproxy='10.202.2.60'
mmsport='8080'
mcc='505'
mnc='03'
type='mms'
/>
Telstra 3G EDGE GPRS -untested
PHP:
<apn carrier='Telstra 3G EDGE GPRS'
apn='telstra.iph'
mcc='505'
mnc='01'
/>
Telstra GPRS -tested
PHP:
<apn carrier='Telstra GPRS'
apn='telstra.internet'
user='*'
password='*'
server='*'
mcc='505'
mnc='01'
/>
Telstra 3G Databundle -untested
PHP:
<apn carrier='Telstra 3G Databundle'
apn='telstra.datapack'
password='telstra'
mcc='505'
mnc='01'
/>
Telstra 3G Pay by time -untested
PHP:
<apn carrier='Telstra 3G Pay by Time'
apn='telstra.pcpack'
password='telstra'
mcc='505'
mnc='01'
/>
Telstra 3G Prepay -tested
PHP:
<apn carrier='Telstra 3G Prepay'
apn='telstra.wap'
password='telstra'
mcc='505'
mnc='01'
/>
Vodafone NZ -untested
PHP:
<apn carrier='Vodafone NZ'
apn='live.vodafone.com'
user='*'
password='*'
server='*'
mcc='530'
mnc='01'
/>
Vodafone NZ MMS -untested
PHP:
<apn carrier='Vodafone NZ MMS'
apn='live.vodafone.com'
user='*'
password='*'
server='*'
mmsc='pxt.vodafone.net.nz/pxtsend'
mmsproxy='172.030.038.003'
mmsport='8080'
mcc='530'
mnc='01'
type='mms'
/>
Australian Voicemail Settings
voicemail settings are essentially a phone number that gets applied based on the same mcc and mnc details used in APNs except in the format of the carrier numeric,
You can apply these settings by placing voicemail-conf.xml in /system/etc
Supported Carriers:
Optus Internet -untested
PHP:
<voicemail carrier="Optus Internet"
numeric="50502"
vmnumber="+61411000321"
vmtag="VoiceMail"
/>
IDEAS -untested
PHP:
<voicemail carrier="IDEAS"
numeric="52501"
vmnumber="+6596301389"
vmtag="VoiceMail"
/>
Default settings for new builds
changes in build.prop
Change default date format from MM-dd-yyyy (us standard) to dd-MM-yyyy (AU standard)
Code:
ro.com.android.dateformat=dd-MM-yyyy
Change localisation for keyboard and dialler ime (htc builds iirc)
Edit the xml file in:
/system/customize/MNS/default.xml
Hopefully this post has provided information you have found useful. If you're not from AU/NZ it's not going to be very relevant. But there is a big APN thread that you could discuss your issues; here.
I'll do my best to keep this post up to date with changes, but as carriers information is always subject to change its possible that a setting might become dated, and will need updating. If you find something like this, let me know!
Attached is the most uptodate apns-conf from cyanogenmod (pulled down 17/02/2010), and the voicemail-conf.xml I was provided with by shellite. I hope they can help you! To push these settings, you will need to know how to use adb push, which requires the android sdk.
Also I strongly recommend checking out: http://code.google.com/p/cyanogenmod/wiki/APNlist
Regards,
ravenge
Default APN's are linked to the number of the carrier in your case 50502 this is set in the global properties. You can view the information by typing "getprop" on the phone.
neoobs said:
Default APN's are linked to the number of the carrier in your case 50502 this is set in the global properties. You can view the information by typing "getprop" on the phone.
Click to expand...
Click to collapse
It seems like the issue may be carrier related then?
Any ideas what files/configurations etc will need to be modified to allow for AU carriers when applying the apns-conf.xml?
cheers,
rav
When I first began the process to root my G1 I backed up my apns-conf.xml with the default Optus/Virgin APN's as I wasnt sure what to expect.
All I do each time I switch builds is overwrite the existing apns-conf.xml, reboot phone, goto Wireless Controls -> Mobile Networks -> Access point names and hit menu, do a 'Reset to default' and my APN's list populates...
Is this what your trying to achieve?
I did find this buggy in 1.1 builds and the list was often blank, though, in 1.5 builds I've never had any problem.
If you want a copy of the original Optus apns-conf.xml let me know.
Default OPTUS apns-conf.xml from 1.1
Code:
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright 2006, Google Inc.
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<!-- use empty string to specify no proxy or port -->
<!-- This version must agree with that in apps/common/res/apns.xml -->
<apns version="6">
<apn carrier='Optus Internet'
apn='yesinternet'
user='*'
password='*'
server='*'
mmsc='null'
mcc='505'
mnc='02'
type='default'
/>
<apn carrier='Optus MMS'
apn='mms'
proxy='202.139.83.152'
port='8070'
user='*'
password='*'
server='*'
mmsc='http://mmsc.optus.com.au:8002/'
mmsproxy='61.88.190.10'
mmsport='8070'
mcc='505'
mnc='02'
type='mms'
/>
<apn carrier='Virgin Internet'
apn='virgininternet'
user='*'
password='*'
server='*'
mmsc='null'
mcc='505'
mnc='02'
type='internet'
/>
<apn carrier='Virgin MMS'
apn='virginmms'
proxy='202.139.083.152'
port='8070'
user='*'
password='*'
server='*'
mmsc='http://mms.virginvibe.com.au:8002/'
mmsproxy='202.139.083.152'
mmsport='8070'
mcc='505'
mnc='02'
type='mms'
/>
<apn carrier='IDEAS'
apn='e-ideas'
user='*'
password='*'
server='*'
mmsc='null'
mcc='525'
mnc='01'
type='default'
/>
<apn carrier='IDEAS MMS'
apn='e-ideas'
proxy='165.21.42.84'
port='8080'
user='65IDEAS'
password='IDEAS'
server='*'
mmsc='http://mms.singtel.com:10021/mmsc'
mmsproxy='165.21.42.84'
mmsport='8080'
mcc='525'
mnc='01'
type='mms'
/>
</apns>
Default OPTUS voicemail-conf.xml from 1.1
Code:
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
* Copyright (C) 2007 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<voicemail>
<voicemail carrier="Optus Internet"
numeric="50502"
vmnumber="+61411000321"
vmtag="VoiceMail"
/>
<voicemail carrier="IDEAS"
numeric="52501"
vmnumber="+6596301389"
vmtag="VoiceMail"
/>
</voicemail>
awesome, I'll get stuck into it as soon as i get home!
Edit: Seems that all along I simply had a syntax mistake *facepalm*. Thanks for the help guys.
Edit: My initial post has been updated! If you find any mistakes, please let me know!
bump
sorry for the double post,
I could still really use some feedback from anyone in AU not on the optus carrier.
Any voicemail settings for other carriers would be great, also if you could confirm or correct any of the apns i have, that would be awesome.
-ravenge
I've been using telstra.internet and telstra.wap for well over half a year on my G1. Mark it as tested.
testing the vodafone settings.
I'm on prepaid so i'll let you know how it goes
i dont use those 3 settings- i got Haykuro to put mine in his build. Since then they have been in all builds.....
for 3 the only one i use is:
Name: 3services
APN: 3services
Proxy: <not set>
Port: <not set>
Username: <not set>
Password: <not set>
Server: <not set>
MMSC: http://mmsc.three.net.au:10021/mmsc
MMS proxy: 10.176.57.25
MMS port: 8799
MCC: 505
MNC: 06
APN type: <not set>
works for everything- internet and mms.
bugger! double post- not sure how the hell that happened...
does anyone know how to change the phone numbers to the standard aussie way? e.g. 0400-123456 instead of the american way: 040-012-3456
i can confirm that the 3g settings for vodafone work on vodafone prepaid yet to try out mms
thank you revenge for the OPTUS settings. all working now
1 Question
will the MMS work with GPS , WIFI & BLUETOOTH on ? or what can i have set on with the MMS ?
ICO187 said:
1 Question
will the MMS work with GPS , WIFI & BLUETOOTH on ?
Click to expand...
Click to collapse
of course
Good job, this will help all of our friends down undah.
haha Happy modding =]
-kit- said:
does anyone know how to change the phone numbers to the standard aussie way? e.g. 0400-123456 instead of the american way: 040-012-3456
Click to expand...
Click to collapse
The attached APK should sort that out. Used it ages back.
VirginMobile Broadband Prepaid
Hi guys,
recently, I bought a prepaid SIM card (VirginMobile Broadband) for my G1 to surf the internet with the phone.
However, I am unable to get any data service to work. Here are my default APN settings [1].
Any experience with Mobile Broadband on the G1 in Australia? Any help is highly appreciated.
Best regards and Happy New Year,
hazel
[1] http://code.google.com/p/cyanogenmod/wiki/APNlist
I have some Aussie APNS up at: http://sholes.id.au/apns/
hi,
thanks for that hint. unfortunately, these apn settings only work with a "normal" voice sim card with an internet package on it. however, this solution is quite expensive. so i got this mobile broadband thing which normally comes with a 3g usb dongle as a modem. i thought it would be quite easy to get it running with the g1 but it isn't.
anybody knows how to use the g1 as g3 modem (ie replace the modem dongle)?
another option would be to use the pppd daemon on the g1 to connect to the network.
any thoughts about that?
cheers
hazel
Hi to all,
I developed an application for android and i published it on the Market. The app support small, normal and large screen and has few requirements.
In particular it uses camera, internet, gps; from the developer console here are requirements:
Code:
Localized to: default
Permissions: android.permission.INTERNET, android.permission.ACCESS_FINE_LOCATION, android.permission.CAMERA, android.permission.ACCESS_NETWORK_STATE
Features: android.hardware.camera, android.hardware.location, android.hardware.location.gps, android.hardware.camera.autofocus, android.hardware.touchscreen
API level: 7-12+
Supported screens: small-large
OpenGL textures: all
My problem is that the app is not instaling on the Samsung Galaxy Next (s5570); from this phone the app is not found in the market, and installing the app with a manual apk it says that it is not supported due to manifest specification.
Here is my manifest piece with permissions:
Code:
<uses-sdk android:minSdkVersion="7" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<supports-screens android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true" />
It seems that this kind of phone has all the requirements, so has anyone experienced the same problem? If yes did you found a solution?
Thank you in advance.
Hello everybody,
I've been watching thenewboston's Android App Development series on youtube and its been pretty helpful, but I've had several situations where I'll get some sort of error and I have no idea what to do. I've tried searching forums, downloading more components with jdk, all to no avail.
My most recent issue is upon initiating a new activity, I get an error saying RelativeLayout needs LayoutHeight and LayoutWidth to be defined; but they are defined in the xml file.
I'm posting from my phone right now, tomorrow I'll follow up with a screen shot.
It really gets me down when I'm trying to be excited about learning something new and on my own, but I experience so many road bumps that I have no idea how to fix or solve. :crying:
Details of the issue
Error Displayed:
Rendering Problems NOTE: One or more layouts are missing the layout_width or layout_height attributes. These are required in most layouts. <RelativeLayout> does not set the required layout_width attribute: ****Set to wrap_content, Set to match_parent <RelativeLayout> does not set the required layout_height attribute: ****Set to wrap_content, Set to match_parent Or: Automatically add all missing attributes
Code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns="http//schemasandroidcom/apk/res/android"
xmlns:app="http//schemasandroidcom/apk/res-auto"
xmlns:tools="http//schemasandroidcom/tools"
xmlns:android="AndroidDomInspection"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
androidaddingBottom="@dimen/activity_vertical_margin"
androidaddingTop="@dimen/activity_vertical_margin"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="comeric522.facebook.example2.MainActivity"
tools:showIn="@layout/activity_main" />
</RelativeLayout>
Other notes: automatically add all missing attributes doesn't work; wrap_content or match_parent doesn't work either.
'.' and ':' removed in between schemasandroidcom because I'm getting flagged for spam
I'm also getting these errors on the xml, and I don't understand why; I haven't done anything yet it's system generated:
Element RelativeLayout doesn't have required attribute layout_height Element RelativeLayout doesn't have required attribute layout_width 'layout_height' attribute should be defined less... (Ctrl+F1)
Validates resource references inside Android XML files.
'layout_width' attribute should be defined less... (Ctrl+F1)
Validates resource references inside Android XML files.
Hi all,
I know there was several questions like mine but i didn´t find a thread till now, where somebody did a little bit more investigation.
So I exported my apk from a PX5 device which I think is the key to send and recive informations with the CAN Bus in the Vehicle.
Sadly im not pretty familiar with reverse engeneering with apps or programming Android apps at all.
Maybe there are some better informed people out there making it happen to send more Informations to the display in the car.
Could be something like:
-Phone numbers
-Musik information from foreign players
-RDS information from a station
-Arrows from a Navigation app (i think a lot more difficult but quite nice)
-..
what i found out!
hi!
yes the apk you postet is really the key, but every app in the HeadUnit is Broadcasting(intent) a message to the canbus.apk. so we have do edit the intent filter from the canbus.apk to recive a custom intent from a selfmade app, to show special informations.
but iam not so good to make one.
In the decompiled file of MusicPlayer2.4.1.apk there is a file with the name "MainActivity.java" at line 329 which the app would send an INTENT with the information TIME of the played Track, i would change this to show the TITLE of the song, i have editet but i cant recompiled with serveral tools.
if i decompile and try to compile the original version, this was not possible, i dont know why.
hopefully
The app can unfortunately be installed on my PX5 Dasaita with Malaysian Rome
Would be cool if we could find an Android developer to program the app for us. I'd pay money for it, too.
folepole said:
hi!
yes the apk you postet is really the key, but every app in the HeadUnit is Broadcasting(intent) a message to the canbus.apk. so we have do edit the intent filter from the canbus.apk to recive a custom intent from a selfmade app, to show special informations.
but iam not so good to make one.
In the decompiled file of MusicPlayer2.4.1.apk there is a file with the name "MainActivity.java" at line 329 which the app would send an INTENT with the information TIME of the played Track, i would change this to show the TITLE of the song, i have editet but i cant recompiled with serveral tools.
if i decompile and try to compile the original version, this was not possible, i dont know why.
hopefully
Click to expand...
Click to collapse
How you decompiled the app?
Every way i found you need an classes.dex file.
Would it be possible to recieve the Intent with an app like Automate or Tasker and Transmitt it to the canbus.apk?
tools
hi, nice to hear some other has the same problem!
i have decompiled with javadecompilers.com/apk and tools that i have found on xda-dev. And i editet with nootepad++.
you can easy extract the classes.dex from musikplayer.apk with 7zip or equals.
yes it must possible, but i dont know how.
shematic function of this i imagine:
musicplayer.apk->recive with an selfmade app, read out the toast that musicplayer.apk made, convert it to 2 lines to the FIS format, an send an intent to canbus.apk.
hopefully
So if i get it wright every app needs to send it Information to the canbus.apk?
So we could trigger every app to do so?
folepole said:
hi, nice to hear some other has the same problem!
i have decompiled with javadecompilers.com/apk and tools that i have found on xda-dev. And i editet with nootepad++.
you can easy extract the classes.dex from musikplayer.apk with 7zip or equals.
yes it must possible, but i dont know how.
shematic function of this i imagine:
musicplayer.apk->recive with an selfmade app, read out the toast that musicplayer.apk made, convert it to 2 lines to the FIS format, an send an intent to canbus.apk.
hopefully
Click to expand...
Click to collapse
Could you show me the MusicApp u used?
Hi,
Im just playing a little bit arround and found this.
Code:
private void SendCanBusinfo() {
Intent it1 = new Intent(MSG_MTC_CANBUS_DISPLAY);
it1.putExtra(MSG_TYPE, "radio");
it1.putExtra("group", (byte) this.band);
if (this.band < 3) {
it1.putExtra("fre", this.currentFreq / 10000);
} else {
it1.putExtra("fre", this.currentFreq / 1000);
}
it1.putExtra("index", (byte) this.channel);
sendBroadcast(it1);
}
It was extracted from an Radio app.
If i get that wright every app could send his Information without any problem to the Canbus app.
So the problem is not to modify the filter in the first step we should try to send the info with additional apps in my mind.
Becasue im not an that good Software Engineer i try to use Automate to make my Plans happen.
MediaPlayer
Intent intent = new Intent("com.microntek.canbusdisplay");
intent.putExtra("type", "music");
intent.putExtra("all", this.ee.size());
intent.putExtra("cur", this.cv + 1);
if (i2 <= 0) {
intent.putExtra("time", 0);
} else {
intent.putExtra("time", i);
}
sendBroadcast(intent);
}
Intent vom Radio
Intent it1 = new Intent(MSG_MTC_CANBUS_DISPLAY);
it1.putExtra(MSG_TYPE, "radio");
it1.putExtra("group", (byte) this.band);
if (this.band < 3) {
it1.putExtra("fre", this.currentFreq / 10000);
} else {
it1.putExtra("fre", this.currentFreq / 1000);
}
it1.putExtra("index", (byte) this.channel);
sendBroadcast(it1);
Use the Boradcast send block.
Action: <whatever MSG_MTC_CANBUS_DISPLAY sands for>
Extras: { "type": "radio", "group" as byte: band, "fre" as int: freq, "index" as byte: channel }
This is where i stand at the moment with the help from Henrik.
9_Mad-Max_5 said:
Becasue im not an that good Software Engineer i try to use Automate to make my Plans happen.
MediaPlayer
Intent intent = new Intent("com.microntek.canbusdisplay");
intent.putExtra("type", "music");
intent.putExtra("all", this.ee.size());
intent.putExtra("cur", this.cv + 1);
if (i2 <= 0) {
intent.putExtra("time", 0);
} else {
intent.putExtra("time", i);
}
sendBroadcast(intent);
}
Intent vom Radio
Intent it1 = new Intent(MSG_MTC_CANBUS_DISPLAY);
it1.putExtra(MSG_TYPE, "radio");
it1.putExtra("group", (byte) this.band);
if (this.band < 3) {
it1.putExtra("fre", this.currentFreq / 10000);
} else {
it1.putExtra("fre", this.currentFreq / 1000);
}
it1.putExtra("index", (byte) this.channel);
sendBroadcast(it1);
Use the Boradcast send block.
Action: <whatever MSG_MTC_CANBUS_DISPLAY sands for>
Extras: { "type": "radio", "group" as byte: band, "fre" as int: freq, "index" as byte: channel }
This is where i stand at the moment with the help from Henrik.
Click to expand...
Click to collapse
yes this ist nice, i have the same infos, i make a app with android studio they look like this: but it dont work.
this was the manifest from the canbus.apk
Code:
<?xml version="1.0" encoding="utf-8" standalone="no"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" android:sharedUserId="android.uid.system" package="android.microntek.canbus" platformBuildVersionCode="26" platformBuildVersionName="8.0.0">
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.BROADCAST_STICKY"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.WRITE_SETTINGS"/>
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS"/>
<uses-permission android:name="android.permission.GET_TASKS"/>
<uses-permission android:name="android.permission.SET_PREFERRED_APPLICATIONS"/>
<uses-permission android:name="android.permission.EXPAND_STATUS_BAR"/>
<uses-permission android:name="android.permission.SET_TIME_ZONE"/>
<uses-permission android:name="android.permission.SERIAL_PORT"/>
<application android:allowBackup="true" android:directBootAware="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:name=".BaseApplication" android:resizeableActivity="false" android:theme="@android:style/Theme.Translucent">
<receiver android:name=".CanBusReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
<action android:name="android.intent.action.LAUNCHER_STARTED"/>
<action android:name="android.intent.action.USER_INITIALIZE"/>
<action android:name="android.intent.action.PRE_BOOT_COMPLETED"/>
</intent-filter>
</receiver>
<service android:name=".CanBusServer" android:persistent="true">
<intent-filter>
<action android:name="com.microntek.canbusserver"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</service>
<service android:name=".AirServer">
<intent-filter>
<action android:name="com.microntek.AirServer"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</service>
<service android:name=".DoorServer">
<intent-filter>
<action android:name="com.microntek.DoorServer"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</service>
<service android:name=".RadarServer">
<intent-filter>
<action android:name="com.microntek.RadarServer"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</service>
<service android:name=".Ajxserver">
<intent-filter>
<action android:name="com.microntek.ajxService"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</service>
<service android:name=".ParkServer">
<intent-filter>
<action android:name="com.microntek.ParkServer"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</service>
<activity android:excludeFromRecents="true" android:label="@string/carinfo" android:name=".Canbus20Activity" android:screenOrientation="landscape">
<intent-filter>
<action android:name="com.microntek.Canbus20Activity"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<activity android:excludeFromRecents="true" android:name=".log.CanBusLogActivity" android:screenOrientation="landscape" android:theme="@android:style/Theme.Wallpaper.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<activity android:excludeFromRecents="true" android:icon="@drawable/ic_air_control" android:label="@string/air_name" android:launchMode="singleTask" android:name=".air.AirControlActivity" android:screenOrientation="landscape" android:theme="@android:style/Theme.Wallpaper.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<service android:name=".WarningServer">
<intent-filter>
<action android:name="com.microntek.WarningServer"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</service>
<service android:name=".update.UpdateService">
<intent-filter>
<action android:name="com.microntek.canbus.UpdateService"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</service>
</application>
</manifest>
Good but i can read out the filter for the Musicplayer, Radio, A2DP or anything usefull.
android studio: i have make a intent sender, but however my app is sending the intent, the app is crashing.
Code:
package com.track.mfa.test10;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.content.BroadcastReceiver;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.os.AsyncTask.Status;
import android.os.Bundle;
import android.os.Environment;
import android.os.Handler;
import android.os.Message;
import android.preference.PreferenceManager;
import android.provider.Settings.System;
import android.view.KeyEvent;
import android.widget.Toast;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import android.view.View;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
public void SendOutBroadoff() {
Intent i = new Intent("com.microntek.canbusdisplay");
i.putExtra("type", "music-off");
sendBroadcast(i);
}
public void SendOutBroadon() {
Intent intent = new Intent("com.microntek.canbusdisplay");
intent.putExtra("type", "music-on");
sendBroadcast(intent);
}
public void SendCustom(){
Intent intent = new Intent("com.microntek.canbusdisplay");
intent.putExtra("type", "music");
intent.putExtra("all", "8");
intent.putExtra("cur", "test");
intent.putExtra("time", "mix");
sendBroadcast(intent);
}
}
i know that malaysk has the answer, he has editet the musik apk with other people, but i think he has many work with his other projekts.
pleas help us @Malaysk
Actually i get it to work to broadcast en intend to my MFA+.
It was pretty basic but it worked.
After a little bit of playing around with the Infos i became i made this 2 Automate Flos:
Recieve Intent it repetly readst the intents to the Can Bus apk and diplays it as Toast.
And Send Broadcast.
It´s yea lets say dumb but it works.
So it opens the Audio menu and Displays Track 1.
These values are hat coded and won´t change with time.
I was able to unpack the canbus app but not able to found the recieve option.
So here is my upacked version
Working example
folepole almost got it right. The problem was that he sent strings in his intent. The CanBus app only deals with integers. The following code works (successfully tested in my Mercedes-Benz W211 on a head unit running Hal9k's Android 7.1.2 ROM).
Code:
public void sendCanBusMusicOn()
{
Log.i("PlaybackService", "sendCanBusMusicOn()");
Intent canBusDisplayIntent = new Intent("com.microntek.canbusdisplay");
canBusDisplayIntent.putExtra("type", "music-on");
sendBroadcast(canBusDisplayIntent);
}
public void sendCanBusMusicOff()
{
Log.i("PlaybackService", "sendCanBusMusicOff()");
Intent canBusDisplayIntent = new Intent("com.microntek.canbusdisplay");
canBusDisplayIntent.putExtra("type", "music-off");
sendBroadcast(canBusDisplayIntent);
}
/**
* Sends track information to the CanBus App
* (to display in car's display)
*/
public void sendCanBusInfo()
{
String methodTag = "PlaybackService";
// send intent to "com.microntek.canbusdisplay"
// "type": "music" (String)
// "all": number of tracks in playlist / queue (int)
// "cur": currentPlayIndex, position of current track in playlist (int)
// "time": either 0 or actual time position in milliseconds (int)
int numberOfTracksInQueue = getTimelineLength(); // e.g. 241 for playlist with 241 tracks
int currentPositionInQueue = getTimelinePosition() + 1; // e.g. 5 for 5th track of current playlist
int currentTimeOffset = getPosition(); // in milliseconds, e.g. 20000 for 00:20
Intent canBusDisplayIntent = new Intent("com.microntek.canbusdisplay");
canBusDisplayIntent.putExtra("type", "music");
canBusDisplayIntent.putExtra("all", numberOfTracksInQueue);
canBusDisplayIntent.putExtra("cur", currentPositionInQueue);
canBusDisplayIntent.putExtra("time", currentTimeOffset);
String hms = String.format("%02d:%02d",
TimeUnit.MILLISECONDS.toMinutes(currentTimeOffset),
TimeUnit.MILLISECONDS.toSeconds(currentTimeOffset) % TimeUnit.MINUTES.toSeconds(1));
String msg = hms + ", " + currentPositionInQueue + "/" + numberOfTracksInQueue;
Log.i(methodTag, msg);
sendBroadcast(canBusDisplayIntent);
}
For the order of calling the methods:
You have to call sendCanBusMusicOn() to let the CanBus app know that it shall "enable" the music mode. (At this point, my display already shows 00:00 and not "Audio off" anymore.)
Call sendCanBusInfo() to show the correct information (current position in the playlist and passed mm:ss in the track). I am calling this method every second to update the information shown.
Call sendCanBusMusicOff() to "leave" music mode. I think this step is optional. You can also just switch to the radio app and the current mode is overridden.
To test this, I have used the open-source media player "Vanilla" and added my code inside the "PlaybackService" class. But you can - of course - write custom apps.
I am currently going through the de-odexed source code of the MTCCanBus.apk to get an understanding of how the communication works and to see if it's possible to display strings in the FIS/MFA/Board computer (whatever you want to call it). So far I don't think it can be done easily. There are 76 different implementations of the "Canbus" class. One for every type of canbus adapter, I guess. And I don't even know which one my head unit is set to use. Plus, I'm no Android/Java developer...
But hey, it's a start.
Sadly in my display it just shows up Track 1. No infromation about the point in the playlist. But i have no idea how to deal with it. Maybe we can look up in a forum like https://www.canhack.de/ to get more information. But saddly i realy don´t get where the information is handed over to the can bus app.
I would definitely be interested in this. Maybe it's possible to use an Xposed module to do what we need?
It would be nice if it could get track information from apps like Spotify or Google Play Music. Just the name of the song or the position in the playlist would be a nice touch
It is really not the problem to get the information.
I already tested it with simple automate flows.
The bottleneck is to define the way it is send to the bus.
Gesendet von meinem G8341 mit Tapatalk
Hi,
I found some new info.
I attached from xbenji the decompiled apks and the source code for an mixed app.
I have a 2010 Jeep Grand Cherokee S-Limited 3.0 CRD (Mercedes Engine) with a specific Xtrons PX5 installed. My car has the "Auto Headlight" function and when they are switched on automatically, the illumination on the HU is OFF. If I manually switch On the headlight then the HU illumination is correctly working. It seems that the issue is related to the Can Bus. Probably the "message" on the Bus when the lights are switched on in "Auto" mode is different from the one in "Manual" mode and is not correctly decoded by the HU. Anyone knows if some modifications could be done to make it work also in "Auto" ?
Hi I decompiled several apps with APKTools but none of them contains the real deal. None of them contains the reciever for the intents.