Hello, I'm french user of an SPV E650 (flashed in HTC S710). My Internet Provider (Neuf) offers me a voip solution (neuftalk). Since one week, I try to use the VoipWM6 but I always compare at this problem: the personn called can't hear me.
My rom version is 1.34.406.1, I installed voipWM6.cab of Sleuth's. My _setup.xml contains:
<wap-provisioningdoc>
<characteristic type="VoIP">
<parm name="SIPSettings"
value="<provision key='1232ab01' name='neuftalk'>
<provider name='neuftalk' />
<user account='login' password='passwd'
uri='sip:[email protected]:5060'
allowedauth='digest'/>
<sipsrv addr='voip.wengo.fr' protocol='UDP' role='proxy'>
<session party='First' type='pc2pc' />
<session party='First' type='pc2ph' />
</sipsrv>
<sipsrv addr='voip.wengo.fr' protocol='UDP' role='registrar'/>
</provision>" />
</characteristic>
</wap-provisioningdoc>
I modified the internet calling option by "whenever available" and I open port 5060 on my sphone and on my router (hklm/system/voip/enable5060:0->1)
When I connect my smartphone on Wlan, the Voip logo appears and the line internet calling becames "neuftalk: connexion en cours"
I can call, I hear my correspondent (ont the rear speaker as everybody) but I can't be heard.
If somebody think at a solution for my matter, i will be very happy. Thanks a lot.
NB: excuse me for my bad english, I'm a poor little french!
Hi, I 'm very happy because I succeed to activate correctly Voip client of WM6 with Neuftalk.
In order to be called during my call, I' modify the registry as that:
I create a key "codec" in hklm/comm and I add 2 value in codec:
- "UsePreferredCodec" with DWORD value data 1
- "PreferredAudioCodec" with DWORD value data 8
Now is ok. 4 matters stay:
- The sound is transmitted by the rear speaker but the handless permit using phone correctly.
- For calling, I must dial 0033 + phone number. I must modify ipdialplan.xml
- My correspondent can't hear me immediately at the call beggining. between 2 and 8sec are necessary.
- I can't use the "Neuf WIFI" public hotspot. I can send call but the communication stop automatically at 30sec. During this call, my correspondent and me can't speak.
herveduff said:
- For calling, I must dial 0033 + phone number. I must modify ipdialplan.xml
Click to expand...
Click to collapse
Hi,
I'm french too
Here is my ipdial to have french phone call :
<dialplan xmlns='http://schemas.microsoft.com/embedded/VoIP'>
<dialplan-header>
<host>#use_sipsrv_host_name#</host>
</dialplan-header>
<!-- Regles de Numerotations -->
<!-- Regles de numerotation IP -->
<rule pattern='\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}'
restrict='Cell,SMS'
/>
<rule pattern='(\d{1,3})\*(\d{1,3})\*(\d{1,3})\*(\d{1,3})'
dial='\1.\2.\3.\4'
display='\1.\2.\3.\4'
transfer='\1.\2.\3.\4'
restrict='Cell,SMS'
/>
<!-- Regles de numerotations Francaises -->
<rule pattern='0(\d{9})'
dial='sip:0\[email protected]$host$'
display='0\1'
transfer='sip:0\[email protected]$host$'
/>
<rule pattern='0(\d{1})\s*(\d{2})\s*(\d{2})\s*(\d{2})\s*(\d{2})(\s*[Xx]\s*\d+)?'
dial='sip:0\1\2\3\4\[email protected]$host$'
display='0\1\2\3\4\5'
transfer='sip:0\1\2\3\4\[email protected]$host$'
/>
<!-- Regles de numerotation generiques -->
<rule pattern='(00|+)(\d+)'
dial='sip:00\[email protected]$host$'
display='+\2'
transfer='sip:00\[email protected]$host$'
/>
<rule pattern='(\d+)'
dial='sip:\[email protected]$host$'
display='+\1'
transfer='sip:\[email protected]$host$'
/>
<!-- Regles de numerotation URI SIP -->
<!-- Appels entrants Freephonie -->
<rule pattern='[Ss][Ii][Pp][Ss]?:\s*0(\d{9})@(.+)'
display='0\1'
restrict='Cell,SMS'
/>
<rule pattern='[Ss][Ii][Pp][Ss]?:\s*(\d{3})(\d{3})(\d{4})@(.+)'
display='\1\2\3'
restrict='Cell,SMS'
/>
<rule pattern='([Ss][Ii][Pp][Ss]??\s*([a-zA-Z0-9_-]+)@(.+)'
display='\2'
restrict='Cell,SMS'
/>
<rule pattern='[Ss][Ii][Pp][Ss]?:\s*([^@]+)'
display='\1'
restrict='Cell,SMS'
/>
</dialplan>
Click to expand...
Click to collapse
good luck
THanks for you dial plan! that interest me but before modify my dialplan, I desesperate to make worked my voip client on public hot spot which block all ports except the port 80. If somebody has an idea, tell me please
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.
In this post I will be explaining you guys that 'How to make a push notification app through GCM Service on PushBots'
Code is necessary for the implementation can be copied from here and watch the video below for the detail explanation of the implementation. Video will be uploaded soon
Android SDK integration
go to your module build.gradle file add PushBots dependency along with android support library v4:
Step 1: Import the Pushbots library into your project:
Code:
compile 'com.pushbots:pushbots-lib:[email protected]'
compile 'com.android.support:support-v4:21.0.0'
Re-build your project and wait for gradle to finish.
Step 2: Update AndroidManifest.xml file:
Add the following permessions and change com.example.sampleapp with your app identifier.
Code:
<!-- GCM connects to Google Services. -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<!-- GCM requires a Google account. -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<permission android:name="com.example.sampleapp.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="com.example.sampleapp.permission.C2D_MESSAGE" />
<!-- This app has permission to register and receive dataf message. -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
The following intent-filter in your main activity:
Code:
<intent-filter>
<action android:name="com.example.sampleapp.MESSAGE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
Add the following activity, reciever and service before the end of your application tag, and in all of the above code change com.example.sampleapp with your app identifier.
Code:
<receiver
android:name="com.pushbots.google.gcm.GCMBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<!-- Receives the actual messages. -->
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<!-- Receives the registration id. -->
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.example.sampleapp" />
</intent-filter>
</receiver>
<receiver android:name="com.pushbots.push.DefaultPushHandler" />
<service android:name="com.pushbots.push.GCMIntentService" />
Step 3: Creating pushbots.xml config file:
Go to Res folder -> Values --> Right click and new Resource File and name it pushbots with this content. Change your app ID and Sender ID.
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Pushbots Application ID -->
<string name="pb_appid">548ef5901d0ab1</string>
<!-- GCM Sender ID -->
<string name="pb_senderid">48849973</string>
<!-- Pushbots Log Level log Tag "PB2" -->
<string name="pb_logLevel">DEBUG</string>
</resources>
Step 4: Add required code:
in your main Activity add this line:
Code:
Pushbots.sharedInstance().init(this);
That's pretty much it. Run your application now, if all goes well, your device should be registered and ready to recieve push notifications.
Step 5: Custom handler for notifications (Optional):
5.1. Create customHandler class.
Code:
public class customHandler extends BroadcastReceiver
{
private static final String TAG = "customHandler";
@Override
public void onReceive(Context context, Intent intent)
{
String action = intent.getAction();
Log.d(TAG, "action=" + action);
// Handle Push Message when opened
if (action.equals(PBConstants.EVENT_MSG_OPEN)) {
//Check for Pushbots Instance
Pushbots pushInstance = Pushbots.sharedInstance();
if(!pushInstance.isInitialized()){
Log.d("Initializing Pushbots.");
Pushbots.sharedInstance().init(context.getApplicationContext());
}
//Clear Notification array
if(PBNotificationIntent.notificationsArray != null){
PBNotificationIntent.notificationsArray = null;
}
HashMap<?, ?> PushdataOpen = (HashMap<?, ?>) intent.getExtras().get(PBConstants.EVENT_MSG_OPEN);
Log.w(TAG, "User clicked notification with Message: " + PushdataOpen.get("message"));
//Report Opened Push Notification to Pushbots
if(Pushbots.sharedInstance().isAnalyticsEnabled()){
Pushbots.sharedInstance().reportPushOpened( (String) PushdataOpen.get("PUSHANALYTICS"));
}
//Start lanuch Activity
String packageName = context.getPackageName();
Intent resultIntent = new Intent(context.getPackageManager().getLaunchIntentForPackage(packageName));
resultIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK| Intent.FLAG_ACTIVITY_CLEAR_TASK);
resultIntent.putExtras(intent.getBundleExtra("pushData"));
Pushbots.sharedInstance().startActivity(resultIntent);
// Handle Push Message when received
}else if(action.equals(PBConstants.EVENT_MSG_RECEIVE)){
HashMap<?, ?> PushdataOpen = (HashMap<?, ?>) intent.getExtras().get(PBConstants.EVENT_MSG_RECEIVE);
Log.w(TAG, "User Received notification with Message: " + PushdataOpen.get("message"));
}
}
}
5.2. Open AndroidManifest.xml and replace DefaultPushHandler with your custom Handler class.
Code:
<receiver android:name="PACKAGE_NAME.customHandler" />
5.3. Set your customHandler class in MainActivity.
Code:
Pushbots.sharedInstance().setCustomHandler(customHandler.class);
Pls hit the thanks button if i helped you :angel:
For more information-Visit: http://androidtechfreakat.blogspot.in
http://androidtechxdaat,weebly.com
http://advaitt17.github.io
XDA:DevDB Information
[GUIDE]To make a Push Notificaton App via GCM Service by AdvaitT17, App for all devices (see above for details)
Contributors
AdvaitT17, PushBots Developers
Source Code: www.pushbots.com
Version Information
Status: Stable
Created 2016-04-06
Last Updated 2016-05-20
Reserved
If there are any doubts about this process yoi can PM me on Xda
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.